separated utilities by category and grouped, grouped crypto
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"gopkg.in/src-d/go-git.v4"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/storer"
|
||||
|
||||
@@ -17,7 +17,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"gopkg.in/src-d/go-git.v4"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing"
|
||||
"gopkg.in/src-d/go-git.v4/plumbing/storer"
|
||||
|
||||
@@ -2,16 +2,18 @@ package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/docker/docker/api/types"
|
||||
"github.com/docker/docker/client"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/app"
|
||||
"github.com/indra-labs/indra/pkg/cmds"
|
||||
"github.com/indra-labs/indra/pkg/docker"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/opts/toggle"
|
||||
"github.com/indra-labs/indra/pkg/proc/app"
|
||||
"github.com/indra-labs/indra/pkg/proc/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/toggle"
|
||||
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
@@ -76,7 +78,7 @@ var buildConfigurations = []docker.BuildConfiguration{
|
||||
PullParent: false,
|
||||
},
|
||||
},
|
||||
//docker.BuildConfiguration{
|
||||
// docker.BuildConfiguration{
|
||||
// Name: defaultRepositoryName + "/" + "lnd",
|
||||
// ContextFilePath: "/tmp/lnd.tar",
|
||||
// BuildOpts: types.ImageBuildOptions{
|
||||
@@ -98,8 +100,8 @@ var buildConfigurations = []docker.BuildConfiguration{
|
||||
// ForceRemove: true,
|
||||
// PullParent: true,
|
||||
// },
|
||||
//},
|
||||
//docker.BuildConfiguration{
|
||||
// },
|
||||
// docker.BuildConfiguration{
|
||||
// Name: defaultRepositoryName + "/" + "indra",
|
||||
// ContextFilePath: "/tmp/indra-" + indra.SemVer + ".tar",
|
||||
// BuildOpts: types.ImageBuildOptions{
|
||||
@@ -114,7 +116,7 @@ var buildConfigurations = []docker.BuildConfiguration{
|
||||
// ForceRemove: true,
|
||||
// PullParent: true,
|
||||
// },
|
||||
//},
|
||||
// },
|
||||
}
|
||||
|
||||
var commands = &cmds.Command{
|
||||
|
||||
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"gopkg.in/src-d/go-git.v4"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/app"
|
||||
"github.com/indra-labs/indra/pkg/cfg"
|
||||
"github.com/indra-labs/indra/pkg/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/proc/app"
|
||||
"github.com/indra-labs/indra/pkg/proc/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/server"
|
||||
"github.com/libp2p/go-libp2p/core/crypto"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
|
||||
@@ -2,8 +2,8 @@ package cfg
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/node"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
)
|
||||
|
||||
|
||||
@@ -8,16 +8,16 @@ import (
|
||||
"github.com/cybriq/qu"
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/ifc"
|
||||
"github.com/indra-labs/indra/pkg/key/cloak"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/key/signer"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/cloak"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/signer"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/node"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/layer"
|
||||
"github.com/indra-labs/indra/pkg/wire/response"
|
||||
@@ -46,7 +46,7 @@ type Client struct {
|
||||
qu.C
|
||||
}
|
||||
|
||||
func NewClient(tpt ifc.Transport, hdrPrv *prv.Key, no *node.Node,
|
||||
func NewClient(tpt types.Transport, hdrPrv *prv.Key, no *node.Node,
|
||||
nodes node.Nodes) (c *Client, e error) {
|
||||
|
||||
no.Transport = tpt
|
||||
|
||||
@@ -5,16 +5,16 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/cybriq/qu"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/onion"
|
||||
"github.com/indra-labs/indra/pkg/payment"
|
||||
"github.com/indra-labs/indra/pkg/service"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/transport"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/session"
|
||||
)
|
||||
|
||||
@@ -6,13 +6,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra/pkg/ciph"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/ciph"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/onion"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/balance"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/delay"
|
||||
|
||||
@@ -3,14 +3,14 @@ package client
|
||||
import (
|
||||
"math"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/ifc"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/node"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/transport"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
func CreateNMockCircuits(inclSessions bool,
|
||||
@@ -19,7 +19,7 @@ func CreateNMockCircuits(inclSessions bool,
|
||||
nTotal := 1 + nCircuits*5
|
||||
cl = make([]*Client, nTotal)
|
||||
nodes := make([]*node.Node, nTotal)
|
||||
transports := make([]ifc.Transport, nTotal)
|
||||
transports := make([]types.Transport, nTotal)
|
||||
sessions := make(traffic.Sessions, nTotal-1)
|
||||
for i := range transports {
|
||||
transports[i] = transport.NewSim(nTotal)
|
||||
|
||||
@@ -10,12 +10,12 @@ import (
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/ecdh"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/ecdh"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
)
|
||||
|
||||
func TestAddress(t *testing.T) {
|
||||
@@ -5,9 +5,9 @@ package ecdh
|
||||
|
||||
import (
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
// Compute computes an Elliptic Curve Diffie-Hellman shared secret that can be
|
||||
@@ -5,7 +5,7 @@ package prv
|
||||
import (
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -8,10 +8,10 @@ import (
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4"
|
||||
"github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
mrand "math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
func TestSignRecover(t *testing.T) {
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"crypto/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/key/sig"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/sig"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
// this just really demonstrates how the keys generated are not linkable.
|
||||
@@ -3,7 +3,7 @@ package nonce
|
||||
import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
)
|
||||
|
||||
const IDLen = 8
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -5,7 +5,7 @@ package sha256
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/minio/sha256-simd"
|
||||
)
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
"github.com/docker/docker/pkg/archive"
|
||||
"github.com/docker/docker/pkg/jsonmessage"
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/moby/term"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ package identity
|
||||
import (
|
||||
"net/netip"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/ifc"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
)
|
||||
|
||||
type Peer struct {
|
||||
@@ -13,5 +13,5 @@ type Peer struct {
|
||||
IdentityPub *pub.Key
|
||||
IdentityBytes pub.Bytes
|
||||
IdentityPrv *prv.Key
|
||||
ifc.Transport
|
||||
types.Transport
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"syscall"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"go.uber.org/atomic"
|
||||
|
||||
"github.com/kardianos/osext"
|
||||
|
||||
@@ -8,15 +8,15 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/identity"
|
||||
"github.com/indra-labs/indra/pkg/ifc"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/service"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -42,7 +42,7 @@ type Node struct {
|
||||
// in direct connection. Also, the idPrv node private key can be nil, as only
|
||||
// the node embedded in a client and not the peer node list has one available.
|
||||
func New(addr *netip.AddrPort, idPub *pub.Key, idPrv *prv.Key,
|
||||
tpt ifc.Transport) (n *Node, id nonce.ID) {
|
||||
tpt types.Transport) (n *Node, id nonce.ID) {
|
||||
|
||||
id = nonce.NewID()
|
||||
n = &Node{
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/ecdh"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/ecdh"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/delay"
|
||||
"github.com/indra-labs/indra/pkg/wire/exit"
|
||||
|
||||
@@ -8,13 +8,13 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/delay"
|
||||
"github.com/indra-labs/indra/pkg/wire/exit"
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"net/netip"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/lnd/lnwire"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/balance"
|
||||
"github.com/indra-labs/indra/pkg/wire/confirm"
|
||||
"github.com/indra-labs/indra/pkg/wire/delay"
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package onion
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/key/signer"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/signer"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/traffic"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
// Ping is a message which checks the liveness of relays by ensuring they are
|
||||
|
||||
@@ -3,14 +3,15 @@ package introducer
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"sync"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
dht "github.com/libp2p/go-libp2p-kad-dht"
|
||||
"github.com/libp2p/go-libp2p/core/host"
|
||||
"github.com/libp2p/go-libp2p/core/peer"
|
||||
"github.com/libp2p/go-libp2p/core/protocol"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"sync"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -71,7 +72,7 @@ func Bootstrap(ctx context.Context, host host.Host, seeds []multiaddr.Multiaddr)
|
||||
dht.BootstrapPeers(bootstrapPeers...),
|
||||
dht.DisableValues(),
|
||||
dht.DisableProviders(),
|
||||
//dht.Validator(),
|
||||
// dht.Validator(),
|
||||
}
|
||||
|
||||
if kadht, err = dht.New(ctx, h, options...); check(err) {
|
||||
|
||||
@@ -10,13 +10,13 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/ciph"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/ciph"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"sort"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/templexxx/reedsolomon"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"math/rand"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package payment
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/lnd/lnwire"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
)
|
||||
|
||||
type Payment struct {
|
||||
|
||||
@@ -2,8 +2,8 @@ package app
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
cmds2 "github.com/indra-labs/indra/pkg/proc/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -12,20 +12,20 @@ var (
|
||||
)
|
||||
|
||||
type App struct {
|
||||
*cmds.Command
|
||||
launch *cmds.Command
|
||||
*cmds2.Command
|
||||
launch *cmds2.Command
|
||||
runArgs []string
|
||||
cmds.Envs
|
||||
cmds2.Envs
|
||||
}
|
||||
|
||||
func New(c *cmds.Command, args []string) (a *App, e error) {
|
||||
func New(c *cmds2.Command, args []string) (a *App, e error) {
|
||||
log2.App = c.Name
|
||||
// Add the default configuration items for datadir/configfile
|
||||
cmds.GetConfigBase(c.Configs, c.Name, false)
|
||||
cmds2.GetConfigBase(c.Configs, c.Name, false)
|
||||
// Add the help function
|
||||
c.AddCommand(cmds.Help())
|
||||
c.AddCommand(cmds2.Help())
|
||||
a = &App{Command: c}
|
||||
if a.Command, e = cmds.Init(c, nil); check(e) {
|
||||
if a.Command, e = cmds2.Init(c, nil); check(e) {
|
||||
return
|
||||
}
|
||||
// We first parse the CLI args, in case config file location has been
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/cmds"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
func TestNew(t *testing.T) {
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/norm"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -56,7 +56,7 @@ func (c *Command) ParseCLIArgs(a []string) (run *Command, runArgs []string,
|
||||
// where relevant config items will be found.
|
||||
for ; cursor < len(args); cursor++ {
|
||||
for i := range cur.Commands {
|
||||
if util.NormEq(args[cursor], cur.Commands[i].Name) {
|
||||
if norm.Eq(args[cursor], cur.Commands[i].Name) {
|
||||
// the command to run is the last, so update
|
||||
// each new command found
|
||||
run = cur.Commands[i]
|
||||
@@ -89,7 +89,7 @@ func (c *Command) ParseCLIArgs(a []string) (run *Command, runArgs []string,
|
||||
// the final command can accept arbitrary arguments,
|
||||
// that are passed into the entrypoint
|
||||
runArgs = iArgs
|
||||
if util.Norm(commands[i].Name) == "help" {
|
||||
if norm.Norm(commands[i].Name) == "help" {
|
||||
break
|
||||
}
|
||||
for cursor = 0; cursor < len(iArgs); {
|
||||
@@ -160,7 +160,7 @@ func lookAhead(cmd *Command, cfgName, arg string, iArgs []string,
|
||||
names := append(
|
||||
[]string{cfgName}, aliases...)
|
||||
for _, name := range names {
|
||||
if util.Norm(name) != util.Norm(arg) {
|
||||
if norm.Norm(name) != norm.Norm(arg) {
|
||||
continue
|
||||
}
|
||||
// check for booleans, which can only be
|
||||
@@ -207,8 +207,8 @@ func valueInArg(cmd *Command, arg string) (e error) {
|
||||
names := append(
|
||||
[]string{cfgName}, aliases...)
|
||||
for _, name := range names {
|
||||
if util.Norm(name) !=
|
||||
util.Norm(split[0]) {
|
||||
if norm.Norm(name) !=
|
||||
norm.Norm(split[0]) {
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
func TestCommand_ParseCLIArgs(t *testing.T) {
|
||||
@@ -7,13 +7,13 @@ import (
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/opts/toggle"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
"github.com/indra-labs/indra/pkg/util"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/toggle"
|
||||
"github.com/indra-labs/indra/pkg/util/norm"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
)
|
||||
|
||||
type Op func(c *Command, args []string) error
|
||||
@@ -121,7 +121,7 @@ trace log statements will not print.
|
||||
lvl := log2.Info
|
||||
for i := range log2.LvlStr {
|
||||
ll := log2.GetLevelName(i)
|
||||
if util.Norm(v) == strings.TrimSpace(ll) {
|
||||
if norm.Norm(v) == strings.TrimSpace(ll) {
|
||||
lvl = i
|
||||
found = true
|
||||
}
|
||||
@@ -222,16 +222,16 @@ func (c *Command) GetOpt(path path.Path) (o config.Option) {
|
||||
case len(p) > 2:
|
||||
// search subcommands
|
||||
for i := range c.Commands {
|
||||
if util.Norm(c.Commands[i].Name) == util.Norm(p[1]) {
|
||||
if norm.Norm(c.Commands[i].Name) == norm.Norm(p[1]) {
|
||||
cc := c.Commands[i]
|
||||
return cc.GetOpt(p[1:])
|
||||
}
|
||||
}
|
||||
case len(p) == 2:
|
||||
// check name matches path, search for config item
|
||||
if util.Norm(c.Name) == util.Norm(p[0]) {
|
||||
if norm.Norm(c.Name) == norm.Norm(p[0]) {
|
||||
for i := range c.Configs {
|
||||
if util.Norm(i) == util.Norm(p[1]) {
|
||||
if norm.Norm(i) == norm.Norm(p[1]) {
|
||||
return c.Configs[i]
|
||||
}
|
||||
}
|
||||
@@ -6,8 +6,8 @@ import (
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
)
|
||||
|
||||
func TestCommand_Foreach(t *testing.T) {
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
)
|
||||
|
||||
type Env struct {
|
||||
@@ -6,14 +6,14 @@ import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/Integer"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/duration"
|
||||
"github.com/indra-labs/indra/pkg/opts/float"
|
||||
"github.com/indra-labs/indra/pkg/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/opts/toggle"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/duration"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/float"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/integer"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/toggle"
|
||||
)
|
||||
|
||||
const lorem = `
|
||||
@@ -9,8 +9,8 @@ import (
|
||||
"sync"
|
||||
"text/tabwriter"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/util"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/util/norm"
|
||||
)
|
||||
|
||||
// Help is a default top level command that is injected into a Command at the
|
||||
@@ -80,7 +80,7 @@ func HelpEntrypoint(c *Command, args []string) (err error) {
|
||||
c.ForEach(func(cm *Command, depth int) bool {
|
||||
for i := range args {
|
||||
// check for match of current command name
|
||||
if util.Norm(cm.Name) == util.Norm(args[i]) {
|
||||
if norm.Norm(cm.Name) == norm.Norm(args[i]) {
|
||||
if len(args) == 1 {
|
||||
foundCmdWhole = true
|
||||
*foundCmds = append(*foundCmds, cm)
|
||||
@@ -88,15 +88,15 @@ func HelpEntrypoint(c *Command, args []string) (err error) {
|
||||
}
|
||||
}
|
||||
// or partial match.
|
||||
if strings.Contains(util.Norm(cm.Name),
|
||||
util.Norm(args[i])) {
|
||||
if strings.Contains(norm.Norm(cm.Name),
|
||||
norm.Norm(args[i])) {
|
||||
|
||||
*foundCmds = append(*foundCmds, cm)
|
||||
}
|
||||
// check for matches on configs
|
||||
for ops := range cm.Configs {
|
||||
if strings.Contains(util.Norm(ops),
|
||||
util.Norm(args[i])) {
|
||||
if strings.Contains(norm.Norm(ops),
|
||||
norm.Norm(args[i])) {
|
||||
// in the case of specifying a command
|
||||
// and an option and the option is from
|
||||
// the command, and there is only two
|
||||
@@ -107,8 +107,8 @@ func HelpEntrypoint(c *Command, args []string) (err error) {
|
||||
// recognised to indicate show detail
|
||||
if len(args) == 2 &&
|
||||
len(*foundCmds) == 1 &&
|
||||
util.Norm(ops) ==
|
||||
util.Norm(args[i]) &&
|
||||
norm.Norm(ops) ==
|
||||
norm.Norm(args[i]) &&
|
||||
cm.Configs[ops].Path().
|
||||
Equal(cm.Path) {
|
||||
|
||||
@@ -9,14 +9,14 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/Integer"
|
||||
"github.com/indra-labs/indra/pkg/opts/duration"
|
||||
"github.com/indra-labs/indra/pkg/opts/float"
|
||||
"github.com/indra-labs/indra/pkg/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/opts/toggle"
|
||||
path2 "github.com/indra-labs/indra/pkg/path"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/duration"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/float"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/integer"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/list"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/text"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/toggle"
|
||||
path2 "github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"github.com/naoina/toml"
|
||||
)
|
||||
|
||||
@@ -3,8 +3,8 @@ package config
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
)
|
||||
|
||||
// Concrete is a struct of functions that return the concrete values. Only the
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -5,10 +5,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
normalize2 "github.com/indra-labs/indra/pkg/opts/normalize"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/normalize"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -96,7 +96,7 @@ func NormalizeNetworkAddress(defaultPort string,
|
||||
|
||||
return func(o *Opt) (e error) {
|
||||
var a []string
|
||||
a, e = normalize2.Addresses(
|
||||
a, e = normalize.Addresses(
|
||||
o.v.Load().([]string), defaultPort, userOnly)
|
||||
if !log.E.Chk(e) {
|
||||
o.x.Store(a)
|
||||
@@ -113,7 +113,7 @@ func NormalizeFilesystemPath(abs bool, appName string) func(*Opt) error {
|
||||
strings := o.v.Load().([]string)
|
||||
for i := range strings {
|
||||
var cleaned string
|
||||
cleaned, e = normalize2.ResolvePath(strings[i], appName, abs)
|
||||
cleaned, e = normalize.ResolvePath(strings[i], appName, abs)
|
||||
if !log.E.Chk(e) {
|
||||
strings[i] = cleaned
|
||||
}
|
||||
@@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/appdata"
|
||||
"github.com/indra-labs/indra/pkg/util/appdata"
|
||||
)
|
||||
|
||||
func ResolvePath(input, appName string, abs bool) (cleaned string, e error) {
|
||||
@@ -4,11 +4,11 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
normalize2 "github.com/indra-labs/indra/pkg/opts/normalize"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/normalize"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -85,7 +85,7 @@ func NormalizeNetworkAddress(defaultPort string,
|
||||
|
||||
return func(o *Opt) (e error) {
|
||||
var a string
|
||||
a, e = normalize2.Address(o.v.Load(), defaultPort, userOnly)
|
||||
a, e = normalize.Address(o.v.Load(), defaultPort, userOnly)
|
||||
if !log.E.Chk(e) {
|
||||
o.x.Store(a)
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func NormalizeNetworkAddress(defaultPort string,
|
||||
func NormalizeFilesystemPath(abs bool, appName string) func(*Opt) error {
|
||||
return func(o *Opt) (e error) {
|
||||
var cleaned string
|
||||
cleaned, e = normalize2.ResolvePath(o.v.Load(), appName, abs)
|
||||
cleaned, e = normalize.ResolvePath(o.v.Load(), appName, abs)
|
||||
if !log.E.Chk(e) {
|
||||
o.x.Store(cleaned)
|
||||
}
|
||||
@@ -6,10 +6,10 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/path"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/config"
|
||||
"github.com/indra-labs/indra/pkg/proc/opts/meta"
|
||||
"github.com/indra-labs/indra/pkg/util/path/path"
|
||||
"go.uber.org/atomic"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/libp2p/go-libp2p/core/host"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,16 +2,17 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/cfg"
|
||||
"github.com/indra-labs/indra/pkg/interrupt"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/p2p/introducer"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/server/metrics"
|
||||
"github.com/libp2p/go-libp2p"
|
||||
"github.com/libp2p/go-libp2p/core/host"
|
||||
"github.com/multiformats/go-multiaddr"
|
||||
"time"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -69,9 +70,9 @@ func (srv *Server) Serve() (err error) {
|
||||
go introducer.Bootstrap(ctx, srv.host, srv.config.SeedAddresses)
|
||||
|
||||
// Get some basic metrics for the host
|
||||
//metrics.Init()
|
||||
//metrics.Set('indra.host.status.reporting.interval', 30 * time.Second)
|
||||
//metrics.Enable('indra.host.status')
|
||||
// metrics.Init()
|
||||
// metrics.Set('indra.host.status.reporting.interval', 30 * time.Second)
|
||||
// metrics.Enable('indra.host.status')
|
||||
metrics.SetInterval(30 * time.Second)
|
||||
|
||||
go metrics.HostStatus(ctx, srv.host)
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/ifc"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
Port uint16
|
||||
ifc.Transport
|
||||
types.Transport
|
||||
}
|
||||
|
||||
type Services []*Service
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"crypto/rand"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -4,14 +4,14 @@ import (
|
||||
"sync"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/identity"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/lnd/lnwire"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/payment"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -2,8 +2,8 @@ package transport
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package transport
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
type Dispatcher chan slice.Bytes
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package ifc
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
type Transport interface {
|
||||
@@ -1,7 +1,7 @@
|
||||
package types
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
// Onion is an interface for the layers of messages each encrypted inside a
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"testing"
|
||||
"unicode"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/appdata"
|
||||
"github.com/indra-labs/indra/pkg/util/appdata"
|
||||
)
|
||||
|
||||
// TestAppDataDir tests the API for Dir to ensure it gives expected results for various operating systems.
|
||||
@@ -1,72 +0,0 @@
|
||||
package util
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// EnsureDir checks a file could be written to a path, creates the directories as needed
|
||||
func EnsureDir(fileName string) {
|
||||
dirName := filepath.Dir(fileName)
|
||||
if _, serr := os.Stat(dirName); serr != nil {
|
||||
merr := os.MkdirAll(dirName, os.ModePerm)
|
||||
if merr != nil {
|
||||
panic(merr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FileExists reports whether the named file or directory exists.
|
||||
func FileExists(filePath string) bool {
|
||||
_, e := os.Stat(filePath)
|
||||
return e == nil
|
||||
}
|
||||
|
||||
// MinUint32 is a helper function to return the minimum of two uint32s. This avoids a math import and the need to cast
|
||||
// to floats.
|
||||
func MinUint32(a, b uint32) uint32 {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
||||
// PrependForWindows runs a command with a terminal
|
||||
func PrependForWindows(args []string) []string {
|
||||
if runtime.GOOS == "windows" {
|
||||
args = append(
|
||||
[]string{
|
||||
"cmd.exe",
|
||||
"/C",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
// PrependForWindowsWithStart runs a process independently
|
||||
func PrependForWindowsWithStart(args []string) []string {
|
||||
if runtime.GOOS == "windows" {
|
||||
args = append(
|
||||
[]string{
|
||||
"cmd.exe",
|
||||
"/C",
|
||||
"start",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
func Norm(s string) string {
|
||||
return strings.ToLower(s)
|
||||
}
|
||||
|
||||
func NormEq(a, b string) bool {
|
||||
an, bn := Norm(a), Norm(b)
|
||||
return an == bn
|
||||
}
|
||||
23
pkg/util/file/file.go
Normal file
23
pkg/util/file/file.go
Normal file
@@ -0,0 +1,23 @@
|
||||
package file
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
// EnsureDir checks a file could be written to a path, creates the directories as needed
|
||||
func EnsureDir(fileName string) {
|
||||
dirName := filepath.Dir(fileName)
|
||||
if _, serr := os.Stat(dirName); serr != nil {
|
||||
merr := os.MkdirAll(dirName, os.ModePerm)
|
||||
if merr != nil {
|
||||
panic(merr)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// FileExists reports whether the named file or directory exists.
|
||||
func FileExists(filePath string) bool {
|
||||
_, e := os.Stat(filePath)
|
||||
return e == nil
|
||||
}
|
||||
10
pkg/util/math/math.go
Normal file
10
pkg/util/math/math.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package math
|
||||
|
||||
// MinUint32 is a helper function to return the minimum of two uint32s. This avoids a math import and the need to cast
|
||||
// to floats.
|
||||
func MinUint32(a, b uint32) uint32 {
|
||||
if a < b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
14
pkg/util/norm/norm.go
Normal file
14
pkg/util/norm/norm.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package norm
|
||||
|
||||
import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func Norm(s string) string {
|
||||
return strings.ToLower(s)
|
||||
}
|
||||
|
||||
func Eq(a, b string) bool {
|
||||
an, bn := Norm(a), Norm(b)
|
||||
return an == bn
|
||||
}
|
||||
@@ -4,8 +4,8 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/util"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/util/norm"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -49,8 +49,8 @@ func (p Path) Common(p2 Path) (o Path) {
|
||||
func (p Path) Equal(p2 Path) bool {
|
||||
if len(p) == len(p2) {
|
||||
for i := range p {
|
||||
if util.Norm(p[i]) !=
|
||||
util.Norm(p2[i]) {
|
||||
if norm.Norm(p[i]) !=
|
||||
norm.Norm(p2[i]) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"bytes"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
)
|
||||
|
||||
@@ -13,8 +13,8 @@ import (
|
||||
"unsafe"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/tests"
|
||||
)
|
||||
|
||||
34
pkg/util/windows/windows.go
Normal file
34
pkg/util/windows/windows.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package windows
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// PrependForWindows runs a command with a terminal
|
||||
func PrependForWindows(args []string) []string {
|
||||
if runtime.GOOS == "windows" {
|
||||
args = append(
|
||||
[]string{
|
||||
"cmd.exe",
|
||||
"/C",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
}
|
||||
return args
|
||||
}
|
||||
|
||||
// PrependForWindowsWithStart runs a process independently
|
||||
func PrependForWindowsWithStart(args []string) []string {
|
||||
if runtime.GOOS == "windows" {
|
||||
args = append(
|
||||
[]string{
|
||||
"cmd.exe",
|
||||
"/C",
|
||||
"start",
|
||||
},
|
||||
args...,
|
||||
)
|
||||
}
|
||||
return args
|
||||
}
|
||||
@@ -2,11 +2,11 @@ package balance
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/lnd/lnwire"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
)
|
||||
|
||||
type Hook func(cf nonce.ID)
|
||||
|
||||
@@ -4,9 +4,9 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ package exit
|
||||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
"net/netip"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -3,11 +3,11 @@ package getbalance
|
||||
import (
|
||||
"github.com/davecgh/go-spew/spew"
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,14 +5,14 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/ciph"
|
||||
"github.com/indra-labs/indra/pkg/key/cloak"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/key/pub"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/ciph"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/cloak"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/pub"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ import (
|
||||
"fmt"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package noop
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
type OnionSkin struct {
|
||||
|
||||
@@ -3,8 +3,8 @@ package response
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
)
|
||||
|
||||
type Hook struct {
|
||||
|
||||
@@ -2,10 +2,10 @@ package response
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import (
|
||||
"net/netip"
|
||||
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
@@ -2,14 +2,14 @@ package session
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
"github.com/indra-labs/indra/pkg/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/key/prv"
|
||||
"github.com/indra-labs/indra/pkg/crypto/nonce"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
"github.com/indra-labs/indra/pkg/lnd/lnwire"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/nonce"
|
||||
"github.com/indra-labs/indra/pkg/payment"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
"github.com/indra-labs/indra/pkg/wire/noop"
|
||||
)
|
||||
|
||||
@@ -2,10 +2,10 @@ package token
|
||||
|
||||
import (
|
||||
"github.com/indra-labs/indra"
|
||||
log2 "github.com/indra-labs/indra/pkg/log"
|
||||
"github.com/indra-labs/indra/pkg/sha256"
|
||||
"github.com/indra-labs/indra/pkg/slice"
|
||||
"github.com/indra-labs/indra/pkg/crypto/sha256"
|
||||
log2 "github.com/indra-labs/indra/pkg/proc/log"
|
||||
"github.com/indra-labs/indra/pkg/types"
|
||||
"github.com/indra-labs/indra/pkg/util/slice"
|
||||
"github.com/indra-labs/indra/pkg/wire/magicbytes"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user