diff --git a/connect/authenticated.pb.go b/connect/authenticated.pb.go index a12961650fe8a763a5b07be50163f4b4ef496acc..f78d97c7c552b5e888f61a7cbe89aa4f908cb1f0 100644 --- a/connect/authenticated.pb.go +++ b/connect/authenticated.pb.go @@ -1,100 +1,174 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: connect/authenticated/authenticated.proto +//////////////////////////////////////////////////////////////////////////////// +// Copyright © 2022 xx foundation // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file. // +//////////////////////////////////////////////////////////////////////////////// -package connect // import "gitlab.com/elixxir/client/connect/authenticated" +// Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.15.6 +// source: authenticated.proto -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" +package connect -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf +import ( + protoreflect "google.golang.org/protobuf/reflect/protoreflect" + protoimpl "google.golang.org/protobuf/runtime/protoimpl" + reflect "reflect" + sync "sync" +) -// 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.ProtoPackageIsVersion2 // 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) +) // Sent by the receiver of the authenticated connection request. type IdentityAuthentication struct { - Signature []byte `protobuf:"bytes,1,opt,name=Signature,proto3" json:"Signature,omitempty"` + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Signature []byte `protobuf:"bytes,1,opt,name=Signature,proto3" json:"Signature,omitempty"` // Signature of the connection fingerprint // established between the two partners - RsaPubKey []byte `protobuf:"bytes,2,opt,name=RsaPubKey,proto3" json:"RsaPubKey,omitempty"` + RsaPubKey []byte `protobuf:"bytes,2,opt,name=RsaPubKey,proto3" json:"RsaPubKey,omitempty"` // The RSA public key of the sender of this message, // PEM-encoded - Salt []byte `protobuf:"bytes,3,opt,name=Salt,proto3" json:"Salt,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Salt []byte `protobuf:"bytes,3,opt,name=Salt,proto3" json:"Salt,omitempty"` // Salt used to generate the network ID of the client } -func (m *IdentityAuthentication) Reset() { *m = IdentityAuthentication{} } -func (m *IdentityAuthentication) String() string { return proto.CompactTextString(m) } -func (*IdentityAuthentication) ProtoMessage() {} -func (*IdentityAuthentication) Descriptor() ([]byte, []int) { - return fileDescriptor_authenticated_9ed9358e4abe7a3a, []int{0} -} -func (m *IdentityAuthentication) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_IdentityAuthentication.Unmarshal(m, b) -} -func (m *IdentityAuthentication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_IdentityAuthentication.Marshal(b, m, deterministic) -} -func (dst *IdentityAuthentication) XXX_Merge(src proto.Message) { - xxx_messageInfo_IdentityAuthentication.Merge(dst, src) +func (x *IdentityAuthentication) Reset() { + *x = IdentityAuthentication{} + if protoimpl.UnsafeEnabled { + mi := &file_authenticated_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *IdentityAuthentication) XXX_Size() int { - return xxx_messageInfo_IdentityAuthentication.Size(m) + +func (x *IdentityAuthentication) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *IdentityAuthentication) XXX_DiscardUnknown() { - xxx_messageInfo_IdentityAuthentication.DiscardUnknown(m) + +func (*IdentityAuthentication) ProtoMessage() {} + +func (x *IdentityAuthentication) ProtoReflect() protoreflect.Message { + mi := &file_authenticated_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_IdentityAuthentication proto.InternalMessageInfo +// Deprecated: Use IdentityAuthentication.ProtoReflect.Descriptor instead. +func (*IdentityAuthentication) Descriptor() ([]byte, []int) { + return file_authenticated_proto_rawDescGZIP(), []int{0} +} -func (m *IdentityAuthentication) GetSignature() []byte { - if m != nil { - return m.Signature +func (x *IdentityAuthentication) GetSignature() []byte { + if x != nil { + return x.Signature } return nil } -func (m *IdentityAuthentication) GetRsaPubKey() []byte { - if m != nil { - return m.RsaPubKey +func (x *IdentityAuthentication) GetRsaPubKey() []byte { + if x != nil { + return x.RsaPubKey } return nil } -func (m *IdentityAuthentication) GetSalt() []byte { - if m != nil { - return m.Salt +func (x *IdentityAuthentication) GetSalt() []byte { + if x != nil { + return x.Salt } return nil } -func init() { - proto.RegisterType((*IdentityAuthentication)(nil), "authenticatedConnectionMessages.IdentityAuthentication") +var File_authenticated_proto protoreflect.FileDescriptor + +var file_authenticated_proto_rawDesc = []byte{ + 0x0a, 0x13, 0x61, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x07, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x22, 0x68, + 0x0a, 0x16, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, + 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x53, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x53, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x52, 0x73, 0x61, 0x50, 0x75, 0x62, + 0x4b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x52, 0x73, 0x61, 0x50, 0x75, + 0x62, 0x4b, 0x65, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x53, 0x61, 0x6c, 0x74, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x04, 0x53, 0x61, 0x6c, 0x74, 0x42, 0x23, 0x5a, 0x21, 0x67, 0x69, 0x74, 0x6c, + 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, +} + +var ( + file_authenticated_proto_rawDescOnce sync.Once + file_authenticated_proto_rawDescData = file_authenticated_proto_rawDesc +) + +func file_authenticated_proto_rawDescGZIP() []byte { + file_authenticated_proto_rawDescOnce.Do(func() { + file_authenticated_proto_rawDescData = protoimpl.X.CompressGZIP(file_authenticated_proto_rawDescData) + }) + return file_authenticated_proto_rawDescData } -func init() { - proto.RegisterFile("connect/authenticated/authenticated.proto", fileDescriptor_authenticated_9ed9358e4abe7a3a) +var file_authenticated_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_authenticated_proto_goTypes = []interface{}{ + (*IdentityAuthentication)(nil), // 0: connect.IdentityAuthentication +} +var file_authenticated_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name } -var fileDescriptor_authenticated_9ed9358e4abe7a3a = []byte{ - // 180 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xd2, 0x4d, 0xce, 0xcf, 0xcb, - 0x4b, 0x4d, 0x2e, 0xc9, 0xcc, 0xcf, 0x2b, 0xd6, 0x4f, 0x2c, 0x2d, 0xc9, 0x48, 0xcd, 0x2b, 0xc9, - 0x4c, 0x4e, 0x2c, 0x49, 0x4d, 0x41, 0xe5, 0xe9, 0x15, 0x14, 0xe5, 0x97, 0xe4, 0x0b, 0xc9, 0xa3, - 0x08, 0x3a, 0xc3, 0xf5, 0xfa, 0xa6, 0x16, 0x17, 0x27, 0xa6, 0xa7, 0x16, 0x2b, 0x65, 0x70, 0x89, - 0x79, 0xa6, 0x80, 0x14, 0x94, 0x54, 0x3a, 0x22, 0x94, 0x66, 0xe6, 0xe7, 0x09, 0xc9, 0x70, 0x71, - 0x06, 0x67, 0xa6, 0xe7, 0x25, 0x96, 0x94, 0x16, 0xa5, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x04, - 0x21, 0x04, 0x40, 0xb2, 0x41, 0xc5, 0x89, 0x01, 0xa5, 0x49, 0xde, 0xa9, 0x95, 0x12, 0x4c, 0x10, - 0x59, 0xb8, 0x80, 0x90, 0x10, 0x17, 0x4b, 0x70, 0x62, 0x4e, 0x89, 0x04, 0x33, 0x58, 0x02, 0xcc, - 0x76, 0x32, 0x8d, 0x32, 0x4e, 0xcf, 0x2c, 0xc9, 0x49, 0x4c, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, - 0xcd, 0xc9, 0xac, 0xa8, 0xc8, 0x2c, 0xd2, 0x4f, 0xce, 0xc9, 0x4c, 0xcd, 0x2b, 0xd1, 0xc7, 0xe9, - 0xab, 0x24, 0x36, 0xb0, 0x47, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x71, 0x89, 0x27, 0xcf, - 0xf9, 0x00, 0x00, 0x00, +func init() { file_authenticated_proto_init() } +func file_authenticated_proto_init() { + if File_authenticated_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_authenticated_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*IdentityAuthentication); 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_authenticated_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_authenticated_proto_goTypes, + DependencyIndexes: file_authenticated_proto_depIdxs, + MessageInfos: file_authenticated_proto_msgTypes, + }.Build() + File_authenticated_proto = out.File + file_authenticated_proto_rawDesc = nil + file_authenticated_proto_goTypes = nil + file_authenticated_proto_depIdxs = nil } diff --git a/connect/authenticated.proto b/connect/authenticated.proto index 512af812041a1891417d78fbc341ba9f74801c11..4a8e8c87b6b8c33cf684d8e8f4c810690e07d643 100644 --- a/connect/authenticated.proto +++ b/connect/authenticated.proto @@ -6,16 +6,19 @@ //////////////////////////////////////////////////////////////////////////////// syntax = "proto3"; -package authenticatedConnectionMessages; -option go_package = "gitlab.com/elixxir/client/connect/authenticated"; + +package connect; + +option go_package = "gitlab.com/elixxir/client/connect"; + // Sent by the receiver of the authenticated connection request. message IdentityAuthentication { - bytes Signature = 1; // Signature of the connection fingerprint - // established between the two partners - bytes RsaPubKey = 2; // The RSA public key of the sender of this message, - // PEM-encoded - bytes Salt = 3; // Salt used to generate the network ID of the client + bytes Signature = 1; // Signature of the connection fingerprint + // established between the two partners + bytes RsaPubKey = 2; // The RSA public key of the sender of this message, + // PEM-encoded + bytes Salt = 3; // Salt used to generate the network ID of the client } diff --git a/connect/compileProtobuf.sh b/connect/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..e29b74cf9c8b8e989146d728f9c4a07d4a76d745 --- /dev/null +++ b/connect/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./connect/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./authenticated.proto diff --git a/connect/generateProto.sh b/connect/generateProto.sh deleted file mode 100755 index b27e351d7d0c5784e9564cfc2b1e6b2ba7889aa6..0000000000000000000000000000000000000000 --- a/connect/generateProto.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -# This script will generate the protobuf Golang file (pb.go) out of the protobuf file (.proto). -# This is meant to be called from the top level of the repo. - -protoc --go_out=paths=source_relative:. connections/authenticated/authenticated.proto diff --git a/e2e/rekey/compileProtobuf.sh b/e2e/rekey/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..cdead4cfb3925ddd4acc58fab7d8436f76e58206 --- /dev/null +++ b/e2e/rekey/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./e2e/rekey/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./xchange.proto diff --git a/e2e/rekey/generate.sh b/e2e/rekey/generate.sh deleted file mode 100644 index cc5d530cece9c8a16123c820cc249f5db7216686..0000000000000000000000000000000000000000 --- a/e2e/rekey/generate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -protoc --go_out=. -I../ -I$PWD --go_opt=paths=source_relative xchange.proto diff --git a/e2e/rekey/xchange.pb.go b/e2e/rekey/xchange.pb.go index 7711991b13211302beaf59b6eeb1092dbe0e057b..48b98f7823388a708a2de226046bbf11bdb44ee2 100644 --- a/e2e/rekey/xchange.pb.go +++ b/e2e/rekey/xchange.pb.go @@ -5,11 +5,9 @@ // 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.26.0 +// protoc-gen-go v1.27.1 // protoc v3.15.6 // source: xchange.proto @@ -147,7 +145,7 @@ var File_xchange_proto protoreflect.FileDescriptor var file_xchange_proto_rawDesc = []byte{ 0x0a, 0x0d, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, - 0x05, 0x70, 0x61, 0x72, 0x73, 0x65, 0x22, 0x70, 0x0a, 0x0c, 0x52, 0x65, 0x6b, 0x65, 0x79, 0x54, + 0x05, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x22, 0x70, 0x0a, 0x0c, 0x52, 0x65, 0x6b, 0x65, 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x1c, 0x0a, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x4b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x0d, 0x73, 0x69, 0x64, 0x68, 0x50, 0x75, 0x62, 0x6c, @@ -157,10 +155,10 @@ var file_xchange_proto_rawDesc = []byte{ 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x22, 0x2c, 0x0a, 0x0c, 0x52, 0x65, 0x6b, 0x65, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x72, 0x6d, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x65, 0x73, - 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x42, 0x27, 0x5a, 0x25, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, + 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x44, 0x42, 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, - 0x65, 0x6e, 0x74, 0x2f, 0x6b, 0x65, 0x79, 0x45, 0x78, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x65, 0x6e, 0x74, 0x2f, 0x65, 0x32, 0x65, 0x2f, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x62, 0x06, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -177,8 +175,8 @@ func file_xchange_proto_rawDescGZIP() []byte { var file_xchange_proto_msgTypes = make([]protoimpl.MessageInfo, 2) var file_xchange_proto_goTypes = []interface{}{ - (*RekeyTrigger)(nil), // 0: parse.RekeyTrigger - (*RekeyConfirm)(nil), // 1: parse.RekeyConfirm + (*RekeyTrigger)(nil), // 0: rekey.RekeyTrigger + (*RekeyConfirm)(nil), // 1: rekey.RekeyConfirm } var file_xchange_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type diff --git a/e2e/rekey/xchange.proto b/e2e/rekey/xchange.proto index d7624d2d35fc83eaf741e97d395513f175c017c1..efd3fe49f5c6d8cbb2677d7cc03a1949b123a1f1 100644 --- a/e2e/rekey/xchange.proto +++ b/e2e/rekey/xchange.proto @@ -5,13 +5,11 @@ // LICENSE file. // //////////////////////////////////////////////////////////////////////////////// -// Call ./generate.sh to generate the protocol buffer code - syntax = "proto3"; -package parse; -option go_package = "gitlab.com/elixxir/client/keyExchange"; +package rekey; +option go_package = "gitlab.com/elixxir/client/e2e/rekey"; message RekeyTrigger { // PublicKey used in the rekey diff --git a/fileTransfer/compileProtobuf.sh b/fileTransfer/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..1aea86bde01d7493ccec94c6e2138236eff834ed --- /dev/null +++ b/fileTransfer/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./fileTransfer/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./ftMessages.proto diff --git a/fileTransfer/ftMessages.pb.go b/fileTransfer/ftMessages.pb.go index 827070eb4d6230803b93731b296986f5922125ee..3bde058fbcd1d3bab95d9ee4545f7e0616928a4f 100644 --- a/fileTransfer/ftMessages.pb.go +++ b/fileTransfer/ftMessages.pb.go @@ -6,144 +6,217 @@ //////////////////////////////////////////////////////////////////////////////// // Code generated by protoc-gen-go. DO NOT EDIT. -// source: fileTransfer/ftMessages.proto +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.15.6 +// source: ftMessages.proto package fileTransfer 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) +) // NewFileTransfer is transmitted first on the initialization of a file transfer // to inform the receiver about the incoming file. type NewFileTransfer struct { - FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` - FileType string `protobuf:"bytes,2,opt,name=fileType,proto3" json:"fileType,omitempty"` - TransferKey []byte `protobuf:"bytes,3,opt,name=transferKey,proto3" json:"transferKey,omitempty"` - TransferMac []byte `protobuf:"bytes,4,opt,name=transferMac,proto3" json:"transferMac,omitempty"` - NumParts uint32 `protobuf:"varint,5,opt,name=numParts,proto3" json:"numParts,omitempty"` - Size uint32 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` - Retry float32 `protobuf:"fixed32,7,opt,name=retry,proto3" json:"retry,omitempty"` - Preview []byte `protobuf:"bytes,8,opt,name=preview,proto3" json:"preview,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *NewFileTransfer) Reset() { *m = NewFileTransfer{} } -func (m *NewFileTransfer) String() string { return proto.CompactTextString(m) } -func (*NewFileTransfer) ProtoMessage() {} -func (*NewFileTransfer) Descriptor() ([]byte, []int) { - return fileDescriptor_9d574f363dd34365, []int{0} + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` // Name of the file + FileType string `protobuf:"bytes,2,opt,name=fileType,proto3" json:"fileType,omitempty"` // String that indicates type of file + TransferKey []byte `protobuf:"bytes,3,opt,name=transferKey,proto3" json:"transferKey,omitempty"` // 256-bit encryption key + TransferMac []byte `protobuf:"bytes,4,opt,name=transferMac,proto3" json:"transferMac,omitempty"` // 256-bit MAC of the entire file + NumParts uint32 `protobuf:"varint,5,opt,name=numParts,proto3" json:"numParts,omitempty"` // Number of file parts + Size uint32 `protobuf:"varint,6,opt,name=size,proto3" json:"size,omitempty"` // The size of the file, in bytes + Retry float32 `protobuf:"fixed32,7,opt,name=retry,proto3" json:"retry,omitempty"` // Determines how many times to retry sending + Preview []byte `protobuf:"bytes,8,opt,name=preview,proto3" json:"preview,omitempty"` // A preview of the file +} + +func (x *NewFileTransfer) Reset() { + *x = NewFileTransfer{} + if protoimpl.UnsafeEnabled { + mi := &file_ftMessages_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } } -func (m *NewFileTransfer) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_NewFileTransfer.Unmarshal(m, b) -} -func (m *NewFileTransfer) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_NewFileTransfer.Marshal(b, m, deterministic) -} -func (m *NewFileTransfer) XXX_Merge(src proto.Message) { - xxx_messageInfo_NewFileTransfer.Merge(m, src) +func (x *NewFileTransfer) String() string { + return protoimpl.X.MessageStringOf(x) } -func (m *NewFileTransfer) XXX_Size() int { - return xxx_messageInfo_NewFileTransfer.Size(m) -} -func (m *NewFileTransfer) XXX_DiscardUnknown() { - xxx_messageInfo_NewFileTransfer.DiscardUnknown(m) + +func (*NewFileTransfer) ProtoMessage() {} + +func (x *NewFileTransfer) ProtoReflect() protoreflect.Message { + mi := &file_ftMessages_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_NewFileTransfer proto.InternalMessageInfo +// Deprecated: Use NewFileTransfer.ProtoReflect.Descriptor instead. +func (*NewFileTransfer) Descriptor() ([]byte, []int) { + return file_ftMessages_proto_rawDescGZIP(), []int{0} +} -func (m *NewFileTransfer) GetFileName() string { - if m != nil { - return m.FileName +func (x *NewFileTransfer) GetFileName() string { + if x != nil { + return x.FileName } return "" } -func (m *NewFileTransfer) GetFileType() string { - if m != nil { - return m.FileType +func (x *NewFileTransfer) GetFileType() string { + if x != nil { + return x.FileType } return "" } -func (m *NewFileTransfer) GetTransferKey() []byte { - if m != nil { - return m.TransferKey +func (x *NewFileTransfer) GetTransferKey() []byte { + if x != nil { + return x.TransferKey } return nil } -func (m *NewFileTransfer) GetTransferMac() []byte { - if m != nil { - return m.TransferMac +func (x *NewFileTransfer) GetTransferMac() []byte { + if x != nil { + return x.TransferMac } return nil } -func (m *NewFileTransfer) GetNumParts() uint32 { - if m != nil { - return m.NumParts +func (x *NewFileTransfer) GetNumParts() uint32 { + if x != nil { + return x.NumParts } return 0 } -func (m *NewFileTransfer) GetSize() uint32 { - if m != nil { - return m.Size +func (x *NewFileTransfer) GetSize() uint32 { + if x != nil { + return x.Size } return 0 } -func (m *NewFileTransfer) GetRetry() float32 { - if m != nil { - return m.Retry +func (x *NewFileTransfer) GetRetry() float32 { + if x != nil { + return x.Retry } return 0 } -func (m *NewFileTransfer) GetPreview() []byte { - if m != nil { - return m.Preview +func (x *NewFileTransfer) GetPreview() []byte { + if x != nil { + return x.Preview } return nil } -func init() { - proto.RegisterType((*NewFileTransfer)(nil), "parse.NewFileTransfer") -} - -func init() { proto.RegisterFile("fileTransfer/ftMessages.proto", fileDescriptor_9d574f363dd34365) } - -var fileDescriptor_9d574f363dd34365 = []byte{ - // 213 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0xbd, 0x4a, 0xc7, 0x30, - 0x14, 0xc5, 0xc9, 0xdf, 0x7e, 0x19, 0xab, 0x42, 0x70, 0xb8, 0x08, 0x42, 0x70, 0xca, 0xa4, 0x83, - 0x6f, 0xe0, 0xe0, 0x22, 0x2d, 0x12, 0x3a, 0xb9, 0xc5, 0x72, 0x2b, 0x05, 0xdb, 0x86, 0x9b, 0x68, - 0xa9, 0xef, 0xec, 0x3b, 0x48, 0xa3, 0xad, 0x71, 0xcb, 0xef, 0x9c, 0x93, 0x73, 0xe1, 0xf0, 0xab, - 0xae, 0x7f, 0xc3, 0x86, 0xcc, 0xe8, 0x3a, 0xa4, 0xdb, 0xce, 0x57, 0xe8, 0x9c, 0x79, 0x45, 0x77, - 0x63, 0x69, 0xf2, 0x93, 0x48, 0xad, 0x21, 0x87, 0xd7, 0x5f, 0x8c, 0x9f, 0xd7, 0x38, 0x3f, 0x44, - 0x59, 0x71, 0xc9, 0x8b, 0xf5, 0x6f, 0x6d, 0x06, 0x04, 0x26, 0x99, 0x3a, 0xd6, 0x3b, 0x6f, 0x5e, - 0xb3, 0x58, 0x84, 0xc3, 0x9f, 0xb7, 0xb2, 0x90, 0xfc, 0xc4, 0xff, 0x76, 0x3c, 0xe2, 0x02, 0x47, - 0x92, 0xa9, 0x52, 0xc7, 0x52, 0x9c, 0xa8, 0x4c, 0x0b, 0xc9, 0xff, 0x44, 0x65, 0xda, 0xb5, 0x7f, - 0x7c, 0x1f, 0x9e, 0x0c, 0x79, 0x07, 0xa9, 0x64, 0xea, 0x54, 0xef, 0x2c, 0x04, 0x4f, 0x5c, 0xff, - 0x89, 0x90, 0x05, 0x3d, 0xbc, 0xc5, 0x05, 0x4f, 0x09, 0x3d, 0x2d, 0x90, 0x4b, 0xa6, 0x0e, 0xfa, - 0x07, 0x04, 0xf0, 0xdc, 0x12, 0x7e, 0xf4, 0x38, 0x43, 0x11, 0x6e, 0x6c, 0x78, 0x7f, 0xf6, 0x5c, - 0xc6, 0xbb, 0xbc, 0x64, 0x61, 0x8d, 0xbb, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcd, 0x93, 0x73, - 0x01, 0x2e, 0x01, 0x00, 0x00, +var File_ftMessages_proto protoreflect.FileDescriptor + +var file_ftMessages_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x66, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x0c, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x22, 0xed, 0x01, 0x0a, 0x0f, 0x4e, 0x65, 0x77, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x20, + 0x0a, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x61, 0x63, 0x18, 0x04, 0x20, + 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4d, 0x61, 0x63, + 0x12, 0x1a, 0x0a, 0x08, 0x6e, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x73, 0x18, 0x05, 0x20, 0x01, + 0x28, 0x0d, 0x52, 0x08, 0x6e, 0x75, 0x6d, 0x50, 0x61, 0x72, 0x74, 0x73, 0x12, 0x12, 0x0a, 0x04, + 0x73, 0x69, 0x7a, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, + 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x02, 0x52, + 0x05, 0x72, 0x65, 0x74, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, + 0x77, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x72, 0x65, 0x76, 0x69, 0x65, 0x77, + 0x42, 0x28, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, + 0x6c, 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x66, 0x69, + 0x6c, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, +} + +var ( + file_ftMessages_proto_rawDescOnce sync.Once + file_ftMessages_proto_rawDescData = file_ftMessages_proto_rawDesc +) + +func file_ftMessages_proto_rawDescGZIP() []byte { + file_ftMessages_proto_rawDescOnce.Do(func() { + file_ftMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_ftMessages_proto_rawDescData) + }) + return file_ftMessages_proto_rawDescData +} + +var file_ftMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_ftMessages_proto_goTypes = []interface{}{ + (*NewFileTransfer)(nil), // 0: fileTransfer.NewFileTransfer +} +var file_ftMessages_proto_depIdxs = []int32{ + 0, // [0:0] is the sub-list for method output_type + 0, // [0:0] is the sub-list for method input_type + 0, // [0:0] is the sub-list for extension type_name + 0, // [0:0] is the sub-list for extension extendee + 0, // [0:0] is the sub-list for field type_name +} + +func init() { file_ftMessages_proto_init() } +func file_ftMessages_proto_init() { + if File_ftMessages_proto != nil { + return + } + if !protoimpl.UnsafeEnabled { + file_ftMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*NewFileTransfer); 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_ftMessages_proto_rawDesc, + NumEnums: 0, + NumMessages: 1, + NumExtensions: 0, + NumServices: 0, + }, + GoTypes: file_ftMessages_proto_goTypes, + DependencyIndexes: file_ftMessages_proto_depIdxs, + MessageInfos: file_ftMessages_proto_msgTypes, + }.Build() + File_ftMessages_proto = out.File + file_ftMessages_proto_rawDesc = nil + file_ftMessages_proto_goTypes = nil + file_ftMessages_proto_depIdxs = nil } diff --git a/fileTransfer/ftMessages.proto b/fileTransfer/ftMessages.proto index 5253820fc5e047f3b82efdf0bc2e1b8a11c28d12..f1799036dc31c2e8dae63cf495150cf9a0cd73ce 100644 --- a/fileTransfer/ftMessages.proto +++ b/fileTransfer/ftMessages.proto @@ -7,8 +7,9 @@ syntax = "proto3"; -package parse; -option go_package = "fileTransfer"; +package fileTransfer; + +option go_package = "gitlab.com/elixxir/client/fileTransfer"; // NewFileTransfer is transmitted first on the initialization of a file transfer // to inform the receiver about the incoming file. diff --git a/fileTransfer/generateProto.sh b/fileTransfer/generateProto.sh deleted file mode 100644 index 45c407448f50766cccb1e8adfee2be839bbf4c4d..0000000000000000000000000000000000000000 --- a/fileTransfer/generateProto.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -#/////////////////////////////////////////////////////////////////////////////// -#/ Copyright © 2020 xx network SEZC // -#/ // -#/ Use of this source code is governed by a license that can be found in the // -#/ LICENSE file // -#/////////////////////////////////////////////////////////////////////////////// - -protoc --go_out=paths=source_relative:. fileTransfer/ftMessages.proto diff --git a/go.mod b/go.mod index ec9b4abdef7205c8285bf45e20001596d4d8fbea..f29dc497ddd93a639f2acbc7f3effa9b91e3486f 100644 --- a/go.mod +++ b/go.mod @@ -13,11 +13,11 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/viper v1.12.0 gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f - gitlab.com/elixxir/comms v0.0.4-0.20220901222604-9fa1911afdd7 + gitlab.com/elixxir/comms v0.0.4-0.20220914220142-601071b77d78 gitlab.com/elixxir/crypto v0.0.7-0.20220901215826-1ceaeb59081f gitlab.com/elixxir/ekv v0.2.1 gitlab.com/elixxir/primitives v0.0.3-0.20220901220638-1acc75fabdc6 - gitlab.com/xx_network/comms v0.0.4-0.20220902183108-fe7b710b7efe + gitlab.com/xx_network/comms v0.0.4-0.20220914220351-2e461edbfe48 gitlab.com/xx_network/crypto v0.0.5-0.20220902182733-69aad094b487 gitlab.com/xx_network/primitives v0.0.4-0.20220902183448-319596e2fec8 go.uber.org/ratelimit v0.2.0 diff --git a/go.sum b/go.sum index 9545a959b37549717d7cde5eb42975c16cceafab..1bddbd229e3143da993a80af52890fc00df7d710 100644 --- a/go.sum +++ b/go.sum @@ -433,15 +433,13 @@ github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo= github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4= gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f h1:yXGvNBqzZwAhDYlSnxPRbgor6JWoOt1Z7s3z1O9JR40= gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f/go.mod h1:H6jztdm0k+wEV2QGK/KYA+MY9nj9Zzatux/qIvDDv3k= -gitlab.com/elixxir/comms v0.0.4-0.20220901222604-9fa1911afdd7 h1:VKeC0MEuTyyeCakXl3YRYdBn9Btp2e0cbqC4WIDSLlU= -gitlab.com/elixxir/comms v0.0.4-0.20220901222604-9fa1911afdd7/go.mod h1:j6so9oYAj2YRjOOu11gFBldtxy4ez/oPkYfqM2J1q1k= +gitlab.com/elixxir/comms v0.0.4-0.20220914220142-601071b77d78 h1:bfDa8JU4ahgRif3QHFO8aUyfPCC0X3K9TTBQorELiJQ= +gitlab.com/elixxir/comms v0.0.4-0.20220914220142-601071b77d78/go.mod h1:LO2egFN4rGjMEs3vQnlaSLHyOwVP6zTN9cSgL3u9I00= gitlab.com/elixxir/crypto v0.0.0-20200804182833-984246dea2c4/go.mod h1:ucm9SFKJo+K0N2GwRRpaNr+tKXMIOVWzmyUD0SbOu2c= gitlab.com/elixxir/crypto v0.0.3/go.mod h1:ZNgBOblhYToR4m8tj4cMvJ9UsJAUKq+p0gCp07WQmhA= gitlab.com/elixxir/crypto v0.0.7-0.20220606201132-c370d5039cea/go.mod h1:Oy+VWQ2Sa0Ybata3oTV+Yc46hkaDwAsuIMW0wJ01z2M= gitlab.com/elixxir/crypto v0.0.7-0.20220901215826-1ceaeb59081f h1:G5I01Ob+ff0YjGyluQ2h3+I97qWtOyNRrJGIJkJWaW8= gitlab.com/elixxir/crypto v0.0.7-0.20220901215826-1ceaeb59081f/go.mod h1:IYRYQwpS3zhTVtrir+kGGTqRCMI3It/i6mGW/mxezrM= -gitlab.com/elixxir/ekv v0.2.1-0.20220901224437-ab4cbf94bf8b h1:0cN/WHbFaonJEN+odqyjtSrkuEbBnEnWfggT91svPGc= -gitlab.com/elixxir/ekv v0.2.1-0.20220901224437-ab4cbf94bf8b/go.mod h1:USLD7xeDnuZEavygdrgzNEwZXeLQJK/w1a+htpN+JEU= gitlab.com/elixxir/ekv v0.2.1 h1:dtwbt6KmAXG2Tik5d60iDz2fLhoFBgWwST03p7T+9Is= gitlab.com/elixxir/ekv v0.2.1/go.mod h1:USLD7xeDnuZEavygdrgzNEwZXeLQJK/w1a+htpN+JEU= gitlab.com/elixxir/primitives v0.0.0-20200731184040-494269b53b4d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= @@ -453,9 +451,9 @@ gitlab.com/elixxir/primitives v0.0.3-0.20220810173935-592f34a88326/go.mod h1:9Bb gitlab.com/elixxir/primitives v0.0.3-0.20220901220638-1acc75fabdc6 h1:/cxxZBP5jTPDpC3zgOx9vV1ojmJyG8pYtkl3IbcewNQ= gitlab.com/elixxir/primitives v0.0.3-0.20220901220638-1acc75fabdc6/go.mod h1:9Bb2+u+CDSwsEU5Droo6saDAXuBDvLRjexpBhPAYxhA= gitlab.com/xx_network/comms v0.0.0-20200805174823-841427dd5023/go.mod h1:owEcxTRl7gsoM8c3RQ5KAm5GstxrJp5tn+6JfQ4z5Hw= -gitlab.com/xx_network/comms v0.0.4-0.20220630163702-f3d372ef6acd/go.mod h1:TraR4sW+YxK/2CV+IQUNaAV61+ElrBV0kXd5HLEjM7M= -gitlab.com/xx_network/comms v0.0.4-0.20220902183108-fe7b710b7efe h1:AiivMJmow6QqIZgCck5FFmvdyuq2hHFMAGs6koWXd14= -gitlab.com/xx_network/comms v0.0.4-0.20220902183108-fe7b710b7efe/go.mod h1:TraR4sW+YxK/2CV+IQUNaAV61+ElrBV0kXd5HLEjM7M= +gitlab.com/xx_network/comms v0.0.4-0.20220914214503-546c1818b07f/go.mod h1:TraR4sW+YxK/2CV+IQUNaAV61+ElrBV0kXd5HLEjM7M= +gitlab.com/xx_network/comms v0.0.4-0.20220914220351-2e461edbfe48 h1:c96mi1Tz2NY96rLHi02WHicujC9Rt1KINkiBsqmFA/k= +gitlab.com/xx_network/comms v0.0.4-0.20220914220351-2e461edbfe48/go.mod h1:TraR4sW+YxK/2CV+IQUNaAV61+ElrBV0kXd5HLEjM7M= gitlab.com/xx_network/crypto v0.0.3/go.mod h1:DF2HYvvCw9wkBybXcXAgQMzX+MiGbFPjwt3t17VRqRE= gitlab.com/xx_network/crypto v0.0.4/go.mod h1:+lcQEy+Th4eswFgQDwT0EXKp4AXrlubxalwQFH5O0Mk= gitlab.com/xx_network/crypto v0.0.5-0.20220606200528-3f886fe49e81/go.mod h1:/SJf+R75E+QepdTLh0H1/udsovxx2Q5ru34q1v0umKk= diff --git a/groupChat/compileProtobuf.sh b/groupChat/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..f8039748c3b3add0a501215214ee9ea6e53c75a9 --- /dev/null +++ b/groupChat/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./groupChat/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./gcMessages.proto diff --git a/groupChat/gcMessages.pb.go b/groupChat/gcMessages.pb.go index 12fe9acae7e6c87c4b9f676a9cfd78226a2671a0..17cdd83d6f1ab07b2f0b44ed1a33ee017ccb63ed 100644 --- a/groupChat/gcMessages.pb.go +++ b/groupChat/gcMessages.pb.go @@ -7,9 +7,9 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.26.0 -// protoc v3.17.3 -// source: groupChat/gcMessages.proto +// protoc-gen-go v1.27.1 +// protoc v3.15.6 +// source: gcMessages.proto package groupChat @@ -44,7 +44,7 @@ type Request struct { func (x *Request) Reset() { *x = Request{} if protoimpl.UnsafeEnabled { - mi := &file_groupChat_gcMessages_proto_msgTypes[0] + mi := &file_gcMessages_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -57,7 +57,7 @@ func (x *Request) String() string { func (*Request) ProtoMessage() {} func (x *Request) ProtoReflect() protoreflect.Message { - mi := &file_groupChat_gcMessages_proto_msgTypes[0] + mi := &file_gcMessages_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -70,7 +70,7 @@ func (x *Request) ProtoReflect() protoreflect.Message { // Deprecated: Use Request.ProtoReflect.Descriptor instead. func (*Request) Descriptor() ([]byte, []int) { - return file_groupChat_gcMessages_proto_rawDescGZIP(), []int{0} + return file_gcMessages_proto_rawDescGZIP(), []int{0} } func (x *Request) GetName() []byte { @@ -115,45 +115,44 @@ func (x *Request) GetCreated() int64 { return 0 } -var File_groupChat_gcMessages_proto protoreflect.FileDescriptor - -var file_groupChat_gcMessages_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x2f, 0x67, 0x63, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x11, 0x67, 0x63, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22, - 0xad, 0x01, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, - 0x1e, 0x0a, 0x0a, 0x69, 0x64, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x69, 0x64, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, - 0x20, 0x0a, 0x0b, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, - 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, - 0x25, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, - 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var File_gcMessages_proto protoreflect.FileDescriptor + +var file_gcMessages_proto_rawDesc = []byte{ + 0x0a, 0x10, 0x67, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x12, 0x09, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x22, 0xad, 0x01, + 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x69, 0x64, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x0a, 0x69, 0x64, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x20, 0x0a, + 0x0b, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0c, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x50, 0x72, 0x65, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, + 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, + 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, + 0x73, 0x61, 0x67, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, + 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x42, 0x25, 0x5a, + 0x23, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x69, 0x78, + 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, + 0x43, 0x68, 0x61, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( - file_groupChat_gcMessages_proto_rawDescOnce sync.Once - file_groupChat_gcMessages_proto_rawDescData = file_groupChat_gcMessages_proto_rawDesc + file_gcMessages_proto_rawDescOnce sync.Once + file_gcMessages_proto_rawDescData = file_gcMessages_proto_rawDesc ) -func file_groupChat_gcMessages_proto_rawDescGZIP() []byte { - file_groupChat_gcMessages_proto_rawDescOnce.Do(func() { - file_groupChat_gcMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_groupChat_gcMessages_proto_rawDescData) +func file_gcMessages_proto_rawDescGZIP() []byte { + file_gcMessages_proto_rawDescOnce.Do(func() { + file_gcMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_gcMessages_proto_rawDescData) }) - return file_groupChat_gcMessages_proto_rawDescData + return file_gcMessages_proto_rawDescData } -var file_groupChat_gcMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_groupChat_gcMessages_proto_goTypes = []interface{}{ - (*Request)(nil), // 0: gcRequestMessages.Request +var file_gcMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 1) +var file_gcMessages_proto_goTypes = []interface{}{ + (*Request)(nil), // 0: groupChat.Request } -var file_groupChat_gcMessages_proto_depIdxs = []int32{ +var file_gcMessages_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for method output_type 0, // [0:0] is the sub-list for method input_type 0, // [0:0] is the sub-list for extension type_name @@ -161,13 +160,13 @@ var file_groupChat_gcMessages_proto_depIdxs = []int32{ 0, // [0:0] is the sub-list for field type_name } -func init() { file_groupChat_gcMessages_proto_init() } -func file_groupChat_gcMessages_proto_init() { - if File_groupChat_gcMessages_proto != nil { +func init() { file_gcMessages_proto_init() } +func file_gcMessages_proto_init() { + if File_gcMessages_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_groupChat_gcMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_gcMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Request); i { case 0: return &v.state @@ -184,18 +183,18 @@ func file_groupChat_gcMessages_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_groupChat_gcMessages_proto_rawDesc, + RawDescriptor: file_gcMessages_proto_rawDesc, NumEnums: 0, NumMessages: 1, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_groupChat_gcMessages_proto_goTypes, - DependencyIndexes: file_groupChat_gcMessages_proto_depIdxs, - MessageInfos: file_groupChat_gcMessages_proto_msgTypes, + GoTypes: file_gcMessages_proto_goTypes, + DependencyIndexes: file_gcMessages_proto_depIdxs, + MessageInfos: file_gcMessages_proto_msgTypes, }.Build() - File_groupChat_gcMessages_proto = out.File - file_groupChat_gcMessages_proto_rawDesc = nil - file_groupChat_gcMessages_proto_goTypes = nil - file_groupChat_gcMessages_proto_depIdxs = nil + File_gcMessages_proto = out.File + file_gcMessages_proto_rawDesc = nil + file_gcMessages_proto_goTypes = nil + file_gcMessages_proto_depIdxs = nil } diff --git a/groupChat/gcMessages.proto b/groupChat/gcMessages.proto index c1502cca2d3ed2d5d02cd354b2524db75315a135..46299a91d34c568f9d1590cbf87faae430f97ae3 100644 --- a/groupChat/gcMessages.proto +++ b/groupChat/gcMessages.proto @@ -6,9 +6,10 @@ //////////////////////////////////////////////////////////////////////////////// syntax = "proto3"; -package gcRequestMessages; -option go_package = "gitlab.com/elixxir/client/groupChat"; +package groupChat; + +option go_package = "gitlab.com/elixxir/client/groupChat"; // Request to join the group sent from leader to all members. message Request { diff --git a/groupChat/generateProto.sh b/groupChat/generateProto.sh deleted file mode 100644 index 43968a4aa112270ffb38ea9a2c5da91e309871f1..0000000000000000000000000000000000000000 --- a/groupChat/generateProto.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -protoc --go_out=paths=source_relative:. groupChat/gcMessages.proto diff --git a/restlike/compileProtobuf.sh b/restlike/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..1e6fda1ef503db58983b3756bc578760e7ddaaec --- /dev/null +++ b/restlike/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./restlike/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./restLikeMessages.proto diff --git a/restlike/generateProto.sh b/restlike/generateProto.sh deleted file mode 100755 index 67b6d293f6f4e6a68eff4162a42acb242129cd18..0000000000000000000000000000000000000000 --- a/restlike/generateProto.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -protoc --go_out=paths=source_relative:. restlike/restLikeMessages.proto diff --git a/restlike/restLikeMessages.pb.go b/restlike/restLikeMessages.pb.go index f41665c73b437581c27fd01769e8b80500faa16f..674580e375c72f057883a4e6f27a7a5466d3749e 100644 --- a/restlike/restLikeMessages.pb.go +++ b/restlike/restLikeMessages.pb.go @@ -8,8 +8,8 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.1 -// protoc v3.19.1 -// source: restlike/restLikeMessages.proto +// protoc v3.15.6 +// source: restLikeMessages.proto package restlike @@ -43,7 +43,7 @@ type Message struct { func (x *Message) Reset() { *x = Message{} if protoimpl.UnsafeEnabled { - mi := &file_restlike_restLikeMessages_proto_msgTypes[0] + mi := &file_restLikeMessages_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -56,7 +56,7 @@ func (x *Message) String() string { func (*Message) ProtoMessage() {} func (x *Message) ProtoReflect() protoreflect.Message { - mi := &file_restlike_restLikeMessages_proto_msgTypes[0] + mi := &file_restLikeMessages_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -69,7 +69,7 @@ func (x *Message) ProtoReflect() protoreflect.Message { // Deprecated: Use Message.ProtoReflect.Descriptor instead. func (*Message) Descriptor() ([]byte, []int) { - return file_restlike_restLikeMessages_proto_rawDescGZIP(), []int{0} + return file_restLikeMessages_proto_rawDescGZIP(), []int{0} } func (x *Message) GetContent() []byte { @@ -124,7 +124,7 @@ type Headers struct { func (x *Headers) Reset() { *x = Headers{} if protoimpl.UnsafeEnabled { - mi := &file_restlike_restLikeMessages_proto_msgTypes[1] + mi := &file_restLikeMessages_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -137,7 +137,7 @@ func (x *Headers) String() string { func (*Headers) ProtoMessage() {} func (x *Headers) ProtoReflect() protoreflect.Message { - mi := &file_restlike_restLikeMessages_proto_msgTypes[1] + mi := &file_restLikeMessages_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -150,7 +150,7 @@ func (x *Headers) ProtoReflect() protoreflect.Message { // Deprecated: Use Headers.ProtoReflect.Descriptor instead. func (*Headers) Descriptor() ([]byte, []int) { - return file_restlike_restLikeMessages_proto_rawDescGZIP(), []int{1} + return file_restLikeMessages_proto_rawDescGZIP(), []int{1} } func (x *Headers) GetHeaders() []byte { @@ -167,50 +167,49 @@ func (x *Headers) GetVersion() uint32 { return 0 } -var File_restlike_restLikeMessages_proto protoreflect.FileDescriptor +var File_restLikeMessages_proto protoreflect.FileDescriptor -var file_restlike_restLikeMessages_proto_rawDesc = []byte{ - 0x0a, 0x1f, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6b, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x4c, - 0x69, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x12, 0x10, 0x72, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x22, 0x98, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, - 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x33, 0x0a, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x72, 0x65, 0x73, - 0x74, 0x4c, 0x69, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x48, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, - 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, - 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3d, - 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0x5a, - 0x22, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x69, 0x78, - 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6c, - 0x69, 0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +var file_restLikeMessages_proto_rawDesc = []byte{ + 0x0a, 0x16, 0x72, 0x65, 0x73, 0x74, 0x4c, 0x69, 0x6b, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x08, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, + 0x6b, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x18, + 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, + 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x2b, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, + 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x72, 0x65, 0x73, 0x74, + 0x6c, 0x69, 0x6b, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x07, 0x68, 0x65, + 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, + 0x03, 0x75, 0x72, 0x69, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, + 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, 0x3d, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x12, 0x18, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0c, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, + 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, + 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x24, 0x5a, 0x22, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x65, 0x6c, 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, + 0x74, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x6c, 0x69, 0x6b, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( - file_restlike_restLikeMessages_proto_rawDescOnce sync.Once - file_restlike_restLikeMessages_proto_rawDescData = file_restlike_restLikeMessages_proto_rawDesc + file_restLikeMessages_proto_rawDescOnce sync.Once + file_restLikeMessages_proto_rawDescData = file_restLikeMessages_proto_rawDesc ) -func file_restlike_restLikeMessages_proto_rawDescGZIP() []byte { - file_restlike_restLikeMessages_proto_rawDescOnce.Do(func() { - file_restlike_restLikeMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_restlike_restLikeMessages_proto_rawDescData) +func file_restLikeMessages_proto_rawDescGZIP() []byte { + file_restLikeMessages_proto_rawDescOnce.Do(func() { + file_restLikeMessages_proto_rawDescData = protoimpl.X.CompressGZIP(file_restLikeMessages_proto_rawDescData) }) - return file_restlike_restLikeMessages_proto_rawDescData + return file_restLikeMessages_proto_rawDescData } -var file_restlike_restLikeMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_restlike_restLikeMessages_proto_goTypes = []interface{}{ - (*Message)(nil), // 0: restLikeMessages.Message - (*Headers)(nil), // 1: restLikeMessages.Headers +var file_restLikeMessages_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_restLikeMessages_proto_goTypes = []interface{}{ + (*Message)(nil), // 0: restlike.Message + (*Headers)(nil), // 1: restlike.Headers } -var file_restlike_restLikeMessages_proto_depIdxs = []int32{ - 1, // 0: restLikeMessages.Message.headers:type_name -> restLikeMessages.Headers +var file_restLikeMessages_proto_depIdxs = []int32{ + 1, // 0: restlike.Message.headers:type_name -> restlike.Headers 1, // [1:1] is the sub-list for method output_type 1, // [1:1] is the sub-list for method input_type 1, // [1:1] is the sub-list for extension type_name @@ -218,13 +217,13 @@ var file_restlike_restLikeMessages_proto_depIdxs = []int32{ 0, // [0:1] is the sub-list for field type_name } -func init() { file_restlike_restLikeMessages_proto_init() } -func file_restlike_restLikeMessages_proto_init() { - if File_restlike_restLikeMessages_proto != nil { +func init() { file_restLikeMessages_proto_init() } +func file_restLikeMessages_proto_init() { + if File_restLikeMessages_proto != nil { return } if !protoimpl.UnsafeEnabled { - file_restlike_restLikeMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { + file_restLikeMessages_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Message); i { case 0: return &v.state @@ -236,7 +235,7 @@ func file_restlike_restLikeMessages_proto_init() { return nil } } - file_restlike_restLikeMessages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { + file_restLikeMessages_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Headers); i { case 0: return &v.state @@ -253,18 +252,18 @@ func file_restlike_restLikeMessages_proto_init() { out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_restlike_restLikeMessages_proto_rawDesc, + RawDescriptor: file_restLikeMessages_proto_rawDesc, NumEnums: 0, NumMessages: 2, NumExtensions: 0, NumServices: 0, }, - GoTypes: file_restlike_restLikeMessages_proto_goTypes, - DependencyIndexes: file_restlike_restLikeMessages_proto_depIdxs, - MessageInfos: file_restlike_restLikeMessages_proto_msgTypes, + GoTypes: file_restLikeMessages_proto_goTypes, + DependencyIndexes: file_restLikeMessages_proto_depIdxs, + MessageInfos: file_restLikeMessages_proto_msgTypes, }.Build() - File_restlike_restLikeMessages_proto = out.File - file_restlike_restLikeMessages_proto_rawDesc = nil - file_restlike_restLikeMessages_proto_goTypes = nil - file_restlike_restLikeMessages_proto_depIdxs = nil + File_restLikeMessages_proto = out.File + file_restLikeMessages_proto_rawDesc = nil + file_restLikeMessages_proto_goTypes = nil + file_restLikeMessages_proto_depIdxs = nil } diff --git a/restlike/restLikeMessages.proto b/restlike/restLikeMessages.proto index 681c97afcdfd46da0e55ecbe2ca62dbd6d7798b1..c0b37ee7652a1da6df2cca0a16deb4bf36c3e35f 100644 --- a/restlike/restLikeMessages.proto +++ b/restlike/restLikeMessages.proto @@ -6,7 +6,9 @@ //////////////////////////////////////////////////////////////////////////////// syntax = "proto3"; -package restLikeMessages; + +package restlike; + option go_package = "gitlab.com/elixxir/client/restlike"; // Message are used for sending to and receiving from a RestServer diff --git a/ud/compileProtobuf.sh b/ud/compileProtobuf.sh new file mode 100644 index 0000000000000000000000000000000000000000..ff4554cda302477db4d22715d3975d97f80268ac --- /dev/null +++ b/ud/compileProtobuf.sh @@ -0,0 +1,14 @@ +#!/bin/bash +################################################################################ +## Copyright © 2022 xx foundation ## +## ## +## Use of this source code is governed by a license that can be found in the ## +## LICENSE file. ## +################################################################################ + +# This script will compile the Protobuf file to a Go file (pb.go). +# This is meant to be called from the top level of the repo. + +cd ./ud/ || return + +protoc --go_out=. --go_opt=paths=source_relative ./udMessages.proto diff --git a/ud/generate.sh b/ud/generate.sh deleted file mode 100755 index f8e0ec99843d0d39bf12b63f145d81a8df1bc99d..0000000000000000000000000000000000000000 --- a/ud/generate.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -protoc --go_out=. udMessages.proto diff --git a/ud/udMessages.pb.go b/ud/udMessages.pb.go index 0aae2063325f57b73c42ff53e30020225aefcd7e..8a4745c74317c8934d10f2943af4cc79c0d8dc6d 100644 --- a/ud/udMessages.pb.go +++ b/ud/udMessages.pb.go @@ -1,69 +1,84 @@ +//////////////////////////////////////////////////////////////////////////////// +// Copyright © 2022 xx foundation // +// // +// Use of this source code is governed by a license that can be found in the // +// LICENSE file. // +//////////////////////////////////////////////////////////////////////////////// + // Code generated by protoc-gen-go. DO NOT EDIT. +// versions: +// protoc-gen-go v1.27.1 +// protoc v3.15.6 // 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 +86,458 @@ 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, 0x02, 0x75, 0x64, 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, 0x81, 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, 0x2a, 0x0a, 0x09, 0x74, 0x72, 0x69, 0x67, 0x46, 0x61, 0x63, 0x74, 0x73, 0x18, + 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x75, 0x64, 0x2e, 0x48, 0x61, 0x73, 0x68, 0x46, + 0x61, 0x63, 0x74, 0x52, 0x09, 0x74, 0x72, 0x69, 0x67, 0x46, 0x61, 0x63, 0x74, 0x73, 0x22, 0x2e, + 0x0a, 0x0a, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x20, 0x0a, 0x04, + 0x66, 0x61, 0x63, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0c, 0x2e, 0x75, 0x64, 0x2e, + 0x48, 0x61, 0x73, 0x68, 0x46, 0x61, 0x63, 0x74, 0x52, 0x04, 0x66, 0x61, 0x63, 0x74, 0x22, 0x4f, + 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x27, 0x0a, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x63, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x75, 0x64, 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, 0x1e, 0x5a, 0x1c, 0x67, 0x69, 0x74, 0x6c, 0x61, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x65, 0x6c, 0x69, 0x78, 0x78, 0x69, 0x72, 0x2f, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x2f, 0x75, + 0x64, 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: ud.HashFact + (*Contact)(nil), // 1: ud.Contact + (*SearchSend)(nil), // 2: ud.SearchSend + (*SearchResponse)(nil), // 3: ud.SearchResponse + (*LookupSend)(nil), // 4: ud.LookupSend + (*LookupResponse)(nil), // 5: ud.LookupResponse +} +var file_udMessages_proto_depIdxs = []int32{ + 0, // 0: ud.Contact.trigFacts:type_name -> ud.HashFact + 0, // 1: ud.SearchSend.fact:type_name -> ud.HashFact + 1, // 2: ud.SearchResponse.contacts:type_name -> ud.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 5f55a033960a2686f170fd6c8042e7c466f102b1..e80f56242b6efd85613dcaa1fff760de422b4df6 100644 --- a/ud/udMessages.proto +++ b/ud/udMessages.proto @@ -5,12 +5,11 @@ // LICENSE file. // //////////////////////////////////////////////////////////////////////////////// -// Call ./generate.sh to generate the protocol buffer code - syntax = "proto3"; -package parse; -option go_package = "ud"; +package ud; + +option go_package = "gitlab.com/elixxir/client/ud"; // Contains the Hash and its Type message HashFact { diff --git a/xxdk/version_vars.go b/xxdk/version_vars.go index 1107c2c1141673d1bbe3b35aafb509177bac1cb8..61bd87da81f93ce196ac84a628a11107357ecb24 100644 --- a/xxdk/version_vars.go +++ b/xxdk/version_vars.go @@ -1,10 +1,10 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots at -// 2022-08-03 11:29:24.178017 -0500 CDT m=+0.037661773 +// 2022-09-15 10:52:12.1953796 -0700 PDT m=+0.451573601 package xxdk -const GITVERSION = `97f2ad74 Merge branch 'feature/roundpickup' into 'release'` +const GITVERSION = `55b66f6b Update proto files` const SEMVER = "4.2.0" const DEPENDENCIES = `module gitlab.com/elixxir/client @@ -16,17 +16,18 @@ require ( 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/pkg/profile v1.6.0 github.com/spf13/cobra v1.5.0 github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/viper v1.12.0 gitlab.com/elixxir/bloomfilter v0.0.0-20211222005329-7d931ceead6f - gitlab.com/elixxir/comms v0.0.4-0.20220603231314-e47e4af13326 - gitlab.com/elixxir/crypto v0.0.7-0.20220606201132-c370d5039cea - gitlab.com/elixxir/ekv v0.1.7 - gitlab.com/elixxir/primitives v0.0.3-0.20220606195757-40f7a589347f - gitlab.com/xx_network/comms v0.0.4-0.20220630163702-f3d372ef6acd - gitlab.com/xx_network/crypto v0.0.5-0.20220729193517-1e5e96f39f6e - gitlab.com/xx_network/primitives v0.0.4-0.20220712193914-aebd8544396e + gitlab.com/elixxir/comms v0.0.4-0.20220914220142-601071b77d78 + gitlab.com/elixxir/crypto v0.0.7-0.20220901215826-1ceaeb59081f + gitlab.com/elixxir/ekv v0.2.1 + gitlab.com/elixxir/primitives v0.0.3-0.20220901220638-1acc75fabdc6 + gitlab.com/xx_network/comms v0.0.4-0.20220914220351-2e461edbfe48 + gitlab.com/xx_network/crypto v0.0.5-0.20220902182733-69aad094b487 + gitlab.com/xx_network/primitives v0.0.4-0.20220902183448-319596e2fec8 go.uber.org/ratelimit v0.2.0 golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa golang.org/x/net v0.0.0-20220802222814-0bcc04d9c69b