diff --git a/api/version_vars.go b/api/version_vars.go index 158d3df9e628bc4966be47b94441bf79cffb1e3f..651c39e4b67f994628dd2d04d553a270815675a9 100644 --- a/api/version_vars.go +++ b/api/version_vars.go @@ -12,7 +12,7 @@ go 1.13 require ( github.com/cloudflare/circl v1.0.1-0.20211008185751-59b49bc148ce github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 - github.com/golang/protobuf v1.5.2 + google.golang.org/protobuf v1.5.2 github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/magiconair/properties v1.8.4 // indirect github.com/mitchellh/mapstructure v1.4.0 // indirect diff --git a/fileTransfer/manager_test.go b/fileTransfer/manager_test.go index 63952f154487962fc6e504c56d58f6d0d00cda02..86a68d7c34f6d3cc59bdaa1f912b4b3a4cdb6040 100644 --- a/fileTransfer/manager_test.go +++ b/fileTransfer/manager_test.go @@ -12,7 +12,6 @@ import ( "errors" "fmt" "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" @@ -24,6 +23,7 @@ import ( "gitlab.com/elixxir/ekv" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "reflect" "strings" "sync" diff --git a/fileTransfer/receiveNew.go b/fileTransfer/receiveNew.go index 67f3ce3e44570f4f6647c69b7ba098f965b19c62..915058937f116acd345e51bded87e77d74ec0050 100644 --- a/fileTransfer/receiveNew.go +++ b/fileTransfer/receiveNew.go @@ -8,13 +8,13 @@ package fileTransfer import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/stoppable" ftCrypto "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" ) // Error messages. diff --git a/fileTransfer/receiveNew_test.go b/fileTransfer/receiveNew_test.go index 4aea311faa6e0fedadf6f627e8f4b43eb544753e..1e0421e400bdd6f1e10f8a20cc8f7b6ef04a58a0 100644 --- a/fileTransfer/receiveNew_test.go +++ b/fileTransfer/receiveNew_test.go @@ -9,11 +9,11 @@ package fileTransfer import ( "bytes" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/stoppable" ftCrypto "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "strings" "testing" "time" diff --git a/fileTransfer/sendNew.go b/fileTransfer/sendNew.go index b28fe263958c3ff5b95455faee9f3623f44267b1..89442d6d0fc150702de7c69ec5a094c850bb93e1 100644 --- a/fileTransfer/sendNew.go +++ b/fileTransfer/sendNew.go @@ -8,12 +8,12 @@ package fileTransfer import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" ftCrypto "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" ) // Error messages. diff --git a/fileTransfer/sendNew_test.go b/fileTransfer/sendNew_test.go index 8a4da00a6d666001813c728311496ba39fcf9a1b..55375fa48d7b2d50454e4ca198f5b2b6ee5034c6 100644 --- a/fileTransfer/sendNew_test.go +++ b/fileTransfer/sendNew_test.go @@ -10,7 +10,6 @@ package fileTransfer import ( "fmt" "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" util "gitlab.com/elixxir/client/storage/utility" @@ -18,6 +17,7 @@ import ( ftCrypto "gitlab.com/elixxir/crypto/fileTransfer" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "reflect" "strings" "testing" diff --git a/go.mod b/go.mod index ace1b8669aaef1ed2444684ef009fdec7be7ab10..937a84155ff31ccbbb71712e03332b3022c819a5 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,6 @@ go 1.17 require ( github.com/cloudflare/circl v1.0.1-0.20211008185751-59b49bc148ce github.com/golang-collections/collections v0.0.0-20130729185459-604e922904d3 - github.com/golang/protobuf v1.5.2 github.com/nfnt/resize v0.0.0-20180221191011-83c6a9932646 github.com/pkg/errors v0.9.1 github.com/spf13/cobra v1.1.1 @@ -29,6 +28,7 @@ require ( github.com/badoux/checkmail v1.2.1 // indirect github.com/elliotchance/orderedmap v1.4.0 // indirect github.com/fsnotify/fsnotify v1.4.9 // indirect + github.com/golang/protobuf v1.5.2 // indirect github.com/gopherjs/gopherjs v0.0.0-20200217142428-fce0ec30dd00 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect diff --git a/go.sum b/go.sum index 795c70ec5c69650fb0f2e25140b02390f7e18835..51ac499080049c1e278da5463139bd4b817edfd7 100644 --- a/go.sum +++ b/go.sum @@ -361,7 +361,6 @@ golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81R golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd h1:O7DYs+zxREGLKzKoMQrtrEacpb0ZVXA5rIwylE2Xchk= golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk= @@ -400,18 +399,18 @@ golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210902050250-f475640dd07b h1:S7hKs0Flbq0bbc9xgYt4stIEG1zNDFqyrPwAX2Wj/sE= golang.org/x/sys v0.0.0-20210902050250-f475640dd07b/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220207234003-57398862261d h1:Bm7BNOQt2Qv7ZqysjeLjgCBanX+88Z/OtdvsrEv1Djc= golang.org/x/sys v0.0.0-20220207234003-57398862261d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= @@ -459,8 +458,6 @@ google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBr google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= -google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1 h1:Zk6zlGXdtYdcY5TL+VrbTfmifvk3VvsXopCpszsHPBA= -google.golang.org/genproto v0.0.0-20210105202744-fe13368bc0e1/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068 h1:pwzFiZfBTH/GjBWz1BcDwMBaHBo8mZvpLa7eBKJpFAk= google.golang.org/genproto v0.0.0-20220208230804-65c12eb4c068/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= @@ -475,8 +472,6 @@ google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM= -google.golang.org/grpc v1.42.0 h1:XT2/MFpuPFsEX2fWh3YQtHkZ+WYZFQRfaUgLZYj/p6A= -google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/grpc v1.44.0 h1:weqSxi/TMs1SqFRMHCtBgXRs8k3X39QIDEZ0pRcttUg= google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -487,7 +482,6 @@ google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzi google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= -google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= diff --git a/groupChat/receiveRequest.go b/groupChat/receiveRequest.go index 844b86249e593bdd5532bda0ed480058804e5b61..8107eaa95284d6ed35734fe7c73104078b79f6a6 100644 --- a/groupChat/receiveRequest.go +++ b/groupChat/receiveRequest.go @@ -8,13 +8,13 @@ package groupChat import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" gs "gitlab.com/elixxir/client/groupChat/groupStore" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/stoppable" "gitlab.com/elixxir/crypto/group" + "google.golang.org/protobuf/proto" "time" ) diff --git a/groupChat/receiveRequest_test.go b/groupChat/receiveRequest_test.go index 0e51cfdc8f78889241dee5696a198e1643f058af..e1aee12d01aa1a91df27336e3db6f11a0506fe6f 100644 --- a/groupChat/receiveRequest_test.go +++ b/groupChat/receiveRequest_test.go @@ -9,12 +9,12 @@ package groupChat import ( "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" gs "gitlab.com/elixxir/client/groupChat/groupStore" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/stoppable" util "gitlab.com/elixxir/client/storage/utility" + "google.golang.org/protobuf/proto" "math/rand" "reflect" "strings" diff --git a/groupChat/sendRequests.go b/groupChat/sendRequests.go index 555fd2c5e0cfc891ba8cf37877e6dc72353aebf3..d2df47388f568f8a828259b2ef208980b2f2fa2d 100644 --- a/groupChat/sendRequests.go +++ b/groupChat/sendRequests.go @@ -8,7 +8,6 @@ package groupChat import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" gs "gitlab.com/elixxir/client/groupChat/groupStore" @@ -16,6 +15,7 @@ import ( "gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/crypto/group" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "strings" ) @@ -117,10 +117,9 @@ func (m Manager) sendRequest(memberID *id.ID, request []byte) ([]id.Round, error MessageType: message.GroupCreationRequest, } - recipent, err := m.store.E2e().GetPartner(memberID) - if err!=nil{ - return nil, errors.WithMessagef(err,"Failed to send request to %s " + + if err != nil { + return nil, errors.WithMessagef(err, "Failed to send request to %s "+ "because e2e relationship could not be found", memberID) } diff --git a/groupChat/sendRequests_test.go b/groupChat/sendRequests_test.go index 9f2b9c19f2eb2c65dd51d3f66e3dc512cfe991b3..a3da2764f05e6453863d483781d8980489606d39 100644 --- a/groupChat/sendRequests_test.go +++ b/groupChat/sendRequests_test.go @@ -10,13 +10,13 @@ package groupChat import ( "fmt" "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" util "gitlab.com/elixxir/client/storage/utility" "gitlab.com/elixxir/crypto/diffieHellman" "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "math/rand" "reflect" "sort" @@ -38,7 +38,7 @@ func TestManager_ResendRequest(t *testing.T) { Created: g.Created.UnixNano(), } - for i := range g.Members{ + for i := range g.Members { grp := m.store.E2e().GetGroup() dhKey := grp.NewInt(int64(i + 42)) pubKey := diffieHellman.GeneratePublicKey(dhKey, grp) @@ -60,7 +60,6 @@ func TestManager_ResendRequest(t *testing.T) { t.Errorf("ResendRequest() returned an error: %+v", err) } - if status != AllSent { t.Errorf("ResendRequest() failed to return the expected status."+ "\nexpected: %s\nreceived: %s", AllSent, status) @@ -135,7 +134,7 @@ func TestManager_sendRequests(t *testing.T) { Created: g.Created.UnixNano(), } - for i := range g.Members{ + for i := range g.Members { grp := m.store.E2e().GetGroup() dhKey := grp.NewInt(int64(i + 42)) pubKey := diffieHellman.GeneratePublicKey(dhKey, grp) @@ -235,7 +234,7 @@ func TestManager_sendRequests_SendPartialSent(t *testing.T) { expectedErr := fmt.Sprintf(sendRequestPartialErr, (len(g.Members)-1)/2, len(g.Members)-1, "") - for i := range g.Members{ + for i := range g.Members { grp := m.store.E2e().GetGroup() dhKey := grp.NewInt(int64(i + 42)) pubKey := diffieHellman.GeneratePublicKey(dhKey, grp) @@ -274,7 +273,7 @@ func TestManager_sendRequest(t *testing.T) { prng := rand.New(rand.NewSource(42)) m, g := newTestManagerWithStore(prng, 10, 0, nil, nil, t) - for i := range g.Members{ + for i := range g.Members { grp := m.store.E2e().GetGroup() dhKey := grp.NewInt(int64(i + 42)) pubKey := diffieHellman.GeneratePublicKey(dhKey, grp) @@ -332,7 +331,6 @@ func TestManager_sendRequest_SendE2eError(t *testing.T) { t.Errorf("Failed to add partner %s: %+v", recipientID, err) } - _, err = m.sendRequest(recipientID, nil) if err == nil || !strings.Contains(err.Error(), expectedErr) { t.Errorf("sendRequest() failed to return the expected error."+ diff --git a/keyExchange/confirm.go b/keyExchange/confirm.go index 4c21f77db86638f24a50fcf65b65001e71e081c9..018b7c4671cece89c00b65a3e0851e5857d58966 100644 --- a/keyExchange/confirm.go +++ b/keyExchange/confirm.go @@ -8,13 +8,13 @@ package keyExchange import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/stoppable" "gitlab.com/elixxir/client/storage" "gitlab.com/elixxir/client/storage/e2e" + "google.golang.org/protobuf/proto" ) func startConfirm(sess *storage.Session, c chan message.Receive, diff --git a/keyExchange/confirm_test.go b/keyExchange/confirm_test.go index 08b539a059b6de7c5d1c6251a03febe430992333..0fa0a20d582a495656476c6d058ceb846c227f70 100644 --- a/keyExchange/confirm_test.go +++ b/keyExchange/confirm_test.go @@ -9,13 +9,13 @@ package keyExchange import ( "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" "gitlab.com/elixxir/client/storage/e2e" util "gitlab.com/elixxir/client/storage/utility" "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/netTime" + "google.golang.org/protobuf/proto" "math/rand" "testing" ) diff --git a/keyExchange/exchange_test.go b/keyExchange/exchange_test.go index 7bf6cbad9404705246738f207e3a613a7a81f7af..58ac5e9468925d5f54c25fe47f73b3f50fce6b63 100644 --- a/keyExchange/exchange_test.go +++ b/keyExchange/exchange_test.go @@ -10,7 +10,6 @@ package keyExchange import ( "fmt" "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces/message" "gitlab.com/elixxir/client/interfaces/params" @@ -22,6 +21,7 @@ import ( "gitlab.com/xx_network/crypto/csprng" "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/netTime" + "google.golang.org/protobuf/proto" "math/rand" "testing" "time" diff --git a/keyExchange/rekey.go b/keyExchange/rekey.go index 04bb31413af965f621884a01ab0f557c632ec504..5cbefab31d59f8981834bda9b1914848784acbee 100644 --- a/keyExchange/rekey.go +++ b/keyExchange/rekey.go @@ -9,7 +9,6 @@ package keyExchange import ( "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces" @@ -24,6 +23,7 @@ import ( ds "gitlab.com/elixxir/comms/network/dataStructures" "gitlab.com/elixxir/crypto/diffieHellman" "gitlab.com/elixxir/primitives/states" + "google.golang.org/protobuf/proto" "time" ) @@ -164,8 +164,8 @@ func negotiate(instance *network.Instance, sendE2E interfaces.SendE2E, session, msgID) err = session.TrySetNegotiationStatus(e2e.Sent) if err != nil { - if (session.NegotiationStatus() == e2e.NewSessionTriggered) { - msg := fmt.Sprintf("All channels exhausted for %s, " + + if session.NegotiationStatus() == e2e.NewSessionTriggered { + msg := fmt.Sprintf("All channels exhausted for %s, "+ "rekey impossible.", session) return errors.WithMessage(err, msg) } diff --git a/keyExchange/trigger.go b/keyExchange/trigger.go index fcdb71aa93fc535ac879696ebe36a86d6045de87..5657b06a09a82d0a31c77b77206fdcd813e1f4fd 100644 --- a/keyExchange/trigger.go +++ b/keyExchange/trigger.go @@ -10,7 +10,6 @@ package keyExchange import ( "fmt" "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces" @@ -24,6 +23,7 @@ import ( ds "gitlab.com/elixxir/comms/network/dataStructures" "gitlab.com/elixxir/crypto/cyclic" "gitlab.com/elixxir/primitives/states" + "google.golang.org/protobuf/proto" ) const ( @@ -69,7 +69,7 @@ func handleTrigger(sess *storage.Session, net interfaces.NetworkManager, } //unmarshal the message - oldSessionID, PartnerPublicKey, PartnerSIDHPublicKey, err := (unmarshalSource(sess.E2e().GetGroup(), request.Payload)) + oldSessionID, PartnerPublicKey, PartnerSIDHPublicKey, err := unmarshalSource(sess.E2e().GetGroup(), request.Payload) if err != nil { jww.ERROR.Printf("[REKEY] could not unmarshal partner %s: %s", request.Sender, err) diff --git a/keyExchange/utils_test.go b/keyExchange/utils_test.go index a6b5afeadb04344c5550281e97ff4ca63c26e3c1..5e33783b5c85a2bdab81103404cbdabdb9d87269 100644 --- a/keyExchange/utils_test.go +++ b/keyExchange/utils_test.go @@ -9,7 +9,6 @@ package keyExchange import ( "github.com/cloudflare/circl/dh/sidh" - "github.com/golang/protobuf/proto" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/interfaces" "gitlab.com/elixxir/client/interfaces/message" @@ -31,6 +30,7 @@ import ( "gitlab.com/xx_network/primitives/id/ephemeral" "gitlab.com/xx_network/primitives/ndf" "gitlab.com/xx_network/primitives/netTime" + "google.golang.org/protobuf/proto" "math/rand" "testing" "time" diff --git a/network/node/register.go b/network/node/register.go index 4336575dee390d0b948b914595d9bb15cfafd5bd..c80d5af66ce90f518417807084ac2d451fa0f72e 100644 --- a/network/node/register.go +++ b/network/node/register.go @@ -10,7 +10,6 @@ package node import ( "crypto/sha256" "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/network/gateway" @@ -33,6 +32,7 @@ import ( "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/ndf" "gitlab.com/xx_network/primitives/netTime" + "google.golang.org/protobuf/proto" "strconv" "sync" "time" diff --git a/registration/register.go b/registration/register.go index 57b6cf8f2003b0323d96d9b53aff9dc6e0f1ac2c..30b64104175253341df2033bece81efda8fb3c8b 100644 --- a/registration/register.go +++ b/registration/register.go @@ -8,12 +8,12 @@ package registration import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" pb "gitlab.com/elixxir/comms/mixmessages" "gitlab.com/elixxir/crypto/registration" "gitlab.com/xx_network/comms/connect" "gitlab.com/xx_network/crypto/signature/rsa" + "google.golang.org/protobuf/proto" ) func (perm *Registration) Register(transmissionPublicKey, receptionPublicKey *rsa.PublicKey, diff --git a/registration/register_test.go b/registration/register_test.go index d7b95baf4e4581ca96f56605e43eb043a628e46e..07e1c98adf645208db8510c35843d037a5bcbe47 100644 --- a/registration/register_test.go +++ b/registration/register_test.go @@ -9,7 +9,6 @@ package registration import ( "bytes" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" pb "gitlab.com/elixxir/comms/mixmessages" "gitlab.com/elixxir/comms/testkeys" @@ -19,6 +18,7 @@ import ( "gitlab.com/xx_network/crypto/signature/rsa" "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/utils" + "google.golang.org/protobuf/proto" "testing" "time" ) diff --git a/storage/rounds/uncheckedRounds.go b/storage/rounds/uncheckedRounds.go index 58140e461bcc1f9603a8f8eef2e23d598da26ba4..9dc35360329c583899cbf3eec5ebc3246975a817 100644 --- a/storage/rounds/uncheckedRounds.go +++ b/storage/rounds/uncheckedRounds.go @@ -10,7 +10,6 @@ package rounds import ( "bytes" "encoding/binary" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/storage/versioned" @@ -18,6 +17,7 @@ import ( "gitlab.com/xx_network/primitives/id" "gitlab.com/xx_network/primitives/id/ephemeral" "gitlab.com/xx_network/primitives/netTime" + "google.golang.org/protobuf/proto" "sync" "testing" "time" diff --git a/ud/generate.sh b/ud/generate.sh index f8e0ec99843d0d39bf12b63f145d81a8df1bc99d..1e09079e15325120ba2c6172de7aa98d597622ed 100755 --- a/ud/generate.sh +++ b/ud/generate.sh @@ -1,3 +1,3 @@ #!/bin/bash -protoc --go_out=. udMessages.proto +protoc --go_out=paths=source_relative:. udMessages.proto diff --git a/ud/lookup.go b/ud/lookup.go index 2dc2dd2a8724227423df2ff028809746aa49cc8f..a93ba4eee97355986b50f7900ac12356eb8cf042 100644 --- a/ud/lookup.go +++ b/ud/lookup.go @@ -1,12 +1,12 @@ package ud import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/primitives/fact" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "time" ) diff --git a/ud/lookup_test.go b/ud/lookup_test.go index 63cb7ab60c07c3b5740ab676a3579667192025c3..ddc82e01d5ba6cd6c056b79f58a3281a8104b826 100644 --- a/ud/lookup_test.go +++ b/ud/lookup_test.go @@ -1,7 +1,6 @@ package ud import ( - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "gitlab.com/elixxir/client/single" "gitlab.com/elixxir/client/stoppable" @@ -11,6 +10,7 @@ import ( "gitlab.com/elixxir/crypto/cyclic" "gitlab.com/xx_network/crypto/large" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "math/rand" "reflect" "strings" diff --git a/ud/search.go b/ud/search.go index e8db5749ace91b445f56b7f71ace9c8b5165b886..a9b940bf5fdc50790974547116ac920ec5c0ee8a 100644 --- a/ud/search.go +++ b/ud/search.go @@ -2,13 +2,13 @@ package ud import ( "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/crypto/contact" "gitlab.com/elixxir/crypto/factID" "gitlab.com/elixxir/primitives/fact" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "time" ) diff --git a/ud/search_test.go b/ud/search_test.go index d0a1edfb9c9dbd1623ae5e5b9e1234c421c87b44..f893374c943924442aec16774ea23a704992a147 100644 --- a/ud/search_test.go +++ b/ud/search_test.go @@ -2,7 +2,6 @@ package ud import ( "fmt" - "github.com/golang/protobuf/proto" "github.com/pkg/errors" "gitlab.com/elixxir/client/single" "gitlab.com/elixxir/client/stoppable" @@ -14,6 +13,7 @@ import ( "gitlab.com/elixxir/primitives/fact" "gitlab.com/xx_network/crypto/large" "gitlab.com/xx_network/primitives/id" + "google.golang.org/protobuf/proto" "math/rand" "reflect" "strings" diff --git a/ud/udMessages.pb.go b/ud/udMessages.pb.go index 0aae2063325f57b73c42ff53e30020225aefcd7e..cb79580876ab2cf70ad34e8bb644f3d7eb3493b7 100644 --- a/ud/udMessages.pb.go +++ b/ud/udMessages.pb.go @@ -1,69 +1,86 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright © 2020 xx network SEZC // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file // +/////////////////////////////////////////////////////////////////////////////// + +// Call ./generate.sh to generate the protocol buffer code + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.19.1 // source: udMessages.proto package ud import ( - fmt "fmt" - proto "github.com/golang/protobuf/proto" - math "math" + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" ) -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package +const ( + // Verify that this generated code is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) + // Verify that runtime/protoimpl is sufficiently up-to-date. + _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) +) // Contains the Hash and its Type type HashFact struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` - Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *HashFact) Reset() { *m = HashFact{} } -func (m *HashFact) String() string { return proto.CompactTextString(m) } -func (*HashFact) ProtoMessage() {} -func (*HashFact) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{0} + Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` + Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` } -func (m *HashFact) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_HashFact.Unmarshal(m, b) -} -func (m *HashFact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_HashFact.Marshal(b, m, deterministic) -} -func (m *HashFact) XXX_Merge(src proto.Message) { - xxx_messageInfo_HashFact.Merge(m, src) +func (x *HashFact) Reset() { + *x = HashFact{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *HashFact) XXX_Size() int { - return xxx_messageInfo_HashFact.Size(m) + +func (x *HashFact) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *HashFact) XXX_DiscardUnknown() { - xxx_messageInfo_HashFact.DiscardUnknown(m) + +func (*HashFact) ProtoMessage() {} + +func (x *HashFact) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_HashFact proto.InternalMessageInfo +// Deprecated: Use HashFact.ProtoReflect.Descriptor instead. +func (*HashFact) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{0} +} -func (m *HashFact) GetHash() []byte { - if m != nil { - return m.Hash +func (x *HashFact) GetHash() []byte { + if x != nil { + return x.Hash } return nil } -func (m *HashFact) GetType() int32 { - if m != nil { - return m.Type +func (x *HashFact) GetType() int32 { + if x != nil { + return x.Type } return 0 } @@ -71,285 +88,457 @@ func (m *HashFact) GetType() int32 { // Describes a user lookup result. The ID, public key, and the // facts inputted that brought up this user. type Contact struct { - UserID []byte `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` - PubKey []byte `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"` - Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` - TrigFacts []*HashFact `protobuf:"bytes,4,rep,name=trigFacts,proto3" json:"trigFacts,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *Contact) Reset() { *m = Contact{} } -func (m *Contact) String() string { return proto.CompactTextString(m) } -func (*Contact) ProtoMessage() {} -func (*Contact) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{1} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + UserID []byte `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` + PubKey []byte `protobuf:"bytes,2,opt,name=pubKey,proto3" json:"pubKey,omitempty"` + Username string `protobuf:"bytes,3,opt,name=username,proto3" json:"username,omitempty"` + TrigFacts []*HashFact `protobuf:"bytes,4,rep,name=trigFacts,proto3" json:"trigFacts,omitempty"` +} + +func (x *Contact) Reset() { + *x = Contact{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[1] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *Contact) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_Contact.Unmarshal(m, b) -} -func (m *Contact) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_Contact.Marshal(b, m, deterministic) -} -func (m *Contact) XXX_Merge(src proto.Message) { - xxx_messageInfo_Contact.Merge(m, src) +func (x *Contact) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *Contact) XXX_Size() int { - return xxx_messageInfo_Contact.Size(m) -} -func (m *Contact) XXX_DiscardUnknown() { - xxx_messageInfo_Contact.DiscardUnknown(m) + +func (*Contact) ProtoMessage() {} + +func (x *Contact) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[1] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_Contact proto.InternalMessageInfo +// Deprecated: Use Contact.ProtoReflect.Descriptor instead. +func (*Contact) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{1} +} -func (m *Contact) GetUserID() []byte { - if m != nil { - return m.UserID +func (x *Contact) GetUserID() []byte { + if x != nil { + return x.UserID } return nil } -func (m *Contact) GetPubKey() []byte { - if m != nil { - return m.PubKey +func (x *Contact) GetPubKey() []byte { + if x != nil { + return x.PubKey } return nil } -func (m *Contact) GetUsername() string { - if m != nil { - return m.Username +func (x *Contact) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *Contact) GetTrigFacts() []*HashFact { - if m != nil { - return m.TrigFacts +func (x *Contact) GetTrigFacts() []*HashFact { + if x != nil { + return x.TrigFacts } return nil } // Message sent to UDB to search for users type SearchSend struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // PublicKey used in the registration - Fact []*HashFact `protobuf:"bytes,1,rep,name=fact,proto3" json:"fact,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Fact []*HashFact `protobuf:"bytes,1,rep,name=fact,proto3" json:"fact,omitempty"` } -func (m *SearchSend) Reset() { *m = SearchSend{} } -func (m *SearchSend) String() string { return proto.CompactTextString(m) } -func (*SearchSend) ProtoMessage() {} -func (*SearchSend) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{2} +func (x *SearchSend) Reset() { + *x = SearchSend{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SearchSend) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SearchSend.Unmarshal(m, b) +func (x *SearchSend) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SearchSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SearchSend.Marshal(b, m, deterministic) -} -func (m *SearchSend) XXX_Merge(src proto.Message) { - xxx_messageInfo_SearchSend.Merge(m, src) -} -func (m *SearchSend) XXX_Size() int { - return xxx_messageInfo_SearchSend.Size(m) -} -func (m *SearchSend) XXX_DiscardUnknown() { - xxx_messageInfo_SearchSend.DiscardUnknown(m) + +func (*SearchSend) ProtoMessage() {} + +func (x *SearchSend) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[2] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SearchSend proto.InternalMessageInfo +// Deprecated: Use SearchSend.ProtoReflect.Descriptor instead. +func (*SearchSend) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{2} +} -func (m *SearchSend) GetFact() []*HashFact { - if m != nil { - return m.Fact +func (x *SearchSend) GetFact() []*HashFact { + if x != nil { + return x.Fact } return nil } // Message sent from UDB to client in response to a search type SearchResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + // ID of the session created - Contacts []*Contact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Contacts []*Contact `protobuf:"bytes,1,rep,name=contacts,proto3" json:"contacts,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } -func (m *SearchResponse) Reset() { *m = SearchResponse{} } -func (m *SearchResponse) String() string { return proto.CompactTextString(m) } -func (*SearchResponse) ProtoMessage() {} -func (*SearchResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{3} +func (x *SearchResponse) Reset() { + *x = SearchResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *SearchResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SearchResponse.Unmarshal(m, b) -} -func (m *SearchResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SearchResponse.Marshal(b, m, deterministic) -} -func (m *SearchResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SearchResponse.Merge(m, src) -} -func (m *SearchResponse) XXX_Size() int { - return xxx_messageInfo_SearchResponse.Size(m) +func (x *SearchResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *SearchResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SearchResponse.DiscardUnknown(m) + +func (*SearchResponse) ProtoMessage() {} + +func (x *SearchResponse) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_SearchResponse proto.InternalMessageInfo +// Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead. +func (*SearchResponse) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{3} +} -func (m *SearchResponse) GetContacts() []*Contact { - if m != nil { - return m.Contacts +func (x *SearchResponse) GetContacts() []*Contact { + if x != nil { + return x.Contacts } return nil } -func (m *SearchResponse) GetError() string { - if m != nil { - return m.Error +func (x *SearchResponse) GetError() string { + if x != nil { + return x.Error } return "" } // Message sent to UDB for looking up a user type LookupSend struct { - UserID []byte `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LookupSend) Reset() { *m = LookupSend{} } -func (m *LookupSend) String() string { return proto.CompactTextString(m) } -func (*LookupSend) ProtoMessage() {} -func (*LookupSend) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{4} + UserID []byte `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` } -func (m *LookupSend) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LookupSend.Unmarshal(m, b) -} -func (m *LookupSend) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LookupSend.Marshal(b, m, deterministic) -} -func (m *LookupSend) XXX_Merge(src proto.Message) { - xxx_messageInfo_LookupSend.Merge(m, src) +func (x *LookupSend) Reset() { + *x = LookupSend{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LookupSend) XXX_Size() int { - return xxx_messageInfo_LookupSend.Size(m) + +func (x *LookupSend) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LookupSend) XXX_DiscardUnknown() { - xxx_messageInfo_LookupSend.DiscardUnknown(m) + +func (*LookupSend) ProtoMessage() {} + +func (x *LookupSend) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LookupSend proto.InternalMessageInfo +// Deprecated: Use LookupSend.ProtoReflect.Descriptor instead. +func (*LookupSend) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{4} +} -func (m *LookupSend) GetUserID() []byte { - if m != nil { - return m.UserID +func (x *LookupSend) GetUserID() []byte { + if x != nil { + return x.UserID } return nil } // Message sent from UDB for looking up a user type LookupResponse struct { - PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"` - Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields -func (m *LookupResponse) Reset() { *m = LookupResponse{} } -func (m *LookupResponse) String() string { return proto.CompactTextString(m) } -func (*LookupResponse) ProtoMessage() {} -func (*LookupResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9e0cfdc16fb09bb6, []int{5} + PubKey []byte `protobuf:"bytes,1,opt,name=pubKey,proto3" json:"pubKey,omitempty"` + Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` } -func (m *LookupResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_LookupResponse.Unmarshal(m, b) -} -func (m *LookupResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_LookupResponse.Marshal(b, m, deterministic) -} -func (m *LookupResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_LookupResponse.Merge(m, src) +func (x *LookupResponse) Reset() { + *x = LookupResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_udMessages_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *LookupResponse) XXX_Size() int { - return xxx_messageInfo_LookupResponse.Size(m) + +func (x *LookupResponse) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *LookupResponse) XXX_DiscardUnknown() { - xxx_messageInfo_LookupResponse.DiscardUnknown(m) + +func (*LookupResponse) ProtoMessage() {} + +func (x *LookupResponse) ProtoReflect() protoreflect.Message { + mi := &file_udMessages_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) } -var xxx_messageInfo_LookupResponse proto.InternalMessageInfo +// Deprecated: Use LookupResponse.ProtoReflect.Descriptor instead. +func (*LookupResponse) Descriptor() ([]byte, []int) { + return file_udMessages_proto_rawDescGZIP(), []int{5} +} -func (m *LookupResponse) GetPubKey() []byte { - if m != nil { - return m.PubKey +func (x *LookupResponse) GetPubKey() []byte { + if x != nil { + return x.PubKey } return nil } -func (m *LookupResponse) GetUsername() string { - if m != nil { - return m.Username +func (x *LookupResponse) GetUsername() string { + if x != nil { + return x.Username } return "" } -func (m *LookupResponse) GetError() string { - if m != nil { - return m.Error +func (x *LookupResponse) GetError() string { + if x != nil { + return x.Error } return "" } -func init() { - proto.RegisterType((*HashFact)(nil), "parse.HashFact") - proto.RegisterType((*Contact)(nil), "parse.Contact") - proto.RegisterType((*SearchSend)(nil), "parse.SearchSend") - proto.RegisterType((*SearchResponse)(nil), "parse.SearchResponse") - proto.RegisterType((*LookupSend)(nil), "parse.LookupSend") - proto.RegisterType((*LookupResponse)(nil), "parse.LookupResponse") -} - -func init() { - proto.RegisterFile("udMessages.proto", fileDescriptor_9e0cfdc16fb09bb6) -} - -var fileDescriptor_9e0cfdc16fb09bb6 = []byte{ - // 283 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0x41, 0x4b, 0xc3, 0x40, - 0x10, 0x85, 0xd9, 0x36, 0xad, 0xe9, 0x58, 0xa2, 0x2c, 0x22, 0xc1, 0x53, 0x58, 0x3d, 0x04, 0xc1, - 0x80, 0xf5, 0x1f, 0xa8, 0x88, 0xa2, 0x5e, 0xb6, 0xb7, 0xde, 0xb6, 0xc9, 0xd8, 0x88, 0x98, 0x5d, - 0x76, 0x36, 0x87, 0xde, 0xfd, 0xe1, 0x92, 0xcd, 0x9a, 0x82, 0xb4, 0xb7, 0x79, 0x33, 0xf3, 0xb1, - 0x6f, 0xde, 0xc2, 0x69, 0x5b, 0xbd, 0x23, 0x91, 0xda, 0x20, 0x15, 0xc6, 0x6a, 0xa7, 0xf9, 0xc4, - 0x28, 0x4b, 0x28, 0x16, 0x10, 0x3f, 0x2b, 0xaa, 0x9f, 0x54, 0xe9, 0x38, 0x87, 0xa8, 0x56, 0x54, - 0xa7, 0x2c, 0x63, 0xf9, 0x5c, 0xfa, 0xba, 0xeb, 0xb9, 0xad, 0xc1, 0x74, 0x94, 0xb1, 0x7c, 0x22, - 0x7d, 0x2d, 0x7e, 0x18, 0x1c, 0x3d, 0xe8, 0xc6, 0x75, 0xcc, 0x39, 0x4c, 0x5b, 0x42, 0xfb, 0xf2, - 0x18, 0xa8, 0xa0, 0xba, 0xbe, 0x69, 0xd7, 0xaf, 0xb8, 0xf5, 0xe4, 0x5c, 0x06, 0xc5, 0x2f, 0x20, - 0xee, 0x36, 0x1a, 0xf5, 0x8d, 0xe9, 0x38, 0x63, 0xf9, 0x4c, 0x0e, 0x9a, 0xdf, 0xc0, 0xcc, 0xd9, - 0xcf, 0x4d, 0xe7, 0x85, 0xd2, 0x28, 0x1b, 0xe7, 0xc7, 0x8b, 0x93, 0xc2, 0xdb, 0x2c, 0xfe, 0x3c, - 0xca, 0xdd, 0x86, 0xb8, 0x05, 0x58, 0xa2, 0xb2, 0x65, 0xbd, 0xc4, 0xa6, 0xe2, 0x97, 0x10, 0x7d, - 0xa8, 0xd2, 0xa5, 0x6c, 0x3f, 0xe7, 0x87, 0x42, 0x42, 0xd2, 0x23, 0x12, 0xc9, 0xe8, 0x86, 0x90, - 0x5f, 0x43, 0x5c, 0xf6, 0xa7, 0x50, 0x40, 0x93, 0x80, 0x86, 0x0b, 0xe5, 0x30, 0xe7, 0x67, 0x30, - 0x41, 0x6b, 0xb5, 0x0d, 0xc6, 0x7b, 0x21, 0xae, 0x00, 0xde, 0xb4, 0xfe, 0x6a, 0x8d, 0xb7, 0x71, - 0x20, 0x0f, 0xb1, 0x82, 0xa4, 0xdf, 0x1a, 0x5e, 0xde, 0x25, 0xc4, 0x0e, 0x26, 0x34, 0xfa, 0x97, - 0xd0, 0x5e, 0x07, 0xf7, 0xd1, 0x6a, 0xd4, 0x56, 0xeb, 0xa9, 0xff, 0xd7, 0xbb, 0xdf, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x5a, 0xee, 0x38, 0xba, 0xeb, 0x01, 0x00, 0x00, +var File_udMessages_proto protoreflect.FileDescriptor + +var file_udMessages_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x75, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x22, 0x32, 0x0a, 0x08, 0x48, 0x61, 0x73, + 0x68, 0x46, 0x61, 0x63, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x04, 0x68, 0x61, 0x73, 0x68, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x22, 0x84, 0x01, + 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, + 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2d, 0x0a, 0x09, 0x74, 0x72, 0x69, 0x67, 0x46, 0x61, 0x63, + 0x74, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, + 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, 0x61, 0x63, 0x74, 0x52, 0x09, 0x74, 0x72, 0x69, 0x67, 0x46, + 0x61, 0x63, 0x74, 0x73, 0x22, 0x31, 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, + 0x6e, 0x64, 0x12, 0x23, 0x0a, 0x04, 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x0f, 0x2e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, 0x61, 0x63, + 0x74, 0x52, 0x04, 0x66, 0x61, 0x63, 0x74, 0x22, 0x52, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, + 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x70, 0x61, + 0x72, 0x73, 0x65, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x52, 0x08, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x63, 0x74, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x24, 0x0a, 0x0a, 0x4c, + 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, + 0x72, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, + 0x44, 0x22, 0x5a, 0x0a, 0x0e, 0x4c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x06, 0x70, 0x75, 0x62, 0x4b, 0x65, 0x79, 0x12, 0x1a, 0x0a, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, + 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x05, 0x5a, + 0x03, 0x75, 0x64, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_udMessages_proto_rawDescOnce sync.Once + file_udMessages_proto_rawDescData = file_udMessages_proto_rawDesc +) + +func file_udMessages_proto_rawDescGZIP() []byte { + file_udMessages_proto_rawDescOnce.Do(func() { + file_udMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_udMessages_proto_rawDescData) + }) + return file_udMessages_proto_rawDescData +} + +var file_udMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 6) +var file_udMessages_proto_goTypes = []interface{}{ + (*HashFact)(nil), // 0: parse.HashFact + (*Contact)(nil), // 1: parse.Contact + (*SearchSend)(nil), // 2: parse.SearchSend + (*SearchResponse)(nil), // 3: parse.SearchResponse + (*LookupSend)(nil), // 4: parse.LookupSend + (*LookupResponse)(nil), // 5: parse.LookupResponse +} +var file_udMessages_proto_depIdxs = []int32{ + 0, // 0: parse.Contact.trigFacts:type_name -> parse.HashFact + 0, // 1: parse.SearchSend.fact:type_name -> parse.HashFact + 1, // 2: parse.SearchResponse.contacts:type_name -> parse.Contact + 3, // [3:3] is the sub-list for method output_type + 3, // [3:3] is the sub-list for method input_type + 3, // [3:3] is the sub-list for extension type_name + 3, // [3:3] is the sub-list for extension extendee + 0, // [0:3] is the sub-list for field type_name +} + +func init() { file_udMessages_proto_init() } +func file_udMessages_proto_init() { + if File_udMessages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_udMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*HashFact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_udMessages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Contact); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_udMessages_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchSend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_udMessages_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SearchResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_udMessages_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupSend); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_udMessages_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*LookupResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + } + type x struct{} + out := protoimpl.TypeBuilder{ + File: protoimpl.DescBuilder{ + GoPackagePath: reflect.TypeOf(x{}).PkgPath(), + RawDescriptor: file_udMessages_proto_rawDesc, + NumEnums: 0, + NumMessages: 6, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_udMessages_proto_goTypes, + DependencyIndexes: file_udMessages_proto_depIdxs, + MessageInfos: file_udMessages_proto_msgTypes, + }.Build() + File_udMessages_proto = out.File + file_udMessages_proto_rawDesc = nil + file_udMessages_proto_goTypes = nil + file_udMessages_proto_depIdxs = nil } diff --git a/ud/udMessages.proto b/ud/udMessages.proto index e6905f8359be96a7f331561495d44b20c7e1ab17..d87f07d464e58e2e598c2cc633f8efafb46d7dc8 100644 --- a/ud/udMessages.proto +++ b/ud/udMessages.proto @@ -10,7 +10,7 @@ syntax = "proto3"; package parse; -option go_package = "ud"; +option go_package = "ud/"; // Contains the Hash and its Type message HashFact {