From cc0d7c9b579085d14f207ac6aed6e81d19f44707 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Mon, 29 Dec 2014 05:45:55 -0800 Subject: [PATCH] crypto -> p2p/crypto The crypto package moves into p2p. Nothing in it so far is ipfs specific; everything is p2p-general. --- cmd/ipfs/init.go | 2 +- cmd/seccat/seccat.go | 4 ++-- config/config.go | 2 +- core/commands/id.go | 2 +- core/commands/publish.go | 2 +- core/core.go | 2 +- core/mock.go | 2 +- fuse/ipns/ipns_unix.go | 2 +- namesys/interface.go | 2 +- namesys/namesys.go | 2 +- namesys/publisher.go | 2 +- namesys/routing.go | 2 +- net/conn/conn.go | 2 +- net/conn/interface.go | 2 +- net/conn/listen.go | 2 +- net/conn/secure_conn.go | 4 ++-- net/conn/secure_conn_test.go | 2 +- net/mock/interface.go | 2 +- net/mock/mock_conn.go | 2 +- net/mock/mock_net.go | 2 +- net/mock/mock_peernet.go | 2 +- net/swarm/swarm_conn.go | 2 +- net/swarmnet/net.go | 2 +- {crypto => p2p/crypto}/internal/pb/Makefile | 0 {crypto => p2p/crypto}/internal/pb/crypto.pb.go | 0 {crypto => p2p/crypto}/internal/pb/crypto.proto | 0 {crypto => p2p/crypto}/key.go | 2 +- {crypto => p2p/crypto}/key_test.go | 2 +- {crypto => p2p/crypto}/rsa.go | 2 +- {crypto => p2p/crypto}/secio/al.go | 2 +- {crypto => p2p/crypto}/secio/interface.go | 2 +- {crypto => p2p/crypto}/secio/internal/pb/Makefile | 0 {crypto => p2p/crypto}/secio/internal/pb/spipe.pb.go | 0 {crypto => p2p/crypto}/secio/internal/pb/spipe.proto | 0 {crypto => p2p/crypto}/secio/io_test.go | 0 {crypto => p2p/crypto}/secio/pb/Makefile | 0 {crypto => p2p/crypto}/secio/pb/spipe.pb.go | 0 {crypto => p2p/crypto}/secio/pb/spipe.proto | 0 {crypto => p2p/crypto}/secio/protocol.go | 4 ++-- {crypto => p2p/crypto}/secio/rw.go | 0 p2p/peer/peer.go | 2 +- p2p/peer/peer_test.go | 4 ++-- p2p/peer/peerstore.go | 2 +- routing/dht/records.go | 2 +- routing/kbucket/sorting.go | 2 +- util/testutil/gen.go | 2 +- util/testutil/identity.go | 2 +- 47 files changed, 40 insertions(+), 40 deletions(-) rename {crypto => p2p/crypto}/internal/pb/Makefile (100%) rename {crypto => p2p/crypto}/internal/pb/crypto.pb.go (100%) rename {crypto => p2p/crypto}/internal/pb/crypto.proto (100%) rename {crypto => p2p/crypto}/key.go (99%) rename {crypto => p2p/crypto}/key_test.go (97%) rename {crypto => p2p/crypto}/rsa.go (97%) rename {crypto => p2p/crypto}/secio/al.go (98%) rename {crypto => p2p/crypto}/secio/interface.go (98%) rename {crypto => p2p/crypto}/secio/internal/pb/Makefile (100%) rename {crypto => p2p/crypto}/secio/internal/pb/spipe.pb.go (100%) rename {crypto => p2p/crypto}/secio/internal/pb/spipe.proto (100%) rename {crypto => p2p/crypto}/secio/io_test.go (100%) rename {crypto => p2p/crypto}/secio/pb/Makefile (100%) rename {crypto => p2p/crypto}/secio/pb/spipe.pb.go (100%) rename {crypto => p2p/crypto}/secio/pb/spipe.proto (100%) rename {crypto => p2p/crypto}/secio/protocol.go (98%) rename {crypto => p2p/crypto}/secio/rw.go (100%) diff --git a/cmd/ipfs/init.go b/cmd/ipfs/init.go index 89080a5d8..5d2c3e773 100644 --- a/cmd/ipfs/init.go +++ b/cmd/ipfs/init.go @@ -12,9 +12,9 @@ import ( cmds "github.com/jbenet/go-ipfs/commands" config "github.com/jbenet/go-ipfs/config" core "github.com/jbenet/go-ipfs/core" - ci "github.com/jbenet/go-ipfs/crypto" imp "github.com/jbenet/go-ipfs/importer" chunk "github.com/jbenet/go-ipfs/importer/chunk" + ci "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" repo "github.com/jbenet/go-ipfs/repo" u "github.com/jbenet/go-ipfs/util" diff --git a/cmd/seccat/seccat.go b/cmd/seccat/seccat.go index b70d977e5..62fd1d024 100644 --- a/cmd/seccat/seccat.go +++ b/cmd/seccat/seccat.go @@ -18,8 +18,8 @@ import ( "os/signal" "syscall" - ci "github.com/jbenet/go-ipfs/crypto" - secio "github.com/jbenet/go-ipfs/crypto/secio" + ci "github.com/jbenet/go-ipfs/p2p/crypto" + secio "github.com/jbenet/go-ipfs/p2p/crypto/secio" peer "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" ) diff --git a/config/config.go b/config/config.go index d165f9886..ed8e66b21 100644 --- a/config/config.go +++ b/config/config.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" u "github.com/jbenet/go-ipfs/util" "github.com/jbenet/go-ipfs/util/debugerror" ) diff --git a/core/commands/id.go b/core/commands/id.go index 60a4e7308..c71b0cddb 100644 --- a/core/commands/id.go +++ b/core/commands/id.go @@ -11,7 +11,7 @@ import ( b58 "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-base58" cmds "github.com/jbenet/go-ipfs/commands" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" "github.com/jbenet/go-ipfs/p2p/peer" kb "github.com/jbenet/go-ipfs/routing/kbucket" u "github.com/jbenet/go-ipfs/util" diff --git a/core/commands/publish.go b/core/commands/publish.go index 97455b9c7..5501ea752 100644 --- a/core/commands/publish.go +++ b/core/commands/publish.go @@ -6,8 +6,8 @@ import ( cmds "github.com/jbenet/go-ipfs/commands" core "github.com/jbenet/go-ipfs/core" - crypto "github.com/jbenet/go-ipfs/crypto" nsys "github.com/jbenet/go-ipfs/namesys" + crypto "github.com/jbenet/go-ipfs/p2p/crypto" u "github.com/jbenet/go-ipfs/util" ) diff --git a/core/core.go b/core/core.go index f707af311..49140b4de 100644 --- a/core/core.go +++ b/core/core.go @@ -11,7 +11,6 @@ import ( bstore "github.com/jbenet/go-ipfs/blocks/blockstore" bserv "github.com/jbenet/go-ipfs/blockservice" config "github.com/jbenet/go-ipfs/config" - ic "github.com/jbenet/go-ipfs/crypto" diag "github.com/jbenet/go-ipfs/diagnostics" exchange "github.com/jbenet/go-ipfs/exchange" bitswap "github.com/jbenet/go-ipfs/exchange/bitswap" @@ -22,6 +21,7 @@ import ( namesys "github.com/jbenet/go-ipfs/namesys" inet "github.com/jbenet/go-ipfs/net" swarmnet "github.com/jbenet/go-ipfs/net/swarmnet" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" path "github.com/jbenet/go-ipfs/path" pin "github.com/jbenet/go-ipfs/pin" diff --git a/core/mock.go b/core/mock.go index a3d85fedb..069ea157a 100644 --- a/core/mock.go +++ b/core/mock.go @@ -7,11 +7,11 @@ import ( syncds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync" "github.com/jbenet/go-ipfs/blocks/blockstore" blockservice "github.com/jbenet/go-ipfs/blockservice" - ci "github.com/jbenet/go-ipfs/crypto" "github.com/jbenet/go-ipfs/exchange/offline" mdag "github.com/jbenet/go-ipfs/merkledag" nsys "github.com/jbenet/go-ipfs/namesys" "github.com/jbenet/go-ipfs/net/mock" + ci "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" path "github.com/jbenet/go-ipfs/path" dht "github.com/jbenet/go-ipfs/routing/dht" diff --git a/fuse/ipns/ipns_unix.go b/fuse/ipns/ipns_unix.go index 7eabe74c3..3172dd57e 100644 --- a/fuse/ipns/ipns_unix.go +++ b/fuse/ipns/ipns_unix.go @@ -14,9 +14,9 @@ import ( proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" core "github.com/jbenet/go-ipfs/core" - ci "github.com/jbenet/go-ipfs/crypto" chunk "github.com/jbenet/go-ipfs/importer/chunk" mdag "github.com/jbenet/go-ipfs/merkledag" + ci "github.com/jbenet/go-ipfs/p2p/crypto" ft "github.com/jbenet/go-ipfs/unixfs" uio "github.com/jbenet/go-ipfs/unixfs/io" ftpb "github.com/jbenet/go-ipfs/unixfs/pb" diff --git a/namesys/interface.go b/namesys/interface.go index eef1fc32b..c2e39afec 100644 --- a/namesys/interface.go +++ b/namesys/interface.go @@ -3,7 +3,7 @@ package namesys import ( "errors" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" ) // ErrResolveFailed signals an error when attempting to resolve. diff --git a/namesys/namesys.go b/namesys/namesys.go index 2ea9a30bd..cc11d9ddc 100644 --- a/namesys/namesys.go +++ b/namesys/namesys.go @@ -1,7 +1,7 @@ package namesys import ( - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" routing "github.com/jbenet/go-ipfs/routing" ) diff --git a/namesys/publisher.go b/namesys/publisher.go index be838b2f0..75cccf9e4 100644 --- a/namesys/publisher.go +++ b/namesys/publisher.go @@ -10,8 +10,8 @@ import ( proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - ci "github.com/jbenet/go-ipfs/crypto" pb "github.com/jbenet/go-ipfs/namesys/internal/pb" + ci "github.com/jbenet/go-ipfs/p2p/crypto" routing "github.com/jbenet/go-ipfs/routing" u "github.com/jbenet/go-ipfs/util" ) diff --git a/namesys/routing.go b/namesys/routing.go index c990b492b..709f9424c 100644 --- a/namesys/routing.go +++ b/namesys/routing.go @@ -7,8 +7,8 @@ import ( "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - ci "github.com/jbenet/go-ipfs/crypto" pb "github.com/jbenet/go-ipfs/namesys/internal/pb" + ci "github.com/jbenet/go-ipfs/p2p/crypto" routing "github.com/jbenet/go-ipfs/routing" u "github.com/jbenet/go-ipfs/util" ) diff --git a/net/conn/conn.go b/net/conn/conn.go index e6c82f1de..822d6bbb7 100644 --- a/net/conn/conn.go +++ b/net/conn/conn.go @@ -11,7 +11,7 @@ import ( ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" manet "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" eventlog "github.com/jbenet/go-ipfs/util/eventlog" diff --git a/net/conn/interface.go b/net/conn/interface.go index 68187e362..1601da1aa 100644 --- a/net/conn/interface.go +++ b/net/conn/interface.go @@ -5,7 +5,7 @@ import ( "net" "time" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" diff --git a/net/conn/listen.go b/net/conn/listen.go index cfced7ae2..dd6af24ba 100644 --- a/net/conn/listen.go +++ b/net/conn/listen.go @@ -9,7 +9,7 @@ import ( ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" manet "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr-net" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" ) diff --git a/net/conn/secure_conn.go b/net/conn/secure_conn.go index 970560ddd..6d8cca6d5 100644 --- a/net/conn/secure_conn.go +++ b/net/conn/secure_conn.go @@ -8,8 +8,8 @@ import ( msgio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - ic "github.com/jbenet/go-ipfs/crypto" - secio "github.com/jbenet/go-ipfs/crypto/secio" + ic "github.com/jbenet/go-ipfs/p2p/crypto" + secio "github.com/jbenet/go-ipfs/p2p/crypto/secio" peer "github.com/jbenet/go-ipfs/p2p/peer" errors "github.com/jbenet/go-ipfs/util/debugerror" ) diff --git a/net/conn/secure_conn_test.go b/net/conn/secure_conn_test.go index 7b400da06..7e364d12b 100644 --- a/net/conn/secure_conn_test.go +++ b/net/conn/secure_conn_test.go @@ -8,7 +8,7 @@ import ( "testing" "time" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" ) diff --git a/net/mock/interface.go b/net/mock/interface.go index 48b777624..658ac8c65 100644 --- a/net/mock/interface.go +++ b/net/mock/interface.go @@ -10,8 +10,8 @@ import ( "io" "time" - ic "github.com/jbenet/go-ipfs/crypto" inet "github.com/jbenet/go-ipfs/net" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" diff --git a/net/mock/mock_conn.go b/net/mock/mock_conn.go index 5a52957eb..549d9e444 100644 --- a/net/mock/mock_conn.go +++ b/net/mock/mock_conn.go @@ -4,9 +4,9 @@ import ( "container/list" "sync" - ic "github.com/jbenet/go-ipfs/crypto" inet "github.com/jbenet/go-ipfs/net" mux "github.com/jbenet/go-ipfs/net/services/mux" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" diff --git a/net/mock/mock_net.go b/net/mock/mock_net.go index 27919ebb5..3c8a59634 100644 --- a/net/mock/mock_net.go +++ b/net/mock/mock_net.go @@ -4,8 +4,8 @@ import ( "fmt" "sync" - ic "github.com/jbenet/go-ipfs/crypto" inet "github.com/jbenet/go-ipfs/net" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" testutil "github.com/jbenet/go-ipfs/util/testutil" diff --git a/net/mock/mock_peernet.go b/net/mock/mock_peernet.go index b5055127d..13745d143 100644 --- a/net/mock/mock_peernet.go +++ b/net/mock/mock_peernet.go @@ -5,11 +5,11 @@ import ( "math/rand" "sync" - ic "github.com/jbenet/go-ipfs/crypto" inet "github.com/jbenet/go-ipfs/net" ids "github.com/jbenet/go-ipfs/net/services/identify" mux "github.com/jbenet/go-ipfs/net/services/mux" relay "github.com/jbenet/go-ipfs/net/services/relay" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarm/swarm_conn.go b/net/swarm/swarm_conn.go index 50563d147..3ce6acdd3 100644 --- a/net/swarm/swarm_conn.go +++ b/net/swarm/swarm_conn.go @@ -3,8 +3,8 @@ package swarm import ( "fmt" - ic "github.com/jbenet/go-ipfs/crypto" conn "github.com/jbenet/go-ipfs/net/conn" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" diff --git a/net/swarmnet/net.go b/net/swarmnet/net.go index 1766318ab..73190dad3 100644 --- a/net/swarmnet/net.go +++ b/net/swarmnet/net.go @@ -4,7 +4,7 @@ package net import ( "fmt" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" inet "github.com/jbenet/go-ipfs/net" diff --git a/crypto/internal/pb/Makefile b/p2p/crypto/internal/pb/Makefile similarity index 100% rename from crypto/internal/pb/Makefile rename to p2p/crypto/internal/pb/Makefile diff --git a/crypto/internal/pb/crypto.pb.go b/p2p/crypto/internal/pb/crypto.pb.go similarity index 100% rename from crypto/internal/pb/crypto.pb.go rename to p2p/crypto/internal/pb/crypto.pb.go diff --git a/crypto/internal/pb/crypto.proto b/p2p/crypto/internal/pb/crypto.proto similarity index 100% rename from crypto/internal/pb/crypto.proto rename to p2p/crypto/internal/pb/crypto.proto diff --git a/crypto/key.go b/p2p/crypto/key.go similarity index 99% rename from crypto/key.go rename to p2p/crypto/key.go index df9a8b512..78c50dce1 100644 --- a/crypto/key.go +++ b/p2p/crypto/key.go @@ -21,7 +21,7 @@ import ( proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" - pb "github.com/jbenet/go-ipfs/crypto/internal/pb" + pb "github.com/jbenet/go-ipfs/p2p/crypto/internal/pb" u "github.com/jbenet/go-ipfs/util" ) diff --git a/crypto/key_test.go b/p2p/crypto/key_test.go similarity index 97% rename from crypto/key_test.go rename to p2p/crypto/key_test.go index 16b13a2f8..fa2ad7799 100644 --- a/crypto/key_test.go +++ b/p2p/crypto/key_test.go @@ -1,7 +1,7 @@ package crypto_test import ( - . "github.com/jbenet/go-ipfs/crypto" + . "github.com/jbenet/go-ipfs/p2p/crypto" "bytes" tu "github.com/jbenet/go-ipfs/util/testutil" diff --git a/crypto/rsa.go b/p2p/crypto/rsa.go similarity index 97% rename from crypto/rsa.go rename to p2p/crypto/rsa.go index 9f939807d..b308f6856 100644 --- a/crypto/rsa.go +++ b/p2p/crypto/rsa.go @@ -10,7 +10,7 @@ import ( proto "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" - pb "github.com/jbenet/go-ipfs/crypto/internal/pb" + pb "github.com/jbenet/go-ipfs/p2p/crypto/internal/pb" ) type RsaPrivateKey struct { diff --git a/crypto/secio/al.go b/p2p/crypto/secio/al.go similarity index 98% rename from crypto/secio/al.go rename to p2p/crypto/secio/al.go index e9db3ad60..2ca7d2619 100644 --- a/crypto/secio/al.go +++ b/p2p/crypto/secio/al.go @@ -15,7 +15,7 @@ import ( bfish "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.crypto/blowfish" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" ) // List of supported ECDH curves diff --git a/crypto/secio/interface.go b/p2p/crypto/secio/interface.go similarity index 98% rename from crypto/secio/interface.go rename to p2p/crypto/secio/interface.go index 62e3c45ee..934a5fad8 100644 --- a/crypto/secio/interface.go +++ b/p2p/crypto/secio/interface.go @@ -4,7 +4,7 @@ package secio import ( "io" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" msgio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio" diff --git a/crypto/secio/internal/pb/Makefile b/p2p/crypto/secio/internal/pb/Makefile similarity index 100% rename from crypto/secio/internal/pb/Makefile rename to p2p/crypto/secio/internal/pb/Makefile diff --git a/crypto/secio/internal/pb/spipe.pb.go b/p2p/crypto/secio/internal/pb/spipe.pb.go similarity index 100% rename from crypto/secio/internal/pb/spipe.pb.go rename to p2p/crypto/secio/internal/pb/spipe.pb.go diff --git a/crypto/secio/internal/pb/spipe.proto b/p2p/crypto/secio/internal/pb/spipe.proto similarity index 100% rename from crypto/secio/internal/pb/spipe.proto rename to p2p/crypto/secio/internal/pb/spipe.proto diff --git a/crypto/secio/io_test.go b/p2p/crypto/secio/io_test.go similarity index 100% rename from crypto/secio/io_test.go rename to p2p/crypto/secio/io_test.go diff --git a/crypto/secio/pb/Makefile b/p2p/crypto/secio/pb/Makefile similarity index 100% rename from crypto/secio/pb/Makefile rename to p2p/crypto/secio/pb/Makefile diff --git a/crypto/secio/pb/spipe.pb.go b/p2p/crypto/secio/pb/spipe.pb.go similarity index 100% rename from crypto/secio/pb/spipe.pb.go rename to p2p/crypto/secio/pb/spipe.pb.go diff --git a/crypto/secio/pb/spipe.proto b/p2p/crypto/secio/pb/spipe.proto similarity index 100% rename from crypto/secio/pb/spipe.proto rename to p2p/crypto/secio/pb/spipe.proto diff --git a/crypto/secio/protocol.go b/p2p/crypto/secio/protocol.go similarity index 98% rename from crypto/secio/protocol.go rename to p2p/crypto/secio/protocol.go index 609320b3d..503c09149 100644 --- a/crypto/secio/protocol.go +++ b/p2p/crypto/secio/protocol.go @@ -10,8 +10,8 @@ import ( context "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" msgio "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-msgio" - ci "github.com/jbenet/go-ipfs/crypto" - pb "github.com/jbenet/go-ipfs/crypto/secio/internal/pb" + ci "github.com/jbenet/go-ipfs/p2p/crypto" + pb "github.com/jbenet/go-ipfs/p2p/crypto/secio/internal/pb" peer "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" eventlog "github.com/jbenet/go-ipfs/util/eventlog" diff --git a/crypto/secio/rw.go b/p2p/crypto/secio/rw.go similarity index 100% rename from crypto/secio/rw.go rename to p2p/crypto/secio/rw.go diff --git a/p2p/peer/peer.go b/p2p/peer/peer.go index 9d57f9811..fa4e448d6 100644 --- a/p2p/peer/peer.go +++ b/p2p/peer/peer.go @@ -9,7 +9,7 @@ import ( ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" mh "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multihash" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" u "github.com/jbenet/go-ipfs/util" ) diff --git a/p2p/peer/peer_test.go b/p2p/peer/peer_test.go index e8d1d29f3..b19d0faef 100644 --- a/p2p/peer/peer_test.go +++ b/p2p/peer/peer_test.go @@ -6,8 +6,8 @@ import ( "strings" "testing" - ic "github.com/jbenet/go-ipfs/crypto" - . "github.com/jbenet/go-ipfs/peer" + ic "github.com/jbenet/go-ipfs/p2p/crypto" + . "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" tu "github.com/jbenet/go-ipfs/util/testutil" diff --git a/p2p/peer/peerstore.go b/p2p/peer/peerstore.go index 46de50f0d..1a75a6843 100644 --- a/p2p/peer/peerstore.go +++ b/p2p/peer/peerstore.go @@ -4,7 +4,7 @@ import ( "errors" "sync" - ic "github.com/jbenet/go-ipfs/crypto" + ic "github.com/jbenet/go-ipfs/p2p/crypto" ds "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore" dssync "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-datastore/sync" diff --git a/routing/dht/records.go b/routing/dht/records.go index 0d7e91c6f..0791f80a3 100644 --- a/routing/dht/records.go +++ b/routing/dht/records.go @@ -9,7 +9,7 @@ import ( "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/go.net/context" "github.com/jbenet/go-ipfs/Godeps/_workspace/src/code.google.com/p/goprotobuf/proto" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" "github.com/jbenet/go-ipfs/p2p/peer" pb "github.com/jbenet/go-ipfs/routing/dht/pb" u "github.com/jbenet/go-ipfs/util" diff --git a/routing/kbucket/sorting.go b/routing/kbucket/sorting.go index a3a68767b..7995b39ed 100644 --- a/routing/kbucket/sorting.go +++ b/routing/kbucket/sorting.go @@ -2,7 +2,7 @@ package kbucket import ( "container/list" - peer "github.com/jbenet/go-ipfs/peer" + peer "github.com/jbenet/go-ipfs/p2p/peer" "sort" ) diff --git a/util/testutil/gen.go b/util/testutil/gen.go index 1f70cb39a..ddd76523e 100644 --- a/util/testutil/gen.go +++ b/util/testutil/gen.go @@ -9,7 +9,7 @@ import ( "sync" "testing" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" u "github.com/jbenet/go-ipfs/util" diff --git a/util/testutil/identity.go b/util/testutil/identity.go index b2f50d878..f1ab232cf 100644 --- a/util/testutil/identity.go +++ b/util/testutil/identity.go @@ -4,7 +4,7 @@ import ( "testing" ma "github.com/jbenet/go-ipfs/Godeps/_workspace/src/github.com/jbenet/go-multiaddr" - ci "github.com/jbenet/go-ipfs/crypto" + ci "github.com/jbenet/go-ipfs/p2p/crypto" peer "github.com/jbenet/go-ipfs/p2p/peer" )