diff --git a/go/admin.pb.go b/go/admin.pb.go index 36a9050..8d0061b 100644 --- a/go/admin.pb.go +++ b/go/admin.pb.go @@ -4,18 +4,13 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -192,8 +187,9 @@ type BlockstoreRequest struct { ReqOpts BSREQOPTS `protobuf:"varint,3,opt,name=reqOpts,proto3,enum=pb.BSREQOPTS" json:"reqOpts,omitempty"` } -func (m *BlockstoreRequest) Reset() { *m = BlockstoreRequest{} } -func (*BlockstoreRequest) ProtoMessage() {} +func (m *BlockstoreRequest) Reset() { *m = BlockstoreRequest{} } +func (m *BlockstoreRequest) String() string { return proto.CompactTextString(m) } +func (*BlockstoreRequest) ProtoMessage() {} func (*BlockstoreRequest) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{0} } @@ -250,8 +246,9 @@ type BlockstoreResponse struct { Blocks []*Block `protobuf:"bytes,1,rep,name=blocks,proto3" json:"blocks,omitempty"` } -func (m *BlockstoreResponse) Reset() { *m = BlockstoreResponse{} } -func (*BlockstoreResponse) ProtoMessage() {} +func (m *BlockstoreResponse) Reset() { *m = BlockstoreResponse{} } +func (m *BlockstoreResponse) String() string { return proto.CompactTextString(m) } +func (*BlockstoreResponse) ProtoMessage() {} func (*BlockstoreResponse) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{1} } @@ -297,8 +294,9 @@ type Block struct { Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` } -func (m *Block) Reset() { *m = Block{} } -func (*Block) ProtoMessage() {} +func (m *Block) Reset() { *m = Block{} } +func (m *Block) String() string { return proto.CompactTextString(m) } +func (*Block) ProtoMessage() {} func (*Block) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{2} } @@ -349,8 +347,9 @@ type ManageGCRequest struct { Type GCREQTYPE `protobuf:"varint,1,opt,name=type,proto3,enum=pb.GCREQTYPE" json:"type,omitempty"` } -func (m *ManageGCRequest) Reset() { *m = ManageGCRequest{} } -func (*ManageGCRequest) ProtoMessage() {} +func (m *ManageGCRequest) Reset() { *m = ManageGCRequest{} } +func (m *ManageGCRequest) String() string { return proto.CompactTextString(m) } +func (*ManageGCRequest) ProtoMessage() {} func (*ManageGCRequest) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{3} } @@ -394,8 +393,9 @@ type ManageGCResponse struct { Status string `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"` } -func (m *ManageGCResponse) Reset() { *m = ManageGCResponse{} } -func (*ManageGCResponse) ProtoMessage() {} +func (m *ManageGCResponse) Reset() { *m = ManageGCResponse{} } +func (m *ManageGCResponse) String() string { return proto.CompactTextString(m) } +func (*ManageGCResponse) ProtoMessage() {} func (*ManageGCResponse) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{4} } @@ -442,8 +442,9 @@ type RefCountRequest struct { Limit int64 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` } -func (m *RefCountRequest) Reset() { *m = RefCountRequest{} } -func (*RefCountRequest) ProtoMessage() {} +func (m *RefCountRequest) Reset() { *m = RefCountRequest{} } +func (m *RefCountRequest) String() string { return proto.CompactTextString(m) } +func (*RefCountRequest) ProtoMessage() {} func (*RefCountRequest) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{5} } @@ -495,8 +496,9 @@ type RefCountResponse struct { Cids map[string]int64 `protobuf:"bytes,1,rep,name=cids,proto3" json:"cids,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } -func (m *RefCountResponse) Reset() { *m = RefCountResponse{} } -func (*RefCountResponse) ProtoMessage() {} +func (m *RefCountResponse) Reset() { *m = RefCountResponse{} } +func (m *RefCountResponse) String() string { return proto.CompactTextString(m) } +func (*RefCountResponse) ProtoMessage() {} func (*RefCountResponse) Descriptor() ([]byte, []int) { return fileDescriptor_73a7fc70dcc2027c, []int{6} } @@ -553,586 +555,43 @@ func init() { func init() { proto.RegisterFile("admin.proto", fileDescriptor_73a7fc70dcc2027c) } var fileDescriptor_73a7fc70dcc2027c = []byte{ - // 632 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xc1, 0x6e, 0xda, 0x4c, - 0x10, 0xf6, 0x42, 0x42, 0xe2, 0x21, 0x24, 0xce, 0xfe, 0xf9, 0x23, 0x44, 0xa5, 0x55, 0xe2, 0x43, - 0x1b, 0x21, 0x85, 0x48, 0x34, 0x55, 0xaa, 0x56, 0x3d, 0x80, 0xb3, 0xa0, 0x4a, 0x49, 0xa0, 0x8b, - 0x39, 0xe4, 0x84, 0x0c, 0x38, 0xd4, 0x4a, 0x82, 0x09, 0x5e, 0x2a, 0x71, 0x6a, 0x1f, 0xa1, 0x8f, - 0xd1, 0x47, 0xa8, 0xd4, 0x17, 0xe8, 0x31, 0xc7, 0x1c, 0x83, 0xf3, 0x02, 0x3d, 0xf6, 0x58, 0xed, - 0xda, 0x0b, 0xd4, 0x87, 0xde, 0x66, 0xe6, 0x9b, 0xcf, 0xdf, 0xb7, 0x33, 0xbb, 0x86, 0xac, 0xd3, - 0xbf, 0xf5, 0x86, 0xa5, 0xd1, 0xd8, 0xe7, 0x3e, 0x4e, 0x8d, 0xba, 0x85, 0xc3, 0x81, 0xc7, 0x3f, - 0x4e, 0xba, 0xa5, 0x9e, 0x7f, 0x7b, 0x34, 0xf0, 0x07, 0xfe, 0x91, 0x84, 0xba, 0x93, 0x2b, 0x99, - 0xc9, 0x44, 0x46, 0x11, 0xc5, 0x9c, 0xc2, 0x76, 0xf5, 0xc6, 0xef, 0x5d, 0x07, 0xdc, 0x1f, 0xbb, - 0xcc, 0xbd, 0x9b, 0xb8, 0x01, 0xc7, 0x18, 0x56, 0x7a, 0x5e, 0x3f, 0xc8, 0xa3, 0xbd, 0xf4, 0x81, - 0xce, 0x64, 0x8c, 0x5f, 0xc0, 0xda, 0xd8, 0xbd, 0xb3, 0xa7, 0x23, 0x37, 0x9f, 0xda, 0x43, 0x07, - 0x9b, 0xe5, 0x5c, 0x69, 0xd4, 0x2d, 0x55, 0x5b, 0x8c, 0x7e, 0xb0, 0x2f, 0x9b, 0x94, 0x29, 0x34, - 0x6e, 0x6c, 0x8c, 0x78, 0x90, 0x4f, 0x27, 0x1a, 0x1b, 0x4d, 0xbb, 0xc5, 0x14, 0x6a, 0x9e, 0x00, - 0x5e, 0x96, 0x0e, 0x46, 0xfe, 0x30, 0x70, 0xf1, 0x3e, 0x64, 0xba, 0xb2, 0x2a, 0xd5, 0xb3, 0x65, - 0x5d, 0xb2, 0x45, 0x85, 0xc5, 0x80, 0x79, 0x08, 0xab, 0xb2, 0x80, 0x0d, 0x48, 0xf7, 0xbc, 0x7e, - 0x1e, 0xed, 0xa1, 0x03, 0x9d, 0x89, 0x50, 0x38, 0xef, 0x3b, 0xdc, 0x91, 0x16, 0x37, 0x98, 0x8c, - 0xcd, 0x63, 0xd8, 0x3a, 0x77, 0x86, 0xce, 0xc0, 0xad, 0x5b, 0xea, 0x80, 0xfb, 0xb0, 0xc2, 0xc5, - 0x49, 0xd0, 0xc2, 0x60, 0xdd, 0x52, 0x27, 0x91, 0x90, 0x59, 0x04, 0x63, 0xc1, 0x8a, 0xbd, 0xed, - 0x42, 0x26, 0xe0, 0x0e, 0x9f, 0x04, 0xb1, 0x64, 0x9c, 0x99, 0x6f, 0x61, 0x8b, 0xb9, 0x57, 0x96, - 0x3f, 0x19, 0xf2, 0x7f, 0x8d, 0x70, 0x07, 0x56, 0x6f, 0xbc, 0x5b, 0x8f, 0x4b, 0x77, 0x69, 0x16, - 0x25, 0xe6, 0x67, 0x30, 0x16, 0xe4, 0x58, 0xa8, 0xbc, 0xc4, 0xce, 0x96, 0x89, 0xf0, 0x97, 0xec, - 0x29, 0x59, 0x5e, 0x3f, 0xa0, 0x43, 0x3e, 0x9e, 0x46, 0x5f, 0x2f, 0x9c, 0x80, 0x3e, 0x2f, 0x89, - 0xc9, 0x5c, 0xbb, 0x53, 0x35, 0x99, 0x6b, 0x77, 0x2a, 0xc4, 0x3f, 0x39, 0x37, 0x13, 0x57, 0x89, - 0xcb, 0xe4, 0x4d, 0xea, 0x35, 0x2a, 0xda, 0xa0, 0xcf, 0xd7, 0x88, 0x73, 0x22, 0xe9, 0x9c, 0xd2, - 0x33, 0x6a, 0x53, 0x43, 0xc3, 0x00, 0x99, 0x6a, 0xab, 0xd3, 0x6c, 0xdb, 0x06, 0xc2, 0x5b, 0x90, - 0x8d, 0xe2, 0xce, 0x79, 0xe5, 0xe2, 0xd2, 0x48, 0xc5, 0x60, 0x9d, 0xda, 0x46, 0x3a, 0x06, 0xeb, - 0x34, 0x06, 0x57, 0x8a, 0xcf, 0xe3, 0xaf, 0x8a, 0x9d, 0xe3, 0x2c, 0xac, 0x9d, 0xd2, 0x5a, 0xa5, - 0x7d, 0x66, 0x1b, 0x1a, 0xde, 0x80, 0xf5, 0x6a, 0xab, 0x53, 0x6b, 0x30, 0x8b, 0x1a, 0xa8, 0xf8, - 0x0a, 0xf4, 0xf9, 0xe8, 0x05, 0x54, 0xb7, 0x3a, 0x2d, 0xbb, 0xc2, 0x44, 0x63, 0x16, 0xd6, 0x64, - 0xd6, 0x68, 0x1a, 0x48, 0x18, 0x8b, 0x20, 0xbb, 0xdd, 0x32, 0x52, 0xc5, 0x23, 0x00, 0x46, 0x6b, - 0x8a, 0xb7, 0x0d, 0x39, 0x46, 0x6b, 0x52, 0xde, 0x6a, 0xb4, 0x2f, 0x04, 0x79, 0x53, 0x36, 0xa8, - 0x93, 0xa0, 0xe2, 0x33, 0x45, 0x90, 0x86, 0x72, 0xa0, 0x0b, 0x34, 0x32, 0xa1, 0x95, 0x7f, 0x20, - 0x58, 0xaf, 0x88, 0x87, 0x54, 0x69, 0xbe, 0xc7, 0x27, 0xb0, 0xae, 0x36, 0x8f, 0xff, 0x13, 0xa3, - 0x4f, 0xdc, 0x9e, 0xc2, 0xce, 0xdf, 0xc5, 0x68, 0x1f, 0xa6, 0x26, 0x88, 0x6a, 0x4b, 0x11, 0x31, - 0x71, 0x29, 0x22, 0x62, 0x72, 0x91, 0xa6, 0x86, 0xdf, 0x01, 0x2c, 0x5e, 0x02, 0xfe, 0x7f, 0x7e, - 0xe3, 0x97, 0x1f, 0x65, 0x61, 0x37, 0x59, 0x56, 0xf4, 0xea, 0xf1, 0xc3, 0x8c, 0x68, 0x8f, 0x33, - 0x82, 0x7e, 0xcd, 0x08, 0xfa, 0x3d, 0x23, 0xe8, 0x4b, 0x48, 0xd0, 0xb7, 0x90, 0xa0, 0xef, 0x21, - 0x41, 0x3f, 0x43, 0x82, 0xee, 0x43, 0x82, 0x1e, 0x43, 0x82, 0xbe, 0x3e, 0x11, 0xed, 0xfe, 0x89, - 0x68, 0x0f, 0x4f, 0x44, 0xeb, 0x66, 0xe4, 0x0f, 0xe0, 0xe5, 0x9f, 0x00, 0x00, 0x00, 0xff, 0xff, - 0xd7, 0x80, 0xfc, 0x1c, 0x42, 0x04, 0x00, 0x00, -} - -func (this *BlockstoreRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*BlockstoreRequest) - if !ok { - that2, ok := that.(BlockstoreRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *BlockstoreRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *BlockstoreRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *BlockstoreRequest but is not nil && this == nil") - } - if len(this.Cids) != len(that1.Cids) { - return fmt.Errorf("Cids this(%v) Not Equal that(%v)", len(this.Cids), len(that1.Cids)) - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return fmt.Errorf("Cids this[%v](%v) Not Equal that[%v](%v)", i, this.Cids[i], i, that1.Cids[i]) - } - } - if this.ReqType != that1.ReqType { - return fmt.Errorf("ReqType this(%v) Not Equal that(%v)", this.ReqType, that1.ReqType) - } - if this.ReqOpts != that1.ReqOpts { - return fmt.Errorf("ReqOpts this(%v) Not Equal that(%v)", this.ReqOpts, that1.ReqOpts) - } - return nil -} -func (this *BlockstoreRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockstoreRequest) - if !ok { - that2, ok := that.(BlockstoreRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Cids) != len(that1.Cids) { - return false - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return false - } - } - if this.ReqType != that1.ReqType { - return false - } - if this.ReqOpts != that1.ReqOpts { - return false - } - return true -} -func (this *BlockstoreResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*BlockstoreResponse) - if !ok { - that2, ok := that.(BlockstoreResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *BlockstoreResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *BlockstoreResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *BlockstoreResponse but is not nil && this == nil") - } - if len(this.Blocks) != len(that1.Blocks) { - return fmt.Errorf("Blocks this(%v) Not Equal that(%v)", len(this.Blocks), len(that1.Blocks)) - } - for i := range this.Blocks { - if !this.Blocks[i].Equal(that1.Blocks[i]) { - return fmt.Errorf("Blocks this[%v](%v) Not Equal that[%v](%v)", i, this.Blocks[i], i, that1.Blocks[i]) - } - } - return nil -} -func (this *BlockstoreResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*BlockstoreResponse) - if !ok { - that2, ok := that.(BlockstoreResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Blocks) != len(that1.Blocks) { - return false - } - for i := range this.Blocks { - if !this.Blocks[i].Equal(that1.Blocks[i]) { - return false - } - } - return true -} -func (this *Block) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Block) - if !ok { - that2, ok := that.(Block) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Block") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Block but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Block but is not nil && this == nil") - } - if this.Cid != that1.Cid { - return fmt.Errorf("Cid this(%v) Not Equal that(%v)", this.Cid, that1.Cid) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - return nil -} -func (this *Block) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Block) - if !ok { - that2, ok := that.(Block) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Cid != that1.Cid { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - return true -} -func (this *ManageGCRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ManageGCRequest) - if !ok { - that2, ok := that.(ManageGCRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ManageGCRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ManageGCRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ManageGCRequest but is not nil && this == nil") - } - if this.Type != that1.Type { - return fmt.Errorf("Type this(%v) Not Equal that(%v)", this.Type, that1.Type) - } - return nil -} -func (this *ManageGCRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ManageGCRequest) - if !ok { - that2, ok := that.(ManageGCRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Type != that1.Type { - return false - } - return true -} -func (this *ManageGCResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ManageGCResponse) - if !ok { - that2, ok := that.(ManageGCResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ManageGCResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ManageGCResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ManageGCResponse but is not nil && this == nil") - } - if this.Status != that1.Status { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) - } - return nil -} -func (this *ManageGCResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ManageGCResponse) - if !ok { - that2, ok := that.(ManageGCResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Status != that1.Status { - return false - } - return true -} -func (this *RefCountRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RefCountRequest) - if !ok { - that2, ok := that.(RefCountRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RefCountRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RefCountRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RefCountRequest but is not nil && this == nil") - } - if len(this.Cids) != len(that1.Cids) { - return fmt.Errorf("Cids this(%v) Not Equal that(%v)", len(this.Cids), len(that1.Cids)) - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return fmt.Errorf("Cids this[%v](%v) Not Equal that[%v](%v)", i, this.Cids[i], i, that1.Cids[i]) - } - } - if this.Limit != that1.Limit { - return fmt.Errorf("Limit this(%v) Not Equal that(%v)", this.Limit, that1.Limit) - } - return nil -} -func (this *RefCountRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RefCountRequest) - if !ok { - that2, ok := that.(RefCountRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Cids) != len(that1.Cids) { - return false - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return false - } - } - if this.Limit != that1.Limit { - return false - } - return true -} -func (this *RefCountResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*RefCountResponse) - if !ok { - that2, ok := that.(RefCountResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *RefCountResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *RefCountResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *RefCountResponse but is not nil && this == nil") - } - if len(this.Cids) != len(that1.Cids) { - return fmt.Errorf("Cids this(%v) Not Equal that(%v)", len(this.Cids), len(that1.Cids)) - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return fmt.Errorf("Cids this[%v](%v) Not Equal that[%v](%v)", i, this.Cids[i], i, that1.Cids[i]) - } - } - return nil -} -func (this *RefCountResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*RefCountResponse) - if !ok { - that2, ok := that.(RefCountResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Cids) != len(that1.Cids) { - return false - } - for i := range this.Cids { - if this.Cids[i] != that1.Cids[i] { - return false - } - } - return true -} -func (this *BlockstoreRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.BlockstoreRequest{") - s = append(s, "Cids: "+fmt.Sprintf("%#v", this.Cids)+",\n") - s = append(s, "ReqType: "+fmt.Sprintf("%#v", this.ReqType)+",\n") - s = append(s, "ReqOpts: "+fmt.Sprintf("%#v", this.ReqOpts)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *BlockstoreResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.BlockstoreResponse{") - if this.Blocks != nil { - s = append(s, "Blocks: "+fmt.Sprintf("%#v", this.Blocks)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Block) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.Block{") - s = append(s, "Cid: "+fmt.Sprintf("%#v", this.Cid)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ManageGCRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.ManageGCRequest{") - s = append(s, "Type: "+fmt.Sprintf("%#v", this.Type)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ManageGCResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.ManageGCResponse{") - s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RefCountRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.RefCountRequest{") - s = append(s, "Cids: "+fmt.Sprintf("%#v", this.Cids)+",\n") - s = append(s, "Limit: "+fmt.Sprintf("%#v", this.Limit)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *RefCountResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.RefCountResponse{") - keysForCids := make([]string, 0, len(this.Cids)) - for k := range this.Cids { - keysForCids = append(keysForCids, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCids) - mapStringForCids := "map[string]int64{" - for _, k := range keysForCids { - mapStringForCids += fmt.Sprintf("%#v: %#v,", k, this.Cids[k]) - } - mapStringForCids += "}" - if this.Cids != nil { - s = append(s, "Cids: "+mapStringForCids+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringAdmin(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 572 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xc1, 0x6e, 0xda, 0x40, + 0x10, 0xf5, 0x42, 0x42, 0xe2, 0x71, 0x08, 0xce, 0x36, 0x8d, 0x10, 0x95, 0x2c, 0xe2, 0x43, 0x8b, + 0x2c, 0x95, 0x4a, 0xb4, 0x15, 0x55, 0xab, 0x1e, 0xc0, 0x59, 0x50, 0xa5, 0x24, 0xd0, 0xb5, 0x39, + 0xe4, 0x84, 0x0c, 0xb8, 0x95, 0x05, 0xc1, 0x0e, 0x5e, 0x2a, 0x71, 0xea, 0x2f, 0xf4, 0x7f, 0xfa, + 0x03, 0x3d, 0xe6, 0xd8, 0x63, 0x05, 0x3f, 0x52, 0xed, 0xda, 0x0b, 0xd4, 0x87, 0xde, 0x66, 0xe6, + 0xcd, 0xdb, 0x79, 0x33, 0xb3, 0x03, 0x9a, 0x37, 0xb9, 0x0f, 0xe6, 0xf5, 0x68, 0x11, 0xb2, 0x10, + 0xe7, 0xa2, 0x91, 0xb9, 0x82, 0xb3, 0xf6, 0x2c, 0x1c, 0x4f, 0x63, 0x16, 0x2e, 0x7c, 0xea, 0x3f, + 0x2c, 0xfd, 0x98, 0x61, 0x0c, 0x07, 0xe3, 0x60, 0x12, 0x97, 0x51, 0x35, 0x5f, 0x53, 0xa9, 0xb0, + 0xf1, 0x0b, 0x38, 0x5a, 0xf8, 0x0f, 0xee, 0x2a, 0xf2, 0xcb, 0xb9, 0x2a, 0xaa, 0x9d, 0x36, 0x8a, + 0xf5, 0x68, 0x54, 0x6f, 0x3b, 0x94, 0x7c, 0x76, 0xef, 0xfa, 0x84, 0x4a, 0x34, 0x4d, 0xec, 0x45, + 0x2c, 0x2e, 0xe7, 0x33, 0x89, 0xbd, 0xbe, 0xeb, 0x50, 0x89, 0x9a, 0x4d, 0xc0, 0xfb, 0xa5, 0xe3, + 0x28, 0x9c, 0xc7, 0x3e, 0xbe, 0x84, 0xc2, 0x48, 0x44, 0x45, 0x75, 0xad, 0xa1, 0x0a, 0x36, 0x8f, + 0xd0, 0x14, 0x30, 0x5f, 0xc2, 0xa1, 0x08, 0x60, 0x1d, 0xf2, 0xe3, 0x60, 0x52, 0x46, 0x55, 0x54, + 0x53, 0x29, 0x37, 0xb9, 0xf2, 0x89, 0xc7, 0x3c, 0x21, 0xf1, 0x84, 0x0a, 0xdb, 0x7c, 0x03, 0xa5, + 0x1b, 0x6f, 0xee, 0x7d, 0xf5, 0xbb, 0xb6, 0x6c, 0xf0, 0x12, 0x0e, 0x18, 0xef, 0x04, 0xed, 0x04, + 0x76, 0x6d, 0xd9, 0x89, 0x80, 0x4c, 0x0b, 0xf4, 0x1d, 0x2b, 0xd5, 0x76, 0x01, 0x85, 0x98, 0x79, + 0x6c, 0x19, 0xa7, 0x25, 0x53, 0xcf, 0xfc, 0x00, 0x25, 0xea, 0x7f, 0xb1, 0xc3, 0xe5, 0x9c, 0xfd, + 0x6f, 0x84, 0xe7, 0x70, 0x38, 0x0b, 0xee, 0x03, 0x26, 0xd4, 0xe5, 0x69, 0xe2, 0x98, 0xdf, 0x41, + 0xdf, 0x91, 0xd3, 0x42, 0x8d, 0x3d, 0xb6, 0xd6, 0x30, 0xb8, 0xbe, 0x6c, 0x4e, 0xdd, 0x0e, 0x26, + 0x31, 0x99, 0xb3, 0xc5, 0x2a, 0x79, 0xbd, 0xd2, 0x04, 0x75, 0x1b, 0xe2, 0x93, 0x99, 0xfa, 0x2b, + 0x39, 0x99, 0xa9, 0xbf, 0xe2, 0xc5, 0xbf, 0x79, 0xb3, 0xa5, 0x2f, 0x8b, 0x0b, 0xe7, 0x7d, 0xee, + 0x1d, 0xb2, 0x5c, 0x50, 0xb7, 0x6b, 0xc4, 0x45, 0xee, 0x0c, 0xaf, 0xc8, 0x35, 0x71, 0x89, 0xae, + 0x60, 0x80, 0x42, 0xdb, 0x19, 0xf6, 0x07, 0xae, 0x8e, 0x70, 0x09, 0xb4, 0xc4, 0x1e, 0xde, 0xb4, + 0x6e, 0xef, 0xf4, 0x5c, 0x0a, 0x76, 0x89, 0xab, 0xe7, 0x53, 0xb0, 0x4b, 0x52, 0xf0, 0xc0, 0x7a, + 0x9e, 0xbe, 0xca, 0x77, 0x8e, 0x35, 0x38, 0xba, 0x22, 0x9d, 0xd6, 0xe0, 0xda, 0xd5, 0x15, 0x7c, + 0x02, 0xc7, 0x6d, 0x67, 0xd8, 0xe9, 0x51, 0x9b, 0xe8, 0xc8, 0x7a, 0x0b, 0xea, 0x76, 0xf4, 0x1c, + 0xea, 0xda, 0x43, 0xc7, 0x6d, 0x51, 0x9e, 0xa8, 0xc1, 0x91, 0xf0, 0x7a, 0x7d, 0x1d, 0x71, 0x61, + 0x09, 0xe4, 0x0e, 0x1c, 0x3d, 0x67, 0xbd, 0x02, 0xa0, 0xa4, 0x23, 0x79, 0x67, 0x50, 0xa4, 0xa4, + 0x23, 0xca, 0xdb, 0xbd, 0xc1, 0x2d, 0x27, 0x9f, 0x8a, 0x04, 0xd9, 0x09, 0xb2, 0x9e, 0x49, 0x82, + 0x10, 0x54, 0x04, 0x95, 0xa3, 0x89, 0x08, 0xa5, 0xf1, 0x13, 0xc1, 0x71, 0x8b, 0x5f, 0x46, 0xab, + 0xff, 0x09, 0x37, 0xe1, 0x58, 0x6e, 0x1e, 0x3f, 0xe1, 0xa3, 0xcf, 0xfc, 0x9e, 0xca, 0xf9, 0xbf, + 0xc1, 0x64, 0x1f, 0xa6, 0xc2, 0x89, 0x72, 0x4b, 0x09, 0x31, 0xf3, 0x29, 0x12, 0x62, 0x76, 0x91, + 0xa6, 0x82, 0x3f, 0x02, 0xec, 0x2e, 0x01, 0x3f, 0xdd, 0xfe, 0xf8, 0xfd, 0xa3, 0xac, 0x5c, 0x64, + 0xc3, 0x92, 0xde, 0x2e, 0xff, 0x5a, 0x1b, 0xe8, 0x71, 0x6d, 0xa0, 0x3f, 0x6b, 0x03, 0xfd, 0xd8, + 0x18, 0xca, 0xe3, 0xc6, 0x50, 0x7e, 0x6f, 0x0c, 0x65, 0x54, 0x10, 0x87, 0xfe, 0xfa, 0x6f, 0x00, + 0x00, 0x00, 0xff, 0xff, 0xc5, 0x09, 0xee, 0xe5, 0xf7, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1555,169 +1014,6 @@ func encodeVarintAdmin(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedBlockstoreRequest(r randyAdmin, easy bool) *BlockstoreRequest { - this := &BlockstoreRequest{} - v1 := r.Intn(10) - this.Cids = make([]string, v1) - for i := 0; i < v1; i++ { - this.Cids[i] = string(randStringAdmin(r)) - } - this.ReqType = BSREQTYPE([]int32{0, 1, 2, 3, 4}[r.Intn(5)]) - this.ReqOpts = BSREQOPTS([]int32{0, 1}[r.Intn(2)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBlockstoreResponse(r randyAdmin, easy bool) *BlockstoreResponse { - this := &BlockstoreResponse{} - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Blocks = make([]*Block, v2) - for i := 0; i < v2; i++ { - this.Blocks[i] = NewPopulatedBlock(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBlock(r randyAdmin, easy bool) *Block { - this := &Block{} - this.Cid = string(randStringAdmin(r)) - v3 := r.Intn(100) - this.Data = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedManageGCRequest(r randyAdmin, easy bool) *ManageGCRequest { - this := &ManageGCRequest{} - this.Type = GCREQTYPE([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedManageGCResponse(r randyAdmin, easy bool) *ManageGCResponse { - this := &ManageGCResponse{} - this.Status = string(randStringAdmin(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRefCountRequest(r randyAdmin, easy bool) *RefCountRequest { - this := &RefCountRequest{} - v4 := r.Intn(10) - this.Cids = make([]string, v4) - for i := 0; i < v4; i++ { - this.Cids[i] = string(randStringAdmin(r)) - } - this.Limit = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Limit *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedRefCountResponse(r randyAdmin, easy bool) *RefCountResponse { - this := &RefCountResponse{} - if r.Intn(5) != 0 { - v5 := r.Intn(10) - this.Cids = make(map[string]int64) - for i := 0; i < v5; i++ { - v6 := randStringAdmin(r) - this.Cids[v6] = int64(r.Int63()) - if r.Intn(2) == 0 { - this.Cids[v6] *= -1 - } - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyAdmin interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneAdmin(r randyAdmin) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringAdmin(r randyAdmin) string { - v7 := r.Intn(100) - tmps := make([]rune, v7) - for i := 0; i < v7; i++ { - tmps[i] = randUTF8RuneAdmin(r) - } - return string(tmps) -} -func randUnrecognizedAdmin(r randyAdmin, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldAdmin(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldAdmin(dAtA []byte, r randyAdmin, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(key)) - v8 := r.Int63() - if r.Intn(2) == 0 { - v8 *= -1 - } - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(v8)) - case 1: - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateAdmin(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateAdmin(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *BlockstoreRequest) Size() (n int) { if m == nil { return 0 @@ -1837,103 +1133,6 @@ func sovAdmin(x uint64) (n int) { func sozAdmin(x uint64) (n int) { return sovAdmin(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *BlockstoreRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&BlockstoreRequest{`, - `Cids:` + fmt.Sprintf("%v", this.Cids) + `,`, - `ReqType:` + fmt.Sprintf("%v", this.ReqType) + `,`, - `ReqOpts:` + fmt.Sprintf("%v", this.ReqOpts) + `,`, - `}`, - }, "") - return s -} -func (this *BlockstoreResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForBlocks := "[]*Block{" - for _, f := range this.Blocks { - repeatedStringForBlocks += strings.Replace(f.String(), "Block", "Block", 1) + "," - } - repeatedStringForBlocks += "}" - s := strings.Join([]string{`&BlockstoreResponse{`, - `Blocks:` + repeatedStringForBlocks + `,`, - `}`, - }, "") - return s -} -func (this *Block) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Block{`, - `Cid:` + fmt.Sprintf("%v", this.Cid) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `}`, - }, "") - return s -} -func (this *ManageGCRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ManageGCRequest{`, - `Type:` + fmt.Sprintf("%v", this.Type) + `,`, - `}`, - }, "") - return s -} -func (this *ManageGCResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ManageGCResponse{`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `}`, - }, "") - return s -} -func (this *RefCountRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&RefCountRequest{`, - `Cids:` + fmt.Sprintf("%v", this.Cids) + `,`, - `Limit:` + fmt.Sprintf("%v", this.Limit) + `,`, - `}`, - }, "") - return s -} -func (this *RefCountResponse) String() string { - if this == nil { - return "nil" - } - keysForCids := make([]string, 0, len(this.Cids)) - for k := range this.Cids { - keysForCids = append(keysForCids, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForCids) - mapStringForCids := "map[string]int64{" - for _, k := range keysForCids { - mapStringForCids += fmt.Sprintf("%v: %v,", k, this.Cids[k]) - } - mapStringForCids += "}" - s := strings.Join([]string{`&RefCountResponse{`, - `Cids:` + mapStringForCids + `,`, - `}`, - }, "") - return s -} -func valueToStringAdmin(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *BlockstoreRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/adminpb_test.go b/go/adminpb_test.go deleted file mode 100644 index b86a52b..0000000 --- a/go/adminpb_test.go +++ /dev/null @@ -1,1258 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: admin.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestBlockstoreRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlockstoreRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlockstoreResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Block{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlockMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Block{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestManageGCRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestManageGCResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRefCountRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestRefCountResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlockstoreResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &BlockstoreResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlockJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Block{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestManageGCRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestManageGCResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ManageGCResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRefCountRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestRefCountResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &RefCountResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlockstoreRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BlockstoreRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BlockstoreRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &BlockstoreResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &BlockstoreResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Block{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Block{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ManageGCRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ManageGCRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ManageGCResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestManageGCResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ManageGCResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &RefCountRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &RefCountRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &RefCountResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestRefCountResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &RefCountResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlockstoreRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &BlockstoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBlockstoreResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &BlockstoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBlockVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlock(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Block{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestManageGCRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ManageGCRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestManageGCResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ManageGCResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRefCountRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RefCountRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestRefCountResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &RefCountResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBlockstoreRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBlockstoreResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBlockGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlock(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestManageGCRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestManageGCResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestRefCountRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestRefCountResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBlockstoreRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlockstoreResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlockstoreResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlockSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlock(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestManageGCRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestManageGCResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedManageGCResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestRefCountRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestRefCountResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedRefCountResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlockstoreRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBlockstoreResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlockstoreResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBlockStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlock(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestManageGCRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestManageGCResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedManageGCResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestRefCountRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestRefCountResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedRefCountResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/dag.pb.go b/go/dag.pb.go index 1055cc9..f771e86 100644 --- a/go/dag.pb.go +++ b/go/dag.pb.go @@ -4,18 +4,13 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -39,8 +34,9 @@ type DagPutResponse struct { Hashes []string `protobuf:"bytes,1,rep,name=hashes,proto3" json:"hashes,omitempty"` } -func (m *DagPutResponse) Reset() { *m = DagPutResponse{} } -func (*DagPutResponse) ProtoMessage() {} +func (m *DagPutResponse) Reset() { *m = DagPutResponse{} } +func (m *DagPutResponse) String() string { return proto.CompactTextString(m) } +func (*DagPutResponse) ProtoMessage() {} func (*DagPutResponse) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{0} } @@ -92,8 +88,9 @@ type DagPutRequest struct { CidVersion int64 `protobuf:"varint,5,opt,name=cidVersion,proto3" json:"cidVersion,omitempty"` } -func (m *DagPutRequest) Reset() { *m = DagPutRequest{} } -func (*DagPutRequest) ProtoMessage() {} +func (m *DagPutRequest) Reset() { *m = DagPutRequest{} } +func (m *DagPutRequest) String() string { return proto.CompactTextString(m) } +func (*DagPutRequest) ProtoMessage() {} func (*DagPutRequest) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{1} } @@ -169,8 +166,9 @@ type DagGetRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` } -func (m *DagGetRequest) Reset() { *m = DagGetRequest{} } -func (*DagGetRequest) ProtoMessage() {} +func (m *DagGetRequest) Reset() { *m = DagGetRequest{} } +func (m *DagGetRequest) String() string { return proto.CompactTextString(m) } +func (*DagGetRequest) ProtoMessage() {} func (*DagGetRequest) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{2} } @@ -215,8 +213,9 @@ type DagGetResponse struct { RawData []byte `protobuf:"bytes,1,opt,name=rawData,proto3" json:"rawData,omitempty"` } -func (m *DagGetResponse) Reset() { *m = DagGetResponse{} } -func (*DagGetResponse) ProtoMessage() {} +func (m *DagGetResponse) Reset() { *m = DagGetResponse{} } +func (m *DagGetResponse) String() string { return proto.CompactTextString(m) } +func (*DagGetResponse) ProtoMessage() {} func (*DagGetResponse) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{3} } @@ -265,8 +264,9 @@ type NewIPLDNodeRequest struct { HashFunc string `protobuf:"bytes,3,opt,name=hashFunc,proto3" json:"hashFunc,omitempty"` } -func (m *NewIPLDNodeRequest) Reset() { *m = NewIPLDNodeRequest{} } -func (*NewIPLDNodeRequest) ProtoMessage() {} +func (m *NewIPLDNodeRequest) Reset() { *m = NewIPLDNodeRequest{} } +func (m *NewIPLDNodeRequest) String() string { return proto.CompactTextString(m) } +func (*NewIPLDNodeRequest) ProtoMessage() {} func (*NewIPLDNodeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{4} } @@ -329,8 +329,9 @@ type AddLinksRequest struct { HashFunc string `protobuf:"bytes,3,opt,name=hashFunc,proto3" json:"hashFunc,omitempty"` } -func (m *AddLinksRequest) Reset() { *m = AddLinksRequest{} } -func (*AddLinksRequest) ProtoMessage() {} +func (m *AddLinksRequest) Reset() { *m = AddLinksRequest{} } +func (m *AddLinksRequest) String() string { return proto.CompactTextString(m) } +func (*AddLinksRequest) ProtoMessage() {} func (*AddLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{5} } @@ -388,8 +389,9 @@ type GetLinksRequest struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` } -func (m *GetLinksRequest) Reset() { *m = GetLinksRequest{} } -func (*GetLinksRequest) ProtoMessage() {} +func (m *GetLinksRequest) Reset() { *m = GetLinksRequest{} } +func (m *GetLinksRequest) String() string { return proto.CompactTextString(m) } +func (*GetLinksRequest) ProtoMessage() {} func (*GetLinksRequest) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{6} } @@ -434,8 +436,9 @@ type GetLinksResponse struct { Links []*IPLDLink `protobuf:"bytes,1,rep,name=links,proto3" json:"links,omitempty"` } -func (m *GetLinksResponse) Reset() { *m = GetLinksResponse{} } -func (*GetLinksResponse) ProtoMessage() {} +func (m *GetLinksResponse) Reset() { *m = GetLinksResponse{} } +func (m *GetLinksResponse) String() string { return proto.CompactTextString(m) } +func (*GetLinksResponse) ProtoMessage() {} func (*GetLinksResponse) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{7} } @@ -483,8 +486,9 @@ type IPLDLink struct { Size_ uint64 `protobuf:"varint,3,opt,name=size,proto3" json:"size,omitempty"` } -func (m *IPLDLink) Reset() { *m = IPLDLink{} } -func (*IPLDLink) ProtoMessage() {} +func (m *IPLDLink) Reset() { *m = IPLDLink{} } +func (m *IPLDLink) String() string { return proto.CompactTextString(m) } +func (*IPLDLink) ProtoMessage() {} func (*IPLDLink) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{8} } @@ -544,8 +548,9 @@ type IPLDNode struct { Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` } -func (m *IPLDNode) Reset() { *m = IPLDNode{} } -func (*IPLDNode) ProtoMessage() {} +func (m *IPLDNode) Reset() { *m = IPLDNode{} } +func (m *IPLDNode) String() string { return proto.CompactTextString(m) } +func (*IPLDNode) ProtoMessage() {} func (*IPLDNode) Descriptor() ([]byte, []int) { return fileDescriptor_228b96b95413374c, []int{9} } @@ -608,849 +613,41 @@ func init() { func init() { proto.RegisterFile("dag.proto", fileDescriptor_228b96b95413374c) } var fileDescriptor_228b96b95413374c = []byte{ - // 598 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0xcd, 0x6e, 0xd3, 0x40, - 0x10, 0xf6, 0x3a, 0x69, 0x49, 0xa6, 0x21, 0x2d, 0xdb, 0xaa, 0xb2, 0x72, 0x58, 0x05, 0x23, 0x50, - 0x84, 0x44, 0x0a, 0xa5, 0xa2, 0x15, 0x3d, 0xb5, 0x4a, 0x13, 0x55, 0xaa, 0xaa, 0xc8, 0x42, 0xdc, - 0xd7, 0xf1, 0xe2, 0x98, 0x26, 0xde, 0xe0, 0x1f, 0xaa, 0xf6, 0xc4, 0x23, 0xf0, 0x0a, 0xdc, 0xb8, - 0x72, 0x02, 0xde, 0x80, 0x63, 0x8f, 0x3d, 0x36, 0xce, 0x0b, 0x70, 0xe4, 0x88, 0xbc, 0xb6, 0x63, - 0x3b, 0x38, 0x47, 0x6e, 0x33, 0xe3, 0xef, 0xdb, 0xfd, 0xbe, 0x99, 0x59, 0x43, 0xd5, 0xa0, 0x66, - 0x7b, 0xe2, 0x70, 0x8f, 0x63, 0x79, 0xa2, 0x37, 0x9e, 0x99, 0x96, 0x37, 0xf4, 0xf5, 0xf6, 0x80, - 0x8f, 0x77, 0x4c, 0x6e, 0xf2, 0x1d, 0xf1, 0x49, 0xf7, 0xdf, 0x89, 0x4c, 0x24, 0x22, 0x8a, 0x28, - 0x6a, 0x0b, 0xea, 0x1d, 0x6a, 0xf6, 0x7d, 0x4f, 0x63, 0xee, 0x84, 0xdb, 0x2e, 0xc3, 0xdb, 0xb0, - 0x3a, 0xa4, 0xee, 0x90, 0xb9, 0x0a, 0x6a, 0x96, 0x5a, 0x55, 0x2d, 0xce, 0xd4, 0x9f, 0x08, 0xee, - 0x27, 0xd0, 0x0f, 0x3e, 0x73, 0x3d, 0x8c, 0xa1, 0x6c, 0x50, 0x8f, 0x2a, 0xa8, 0x89, 0x5a, 0x35, - 0x4d, 0xc4, 0xf8, 0x09, 0xd4, 0xb9, 0xfe, 0x9e, 0x0d, 0xbc, 0x13, 0x7b, 0xc0, 0x0d, 0xcb, 0x36, - 0x15, 0xb9, 0x89, 0x5a, 0x55, 0x6d, 0xa1, 0x8a, 0x9f, 0xc3, 0xa6, 0xcb, 0x1c, 0x8b, 0x8e, 0xac, - 0x6b, 0xea, 0x59, 0xdc, 0xee, 0x72, 0x67, 0x4c, 0x3d, 0xa5, 0x24, 0xc0, 0x45, 0x9f, 0x70, 0x03, - 0x2a, 0xa1, 0x92, 0xae, 0x6f, 0x0f, 0x94, 0xb2, 0x80, 0xcd, 0x73, 0x4c, 0x00, 0x06, 0x96, 0xf1, - 0x96, 0x39, 0xae, 0xc5, 0x6d, 0x65, 0xa5, 0x89, 0x5a, 0x25, 0x2d, 0x53, 0x51, 0x1f, 0x09, 0xe9, - 0x3d, 0x96, 0x95, 0x1e, 0x92, 0x85, 0xf4, 0xaa, 0x26, 0x62, 0xf5, 0xa9, 0x68, 0x85, 0x00, 0xc5, - 0xad, 0x50, 0xe0, 0x9e, 0x43, 0x2f, 0x3b, 0xa9, 0xc7, 0x24, 0x55, 0xbf, 0x23, 0xc0, 0xe7, 0xec, - 0xf2, 0xb4, 0x7f, 0xd6, 0x39, 0xe7, 0x06, 0x4b, 0x8e, 0xdd, 0x87, 0x95, 0x91, 0x65, 0x5f, 0x44, - 0xad, 0x5b, 0xdb, 0x7d, 0xd8, 0x9e, 0xe8, 0xed, 0x7f, 0x61, 0xed, 0xb3, 0x10, 0x73, 0x62, 0x7b, - 0xce, 0x95, 0x16, 0xe1, 0xe7, 0xad, 0x94, 0x33, 0xad, 0xcc, 0x1a, 0x2e, 0xe5, 0x0d, 0x37, 0x0e, - 0x00, 0xd2, 0x43, 0xf0, 0x06, 0x94, 0x2e, 0xd8, 0x55, 0x6c, 0x26, 0x0c, 0xf1, 0x16, 0xac, 0x7c, - 0xa4, 0x23, 0x9f, 0xc5, 0xdd, 0x8f, 0x92, 0xd7, 0xf2, 0x01, 0x52, 0xbf, 0x21, 0x58, 0x3f, 0x32, - 0x0c, 0xc1, 0x4e, 0x64, 0xef, 0xe5, 0x65, 0x93, 0x50, 0xf6, 0x02, 0xa6, 0x58, 0xb3, 0xe8, 0xa1, - 0x9c, 0xf6, 0xf0, 0x3f, 0x69, 0x7e, 0x0c, 0xeb, 0x3d, 0xe6, 0xe5, 0x24, 0x17, 0x0d, 0xf0, 0x15, - 0x6c, 0xa4, 0xb0, 0x78, 0x84, 0x6a, 0xde, 0x5a, 0x2d, 0xb4, 0x16, 0x8e, 0x23, 0x44, 0xc5, 0x46, - 0xd4, 0x2e, 0x54, 0x92, 0x52, 0xee, 0xdc, 0x5a, 0x6c, 0x0a, 0x43, 0xd9, 0xa6, 0xe3, 0x44, 0x97, - 0x88, 0xc3, 0x9a, 0x6b, 0x5d, 0x33, 0x61, 0xb2, 0xac, 0x89, 0x58, 0x3d, 0x8e, 0xce, 0x09, 0x27, - 0x9d, 0xde, 0x2b, 0x2f, 0xbd, 0xb7, 0xe8, 0xfd, 0xec, 0x7e, 0x91, 0x61, 0xb5, 0x43, 0xcd, 0xa3, - 0xfe, 0x29, 0x7e, 0x21, 0xa2, 0xbe, 0xef, 0xe1, 0x07, 0x21, 0x3b, 0xf7, 0xf6, 0x1a, 0x38, 0x5b, - 0x8a, 0xbc, 0xaa, 0x52, 0x4c, 0xe9, 0xb1, 0x94, 0x92, 0xee, 0xfc, 0x9c, 0x92, 0xd9, 0x70, 0x55, - 0xc2, 0x87, 0xb0, 0x96, 0xd9, 0x50, 0xbc, 0x5d, 0xbc, 0xb2, 0x4b, 0xee, 0x3b, 0x84, 0x7a, 0xb2, - 0x27, 0x6f, 0xb8, 0xe0, 0x6f, 0x16, 0xec, 0xce, 0x12, 0xf2, 0x3e, 0x54, 0x92, 0x71, 0x45, 0xb4, - 0x85, 0x19, 0x37, 0xb6, 0xf2, 0xc5, 0x84, 0x78, 0xbc, 0x77, 0x3b, 0x25, 0xd2, 0xdd, 0x94, 0xa0, - 0xdf, 0x53, 0x82, 0xfe, 0x4c, 0x09, 0xfa, 0x14, 0x10, 0xf4, 0x35, 0x20, 0xe8, 0x47, 0x40, 0xd0, - 0xaf, 0x80, 0xa0, 0x9b, 0x80, 0xa0, 0xbb, 0x80, 0xa0, 0xcf, 0x33, 0x22, 0xdd, 0xcc, 0x88, 0x74, - 0x3b, 0x23, 0x92, 0xbe, 0x2a, 0x7e, 0x78, 0x2f, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x58, 0x59, - 0xcc, 0xd0, 0x30, 0x05, 0x00, 0x00, -} - -func (this *DagPutResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DagPutResponse) - if !ok { - that2, ok := that.(DagPutResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DagPutResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DagPutResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DagPutResponse but is not nil && this == nil") - } - if len(this.Hashes) != len(that1.Hashes) { - return fmt.Errorf("Hashes this(%v) Not Equal that(%v)", len(this.Hashes), len(that1.Hashes)) - } - for i := range this.Hashes { - if this.Hashes[i] != that1.Hashes[i] { - return fmt.Errorf("Hashes this[%v](%v) Not Equal that[%v](%v)", i, this.Hashes[i], i, that1.Hashes[i]) - } - } - return nil -} -func (this *DagPutResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DagPutResponse) - if !ok { - that2, ok := that.(DagPutResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Hashes) != len(that1.Hashes) { - return false - } - for i := range this.Hashes { - if this.Hashes[i] != that1.Hashes[i] { - return false - } - } - return true -} -func (this *DagPutRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DagPutRequest) - if !ok { - that2, ok := that.(DagPutRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DagPutRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DagPutRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DagPutRequest but is not nil && this == nil") - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.ObjectEncoding != that1.ObjectEncoding { - return fmt.Errorf("ObjectEncoding this(%v) Not Equal that(%v)", this.ObjectEncoding, that1.ObjectEncoding) - } - if this.SerializationFormat != that1.SerializationFormat { - return fmt.Errorf("SerializationFormat this(%v) Not Equal that(%v)", this.SerializationFormat, that1.SerializationFormat) - } - if this.HashFunc != that1.HashFunc { - return fmt.Errorf("HashFunc this(%v) Not Equal that(%v)", this.HashFunc, that1.HashFunc) - } - if this.CidVersion != that1.CidVersion { - return fmt.Errorf("CidVersion this(%v) Not Equal that(%v)", this.CidVersion, that1.CidVersion) - } - return nil -} -func (this *DagPutRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DagPutRequest) - if !ok { - that2, ok := that.(DagPutRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.ObjectEncoding != that1.ObjectEncoding { - return false - } - if this.SerializationFormat != that1.SerializationFormat { - return false - } - if this.HashFunc != that1.HashFunc { - return false - } - if this.CidVersion != that1.CidVersion { - return false - } - return true -} -func (this *DagGetRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DagGetRequest) - if !ok { - that2, ok := that.(DagGetRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DagGetRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DagGetRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DagGetRequest but is not nil && this == nil") - } - if this.Hash != that1.Hash { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - return nil -} -func (this *DagGetRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DagGetRequest) - if !ok { - that2, ok := that.(DagGetRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Hash != that1.Hash { - return false - } - return true -} -func (this *DagGetResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DagGetResponse) - if !ok { - that2, ok := that.(DagGetResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DagGetResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DagGetResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DagGetResponse but is not nil && this == nil") - } - if !bytes.Equal(this.RawData, that1.RawData) { - return fmt.Errorf("RawData this(%v) Not Equal that(%v)", this.RawData, that1.RawData) - } - return nil -} -func (this *DagGetResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DagGetResponse) - if !ok { - that2, ok := that.(DagGetResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.RawData, that1.RawData) { - return false - } - return true -} -func (this *NewIPLDNodeRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NewIPLDNodeRequest) - if !ok { - that2, ok := that.(NewIPLDNodeRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NewIPLDNodeRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NewIPLDNodeRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NewIPLDNodeRequest but is not nil && this == nil") - } - if len(this.Links) != len(that1.Links) { - return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) - } - for i := range this.Links { - if this.Links[i] != that1.Links[i] { - return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) - } - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.HashFunc != that1.HashFunc { - return fmt.Errorf("HashFunc this(%v) Not Equal that(%v)", this.HashFunc, that1.HashFunc) - } - return nil -} -func (this *NewIPLDNodeRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NewIPLDNodeRequest) - if !ok { - that2, ok := that.(NewIPLDNodeRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if this.Links[i] != that1.Links[i] { - return false - } - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.HashFunc != that1.HashFunc { - return false - } - return true -} -func (this *AddLinksRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*AddLinksRequest) - if !ok { - that2, ok := that.(AddLinksRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *AddLinksRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *AddLinksRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *AddLinksRequest but is not nil && this == nil") - } - if len(this.Links) != len(that1.Links) { - return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) - } - for i := range this.Links { - if this.Links[i] != that1.Links[i] { - return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) - } - } - if this.Hash != that1.Hash { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - if this.HashFunc != that1.HashFunc { - return fmt.Errorf("HashFunc this(%v) Not Equal that(%v)", this.HashFunc, that1.HashFunc) - } - return nil -} -func (this *AddLinksRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*AddLinksRequest) - if !ok { - that2, ok := that.(AddLinksRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if this.Links[i] != that1.Links[i] { - return false - } - } - if this.Hash != that1.Hash { - return false - } - if this.HashFunc != that1.HashFunc { - return false - } - return true -} -func (this *GetLinksRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*GetLinksRequest) - if !ok { - that2, ok := that.(GetLinksRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *GetLinksRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *GetLinksRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *GetLinksRequest but is not nil && this == nil") - } - if this.Hash != that1.Hash { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - return nil -} -func (this *GetLinksRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GetLinksRequest) - if !ok { - that2, ok := that.(GetLinksRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Hash != that1.Hash { - return false - } - return true -} -func (this *GetLinksResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*GetLinksResponse) - if !ok { - that2, ok := that.(GetLinksResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *GetLinksResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *GetLinksResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *GetLinksResponse but is not nil && this == nil") - } - if len(this.Links) != len(that1.Links) { - return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) - } - } - return nil -} -func (this *GetLinksResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GetLinksResponse) - if !ok { - that2, ok := that.(GetLinksResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return false - } - } - return true -} -func (this *IPLDLink) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IPLDLink) - if !ok { - that2, ok := that.(IPLDLink) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IPLDLink") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IPLDLink but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IPLDLink but is not nil && this == nil") - } - if !bytes.Equal(this.Hash, that1.Hash) { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Size_ != that1.Size_ { - return fmt.Errorf("Size_ this(%v) Not Equal that(%v)", this.Size_, that1.Size_) - } - return nil -} -func (this *IPLDLink) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IPLDLink) - if !ok { - that2, ok := that.(IPLDLink) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Hash, that1.Hash) { - return false - } - if this.Name != that1.Name { - return false - } - if this.Size_ != that1.Size_ { - return false - } - return true -} -func (this *IPLDNode) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IPLDNode) - if !ok { - that2, ok := that.(IPLDNode) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IPLDNode") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IPLDNode but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IPLDNode but is not nil && this == nil") - } - if len(this.Links) != len(that1.Links) { - return fmt.Errorf("Links this(%v) Not Equal that(%v)", len(this.Links), len(that1.Links)) - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return fmt.Errorf("Links this[%v](%v) Not Equal that[%v](%v)", i, this.Links[i], i, that1.Links[i]) - } - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - return nil -} -func (this *IPLDNode) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IPLDNode) - if !ok { - that2, ok := that.(IPLDNode) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Links) != len(that1.Links) { - return false - } - for i := range this.Links { - if !this.Links[i].Equal(that1.Links[i]) { - return false - } - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - return true -} -func (this *DagPutResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DagPutResponse{") - s = append(s, "Hashes: "+fmt.Sprintf("%#v", this.Hashes)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DagPutRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 9) - s = append(s, "&pb.DagPutRequest{") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "ObjectEncoding: "+fmt.Sprintf("%#v", this.ObjectEncoding)+",\n") - s = append(s, "SerializationFormat: "+fmt.Sprintf("%#v", this.SerializationFormat)+",\n") - s = append(s, "HashFunc: "+fmt.Sprintf("%#v", this.HashFunc)+",\n") - s = append(s, "CidVersion: "+fmt.Sprintf("%#v", this.CidVersion)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DagGetRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DagGetRequest{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DagGetResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DagGetResponse{") - s = append(s, "RawData: "+fmt.Sprintf("%#v", this.RawData)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NewIPLDNodeRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.NewIPLDNodeRequest{") - keysForLinks := make([]string, 0, len(this.Links)) - for k := range this.Links { - keysForLinks = append(keysForLinks, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLinks) - mapStringForLinks := "map[string]string{" - for _, k := range keysForLinks { - mapStringForLinks += fmt.Sprintf("%#v: %#v,", k, this.Links[k]) - } - mapStringForLinks += "}" - if this.Links != nil { - s = append(s, "Links: "+mapStringForLinks+",\n") - } - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "HashFunc: "+fmt.Sprintf("%#v", this.HashFunc)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *AddLinksRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.AddLinksRequest{") - keysForLinks := make([]string, 0, len(this.Links)) - for k := range this.Links { - keysForLinks = append(keysForLinks, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLinks) - mapStringForLinks := "map[string]string{" - for _, k := range keysForLinks { - mapStringForLinks += fmt.Sprintf("%#v: %#v,", k, this.Links[k]) - } - mapStringForLinks += "}" - if this.Links != nil { - s = append(s, "Links: "+mapStringForLinks+",\n") - } - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "HashFunc: "+fmt.Sprintf("%#v", this.HashFunc)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetLinksRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.GetLinksRequest{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetLinksResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.GetLinksResponse{") - if this.Links != nil { - s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IPLDLink) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.IPLDLink{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Size_: "+fmt.Sprintf("%#v", this.Size_)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IPLDNode) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.IPLDNode{") - if this.Links != nil { - s = append(s, "Links: "+fmt.Sprintf("%#v", this.Links)+",\n") - } - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringDag(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 543 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x54, 0x41, 0x6e, 0xd3, 0x40, + 0x14, 0xcd, 0xd8, 0x49, 0x48, 0x7e, 0x43, 0x5a, 0xa6, 0x55, 0x65, 0x65, 0x61, 0x85, 0x41, 0x20, + 0x8b, 0x45, 0x04, 0x05, 0xd1, 0x8a, 0xae, 0x5a, 0xa5, 0x89, 0x2a, 0x55, 0x55, 0x64, 0x21, 0xf6, + 0x93, 0x78, 0x94, 0x9a, 0xa6, 0x9e, 0x60, 0x8f, 0xa9, 0xda, 0x53, 0x70, 0x05, 0x8e, 0xc0, 0x0a, + 0x71, 0x03, 0x96, 0x5d, 0xb2, 0x44, 0xc9, 0x45, 0xd0, 0x8c, 0x3d, 0xb1, 0x1d, 0x9c, 0x25, 0xbb, + 0x3f, 0x3f, 0xef, 0xcd, 0xbc, 0xf7, 0xfe, 0x77, 0xa0, 0xe9, 0xd1, 0x69, 0x6f, 0x1e, 0x72, 0xc1, + 0xb1, 0x31, 0x1f, 0x13, 0x07, 0xda, 0x7d, 0x3a, 0x1d, 0xc5, 0xc2, 0x65, 0xd1, 0x9c, 0x07, 0x11, + 0xc3, 0xfb, 0x50, 0xbf, 0xa2, 0xd1, 0x15, 0x8b, 0x2c, 0xd4, 0x35, 0x9d, 0xa6, 0x9b, 0x9e, 0xc8, + 0x4f, 0x04, 0x8f, 0x35, 0xf4, 0x73, 0xcc, 0x22, 0x81, 0x31, 0x54, 0x3d, 0x2a, 0xa8, 0x85, 0xba, + 0xc8, 0x69, 0xb9, 0xaa, 0xc6, 0x2f, 0xa0, 0xcd, 0xc7, 0x9f, 0xd8, 0x44, 0x9c, 0x05, 0x13, 0xee, + 0xf9, 0xc1, 0xd4, 0x32, 0xba, 0xc8, 0x69, 0xba, 0x6b, 0x5d, 0xfc, 0x0a, 0x76, 0x23, 0x16, 0xfa, + 0x74, 0xe6, 0xdf, 0x53, 0xe1, 0xf3, 0x60, 0xc0, 0xc3, 0x1b, 0x2a, 0x2c, 0x53, 0x81, 0xcb, 0x7e, + 0xc2, 0x1d, 0x68, 0x48, 0x25, 0x83, 0x38, 0x98, 0x58, 0x55, 0x05, 0x5b, 0x9d, 0xb1, 0x0d, 0x30, + 0xf1, 0xbd, 0x8f, 0x2c, 0x8c, 0x7c, 0x1e, 0x58, 0xb5, 0x2e, 0x72, 0x4c, 0x37, 0xd7, 0x21, 0xcf, + 0x94, 0xf4, 0x21, 0xcb, 0x4b, 0x97, 0x64, 0x25, 0xbd, 0xe9, 0xaa, 0x9a, 0xbc, 0x54, 0x51, 0x28, + 0x50, 0x1a, 0x85, 0x05, 0x8f, 0x42, 0x7a, 0xdb, 0xcf, 0x3c, 0xea, 0x23, 0xf9, 0x81, 0x00, 0x5f, + 0xb2, 0xdb, 0xf3, 0xd1, 0x45, 0xff, 0x92, 0x7b, 0x4c, 0x5f, 0x7b, 0x08, 0xb5, 0x99, 0x1f, 0x5c, + 0x27, 0xd1, 0x6d, 0x1d, 0x3c, 0xed, 0xcd, 0xc7, 0xbd, 0x7f, 0x61, 0xbd, 0x0b, 0x89, 0x39, 0x0b, + 0x44, 0x78, 0xe7, 0x26, 0xf8, 0x55, 0x94, 0x46, 0x2e, 0xca, 0xbc, 0x61, 0xb3, 0x68, 0xb8, 0x73, + 0x04, 0x90, 0x5d, 0x82, 0x77, 0xc0, 0xbc, 0x66, 0x77, 0xa9, 0x19, 0x59, 0xe2, 0x3d, 0xa8, 0x7d, + 0xa1, 0xb3, 0x98, 0xa5, 0xe9, 0x27, 0x87, 0xf7, 0xc6, 0x11, 0x22, 0xdf, 0x11, 0x6c, 0x9f, 0x78, + 0x9e, 0x62, 0x6b, 0xd9, 0x6f, 0x8b, 0xb2, 0x6d, 0x29, 0x7b, 0x0d, 0x53, 0xae, 0x59, 0x65, 0x68, + 0x64, 0x19, 0xfe, 0x27, 0xcd, 0xcf, 0x61, 0x7b, 0xc8, 0x44, 0x41, 0x72, 0xd9, 0x00, 0xdf, 0xc1, + 0x4e, 0x06, 0x4b, 0x47, 0x48, 0x8a, 0xd6, 0x5a, 0xd2, 0x9a, 0x1c, 0x87, 0x44, 0xa5, 0x46, 0xc8, + 0x00, 0x1a, 0xba, 0x55, 0xb8, 0xb7, 0x95, 0x9a, 0xc2, 0x50, 0x0d, 0xe8, 0x8d, 0xd6, 0xa5, 0x6a, + 0xd9, 0x8b, 0xfc, 0x7b, 0xa6, 0x4c, 0x56, 0x5d, 0x55, 0x93, 0xd3, 0xe4, 0x1e, 0x39, 0xe9, 0xec, + 0x5d, 0x63, 0xe3, 0xbb, 0x65, 0xdf, 0xcf, 0xc1, 0x37, 0x03, 0xea, 0x7d, 0x3a, 0x3d, 0x19, 0x9d, + 0xe3, 0xd7, 0xaa, 0x1a, 0xc5, 0x02, 0x3f, 0x91, 0xec, 0xc2, 0xb7, 0xd7, 0xc1, 0xf9, 0x56, 0xe2, + 0x95, 0x54, 0x52, 0xca, 0x90, 0x65, 0x94, 0x6c, 0xe7, 0x57, 0x94, 0xdc, 0x86, 0x93, 0x0a, 0x3e, + 0x86, 0xad, 0xdc, 0x86, 0xe2, 0xfd, 0xf2, 0x95, 0xdd, 0xf0, 0xde, 0x31, 0xb4, 0xf5, 0x9e, 0x7c, + 0xe0, 0x8a, 0xbf, 0x5b, 0xb2, 0x3b, 0x1b, 0xc8, 0x87, 0xd0, 0xd0, 0xe3, 0x4a, 0x68, 0x6b, 0x33, + 0xee, 0xec, 0x15, 0x9b, 0x9a, 0x78, 0x6a, 0xfd, 0x5a, 0xd8, 0xe8, 0x61, 0x61, 0xa3, 0x3f, 0x0b, + 0x1b, 0x7d, 0x5d, 0xda, 0x95, 0x87, 0xa5, 0x5d, 0xf9, 0xbd, 0xb4, 0x2b, 0xe3, 0xba, 0xfa, 0x63, + 0x7b, 0xf3, 0x37, 0x00, 0x00, 0xff, 0xff, 0x40, 0x11, 0x3b, 0xf0, 0xe5, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2113,220 +1310,6 @@ func encodeVarintDag(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedDagPutResponse(r randyDag, easy bool) *DagPutResponse { - this := &DagPutResponse{} - v1 := r.Intn(10) - this.Hashes = make([]string, v1) - for i := 0; i < v1; i++ { - this.Hashes[i] = string(randStringDag(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDagPutRequest(r randyDag, easy bool) *DagPutRequest { - this := &DagPutRequest{} - v2 := r.Intn(100) - this.Data = make([]byte, v2) - for i := 0; i < v2; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.ObjectEncoding = string(randStringDag(r)) - this.SerializationFormat = string(randStringDag(r)) - this.HashFunc = string(randStringDag(r)) - this.CidVersion = int64(r.Int63()) - if r.Intn(2) == 0 { - this.CidVersion *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDagGetRequest(r randyDag, easy bool) *DagGetRequest { - this := &DagGetRequest{} - this.Hash = string(randStringDag(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDagGetResponse(r randyDag, easy bool) *DagGetResponse { - this := &DagGetResponse{} - v3 := r.Intn(100) - this.RawData = make([]byte, v3) - for i := 0; i < v3; i++ { - this.RawData[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNewIPLDNodeRequest(r randyDag, easy bool) *NewIPLDNodeRequest { - this := &NewIPLDNodeRequest{} - if r.Intn(5) != 0 { - v4 := r.Intn(10) - this.Links = make(map[string]string) - for i := 0; i < v4; i++ { - this.Links[randStringDag(r)] = randStringDag(r) - } - } - v5 := r.Intn(100) - this.Data = make([]byte, v5) - for i := 0; i < v5; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.HashFunc = string(randStringDag(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedAddLinksRequest(r randyDag, easy bool) *AddLinksRequest { - this := &AddLinksRequest{} - if r.Intn(5) != 0 { - v6 := r.Intn(10) - this.Links = make(map[string]string) - for i := 0; i < v6; i++ { - this.Links[randStringDag(r)] = randStringDag(r) - } - } - this.Hash = string(randStringDag(r)) - this.HashFunc = string(randStringDag(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedGetLinksRequest(r randyDag, easy bool) *GetLinksRequest { - this := &GetLinksRequest{} - this.Hash = string(randStringDag(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedGetLinksResponse(r randyDag, easy bool) *GetLinksResponse { - this := &GetLinksResponse{} - if r.Intn(5) != 0 { - v7 := r.Intn(5) - this.Links = make([]*IPLDLink, v7) - for i := 0; i < v7; i++ { - this.Links[i] = NewPopulatedIPLDLink(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedIPLDLink(r randyDag, easy bool) *IPLDLink { - this := &IPLDLink{} - v8 := r.Intn(100) - this.Hash = make([]byte, v8) - for i := 0; i < v8; i++ { - this.Hash[i] = byte(r.Intn(256)) - } - this.Name = string(randStringDag(r)) - this.Size_ = uint64(uint64(r.Uint32())) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedIPLDNode(r randyDag, easy bool) *IPLDNode { - this := &IPLDNode{} - v9 := r.Intn(100) - this.Data = make([]byte, v9) - for i := 0; i < v9; i++ { - this.Data[i] = byte(r.Intn(256)) - } - if r.Intn(5) != 0 { - v10 := r.Intn(5) - this.Links = make([]*IPLDLink, v10) - for i := 0; i < v10; i++ { - this.Links[i] = NewPopulatedIPLDLink(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyDag interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneDag(r randyDag) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringDag(r randyDag) string { - v11 := r.Intn(100) - tmps := make([]rune, v11) - for i := 0; i < v11; i++ { - tmps[i] = randUTF8RuneDag(r) - } - return string(tmps) -} -func randUnrecognizedDag(r randyDag, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldDag(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldDag(dAtA []byte, r randyDag, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateDag(dAtA, uint64(key)) - v12 := r.Int63() - if r.Intn(2) == 0 { - v12 *= -1 - } - dAtA = encodeVarintPopulateDag(dAtA, uint64(v12)) - case 1: - dAtA = encodeVarintPopulateDag(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateDag(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateDag(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateDag(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateDag(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *DagPutResponse) Size() (n int) { if m == nil { return 0 @@ -2519,155 +1502,6 @@ func sovDag(x uint64) (n int) { func sozDag(x uint64) (n int) { return sovDag(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *DagPutResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DagPutResponse{`, - `Hashes:` + fmt.Sprintf("%v", this.Hashes) + `,`, - `}`, - }, "") - return s -} -func (this *DagPutRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DagPutRequest{`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `ObjectEncoding:` + fmt.Sprintf("%v", this.ObjectEncoding) + `,`, - `SerializationFormat:` + fmt.Sprintf("%v", this.SerializationFormat) + `,`, - `HashFunc:` + fmt.Sprintf("%v", this.HashFunc) + `,`, - `CidVersion:` + fmt.Sprintf("%v", this.CidVersion) + `,`, - `}`, - }, "") - return s -} -func (this *DagGetRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DagGetRequest{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func (this *DagGetResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DagGetResponse{`, - `RawData:` + fmt.Sprintf("%v", this.RawData) + `,`, - `}`, - }, "") - return s -} -func (this *NewIPLDNodeRequest) String() string { - if this == nil { - return "nil" - } - keysForLinks := make([]string, 0, len(this.Links)) - for k := range this.Links { - keysForLinks = append(keysForLinks, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLinks) - mapStringForLinks := "map[string]string{" - for _, k := range keysForLinks { - mapStringForLinks += fmt.Sprintf("%v: %v,", k, this.Links[k]) - } - mapStringForLinks += "}" - s := strings.Join([]string{`&NewIPLDNodeRequest{`, - `Links:` + mapStringForLinks + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `HashFunc:` + fmt.Sprintf("%v", this.HashFunc) + `,`, - `}`, - }, "") - return s -} -func (this *AddLinksRequest) String() string { - if this == nil { - return "nil" - } - keysForLinks := make([]string, 0, len(this.Links)) - for k := range this.Links { - keysForLinks = append(keysForLinks, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForLinks) - mapStringForLinks := "map[string]string{" - for _, k := range keysForLinks { - mapStringForLinks += fmt.Sprintf("%v: %v,", k, this.Links[k]) - } - mapStringForLinks += "}" - s := strings.Join([]string{`&AddLinksRequest{`, - `Links:` + mapStringForLinks + `,`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `HashFunc:` + fmt.Sprintf("%v", this.HashFunc) + `,`, - `}`, - }, "") - return s -} -func (this *GetLinksRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetLinksRequest{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func (this *GetLinksResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForLinks := "[]*IPLDLink{" - for _, f := range this.Links { - repeatedStringForLinks += strings.Replace(f.String(), "IPLDLink", "IPLDLink", 1) + "," - } - repeatedStringForLinks += "}" - s := strings.Join([]string{`&GetLinksResponse{`, - `Links:` + repeatedStringForLinks + `,`, - `}`, - }, "") - return s -} -func (this *IPLDLink) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IPLDLink{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Size_:` + fmt.Sprintf("%v", this.Size_) + `,`, - `}`, - }, "") - return s -} -func (this *IPLDNode) String() string { - if this == nil { - return "nil" - } - repeatedStringForLinks := "[]*IPLDLink{" - for _, f := range this.Links { - repeatedStringForLinks += strings.Replace(f.String(), "IPLDLink", "IPLDLink", 1) + "," - } - repeatedStringForLinks += "}" - s := strings.Join([]string{`&IPLDNode{`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Links:` + repeatedStringForLinks + `,`, - `}`, - }, "") - return s -} -func valueToStringDag(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *DagPutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/dagpb_test.go b/go/dagpb_test.go deleted file mode 100644 index 439749c..0000000 --- a/go/dagpb_test.go +++ /dev/null @@ -1,1786 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: dag.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestDagPutResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDagPutResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDagPutRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDagGetRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDagGetResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNewIPLDNodeRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewIPLDNodeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNewIPLDNodeRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewIPLDNodeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAddLinksRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AddLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestAddLinksRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AddLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGetLinksRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGetLinksResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDLinkProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDLink{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIPLDLinkMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDLink{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDNodeProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDNode{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIPLDNodeMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDNode{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDagPutRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagPutRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDagGetRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDagGetResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DagGetResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNewIPLDNodeRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NewIPLDNodeRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestAddLinksRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &AddLinksRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGetLinksRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGetLinksResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetLinksResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIPLDLinkJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDLink{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIPLDNodeJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IPLDNode{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDagPutResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DagPutResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DagPutResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DagPutRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DagPutRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DagGetRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DagGetRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DagGetResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagGetResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DagGetResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNewIPLDNodeRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NewIPLDNodeRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNewIPLDNodeRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NewIPLDNodeRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAddLinksRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &AddLinksRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestAddLinksRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &AddLinksRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &GetLinksRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &GetLinksRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &GetLinksResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetLinksResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &GetLinksResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDLinkProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IPLDLink{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDLinkProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IPLDLink{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDNodeProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IPLDNode{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIPLDNodeProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IPLDNode{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDagPutResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DagPutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDagPutRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DagPutRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDagGetRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DagGetRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDagGetResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DagGetResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNewIPLDNodeRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewIPLDNodeRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NewIPLDNodeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestAddLinksRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddLinksRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &AddLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGetLinksRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &GetLinksRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGetLinksResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &GetLinksResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIPLDLinkVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDLink(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IPLDLink{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIPLDNodeVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDNode(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IPLDNode{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDagPutResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDagPutRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDagGetRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDagGetResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNewIPLDNodeRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewIPLDNodeRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestAddLinksRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddLinksRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGetLinksRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGetLinksResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestIPLDLinkGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDLink(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestIPLDNodeGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDNode(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDagPutResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDagPutRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagPutRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDagGetRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDagGetResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDagGetResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNewIPLDNodeRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNewIPLDNodeRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestAddLinksRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedAddLinksRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestGetLinksRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestGetLinksResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetLinksResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestIPLDLinkSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDLink(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestIPLDNodeSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIPLDNode(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDagPutResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDagPutRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagPutRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDagGetRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDagGetResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDagGetResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNewIPLDNodeRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNewIPLDNodeRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestAddLinksRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedAddLinksRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGetLinksRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGetLinksResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetLinksResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIPLDLinkStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDLink(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIPLDNodeStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIPLDNode(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/file.pb.go b/go/file.pb.go index d066808..ddc95fc 100644 --- a/go/file.pb.go +++ b/go/file.pb.go @@ -4,16 +4,12 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -39,8 +35,9 @@ type UploadRequest struct { Options *UploadOptions `protobuf:"bytes,2,opt,name=options,proto3" json:"options,omitempty"` } -func (m *UploadRequest) Reset() { *m = UploadRequest{} } -func (*UploadRequest) ProtoMessage() {} +func (m *UploadRequest) Reset() { *m = UploadRequest{} } +func (m *UploadRequest) String() string { return proto.CompactTextString(m) } +func (*UploadRequest) ProtoMessage() {} func (*UploadRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9188e3b7e55e1162, []int{0} } @@ -95,8 +92,9 @@ type UploadOptions struct { Chunker string `protobuf:"bytes,3,opt,name=chunker,proto3" json:"chunker,omitempty"` } -func (m *UploadOptions) Reset() { *m = UploadOptions{} } -func (*UploadOptions) ProtoMessage() {} +func (m *UploadOptions) Reset() { *m = UploadOptions{} } +func (m *UploadOptions) String() string { return proto.CompactTextString(m) } +func (*UploadOptions) ProtoMessage() {} func (*UploadOptions) Descriptor() ([]byte, []int) { return fileDescriptor_9188e3b7e55e1162, []int{1} } @@ -160,8 +158,9 @@ type DownloadRequest struct { ChunkSize int32 `protobuf:"varint,2,opt,name=chunkSize,proto3" json:"chunkSize,omitempty"` } -func (m *DownloadRequest) Reset() { *m = DownloadRequest{} } -func (*DownloadRequest) ProtoMessage() {} +func (m *DownloadRequest) Reset() { *m = DownloadRequest{} } +func (m *DownloadRequest) String() string { return proto.CompactTextString(m) } +func (*DownloadRequest) ProtoMessage() {} func (*DownloadRequest) Descriptor() ([]byte, []int) { return fileDescriptor_9188e3b7e55e1162, []int{2} } @@ -213,8 +212,9 @@ type DownloadResponse struct { Blob *Blob `protobuf:"bytes,1,opt,name=blob,proto3" json:"blob,omitempty"` } -func (m *DownloadResponse) Reset() { *m = DownloadResponse{} } -func (*DownloadResponse) ProtoMessage() {} +func (m *DownloadResponse) Reset() { *m = DownloadResponse{} } +func (m *DownloadResponse) String() string { return proto.CompactTextString(m) } +func (*DownloadResponse) ProtoMessage() {} func (*DownloadResponse) Descriptor() ([]byte, []int) { return fileDescriptor_9188e3b7e55e1162, []int{3} } @@ -258,8 +258,9 @@ type Blob struct { Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"` } -func (m *Blob) Reset() { *m = Blob{} } -func (*Blob) ProtoMessage() {} +func (m *Blob) Reset() { *m = Blob{} } +func (m *Blob) String() string { return proto.CompactTextString(m) } +func (*Blob) ProtoMessage() {} func (*Blob) Descriptor() ([]byte, []int) { return fileDescriptor_9188e3b7e55e1162, []int{4} } @@ -308,395 +309,28 @@ func init() { func init() { proto.RegisterFile("file.proto", fileDescriptor_9188e3b7e55e1162) } var fileDescriptor_9188e3b7e55e1162 = []byte{ - // 387 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x52, 0xb1, 0x8e, 0xd3, 0x40, - 0x10, 0xf5, 0x86, 0x90, 0x90, 0x21, 0x28, 0xb0, 0x20, 0x64, 0x59, 0xd1, 0x2a, 0x72, 0x15, 0x09, - 0xe1, 0x44, 0x21, 0x2d, 0x05, 0x01, 0x21, 0xa8, 0x88, 0x8c, 0x68, 0x68, 0x50, 0x36, 0x6c, 0x62, - 0x8b, 0x8d, 0xd7, 0xc4, 0xbb, 0x42, 0x5c, 0x71, 0xba, 0x4f, 0xb8, 0xcf, 0xb8, 0x4f, 0xb8, 0x4f, - 0xb8, 0x32, 0x65, 0xca, 0xd8, 0xf9, 0x81, 0x2b, 0xaf, 0x3c, 0x79, 0x1c, 0xcb, 0xb9, 0x2b, 0xae, - 0x9b, 0xf7, 0xe6, 0xcd, 0x9b, 0xb7, 0xa3, 0x05, 0x58, 0x84, 0x52, 0x78, 0xf1, 0x5a, 0x69, 0x45, - 0x6b, 0x31, 0x77, 0xc0, 0xe8, 0x50, 0x16, 0xd8, 0x79, 0xbb, 0x0c, 0x75, 0x60, 0xb8, 0x37, 0x57, - 0xab, 0xc1, 0x52, 0x2d, 0xd5, 0x00, 0x69, 0x6e, 0x16, 0x88, 0x10, 0x60, 0x55, 0xc8, 0xdd, 0x9f, - 0xf0, 0xec, 0x47, 0x2c, 0xd5, 0xec, 0xb7, 0x2f, 0xfe, 0x1a, 0x91, 0x68, 0xda, 0x85, 0x3a, 0x97, - 0x8a, 0xdb, 0xa4, 0x47, 0xfa, 0x4f, 0x47, 0x4f, 0xbc, 0x98, 0x7b, 0x13, 0xa9, 0xb8, 0x8f, 0x2c, - 0x7d, 0x03, 0x4d, 0x15, 0xeb, 0x50, 0x45, 0x89, 0x5d, 0x43, 0xc1, 0x8b, 0x5c, 0x50, 0x38, 0x7c, - 0x2b, 0x1a, 0x7e, 0xa9, 0x70, 0x7f, 0x95, 0xde, 0x87, 0x0e, 0xed, 0x42, 0x6b, 0x65, 0xa4, 0x0e, - 0xbf, 0xcc, 0x92, 0x00, 0x17, 0xb4, 0xfc, 0x8a, 0xa0, 0xaf, 0xa1, 0x21, 0x67, 0xff, 0x95, 0xd1, - 0x68, 0xdd, 0xf2, 0x0f, 0x88, 0xda, 0xd0, 0x9c, 0x07, 0x26, 0xfa, 0x23, 0xd6, 0xf6, 0x23, 0x6c, - 0x94, 0xd0, 0xfd, 0x08, 0x9d, 0x4f, 0xea, 0x5f, 0x74, 0x1c, 0x9f, 0x42, 0x3d, 0xa8, 0xdc, 0xb1, - 0xce, 0xd7, 0xe2, 0xc4, 0xf7, 0xf0, 0x44, 0xa0, 0xf7, 0x63, 0xbf, 0x22, 0xdc, 0x21, 0x3c, 0xaf, - 0x4c, 0x92, 0x58, 0x45, 0x89, 0x78, 0xf8, 0x08, 0x6e, 0x0f, 0xea, 0x39, 0xc2, 0x60, 0x2a, 0xd2, - 0x22, 0xd2, 0x28, 0x6c, 0xfb, 0x25, 0x1c, 0x9d, 0x42, 0xf3, 0x73, 0x28, 0xc5, 0x87, 0xe9, 0x57, - 0x3a, 0x06, 0x28, 0x8e, 0x90, 0x13, 0xf4, 0xe8, 0x5c, 0x87, 0xc4, 0x4e, 0x27, 0xa7, 0xa6, 0x46, - 0x97, 0xcb, 0x5d, 0xab, 0x4f, 0xe8, 0x7b, 0x68, 0x97, 0xa1, 0x70, 0xee, 0x65, 0x2e, 0xba, 0xf7, - 0x56, 0xe7, 0xd5, 0x5d, 0xb2, 0x1c, 0x1f, 0x92, 0xc9, 0x78, 0x9b, 0x32, 0x6b, 0x97, 0x32, 0x72, - 0x9d, 0x32, 0x72, 0x93, 0x32, 0x72, 0x96, 0x31, 0x72, 0x91, 0x31, 0x72, 0x99, 0x31, 0x72, 0x95, - 0x31, 0xb2, 0xc9, 0x18, 0xd9, 0x65, 0x8c, 0x9c, 0xef, 0x99, 0xb5, 0xd9, 0x33, 0x6b, 0xbb, 0x67, - 0x16, 0x6f, 0xe0, 0x97, 0x78, 0x77, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x13, 0xa2, 0x88, 0x0a, 0x5f, - 0x02, 0x00, 0x00, -} - -func (this *UploadRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UploadRequest) - if !ok { - that2, ok := that.(UploadRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UploadRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UploadRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UploadRequest but is not nil && this == nil") - } - if !this.Blob.Equal(that1.Blob) { - return fmt.Errorf("Blob this(%v) Not Equal that(%v)", this.Blob, that1.Blob) - } - if !this.Options.Equal(that1.Options) { - return fmt.Errorf("Options this(%v) Not Equal that(%v)", this.Options, that1.Options) - } - return nil -} -func (this *UploadRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UploadRequest) - if !ok { - that2, ok := that.(UploadRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Blob.Equal(that1.Blob) { - return false - } - if !this.Options.Equal(that1.Options) { - return false - } - return true -} -func (this *UploadOptions) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*UploadOptions) - if !ok { - that2, ok := that.(UploadOptions) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *UploadOptions") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *UploadOptions but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *UploadOptions but is not nil && this == nil") - } - if this.MultiHash != that1.MultiHash { - return fmt.Errorf("MultiHash this(%v) Not Equal that(%v)", this.MultiHash, that1.MultiHash) - } - if this.Layout != that1.Layout { - return fmt.Errorf("Layout this(%v) Not Equal that(%v)", this.Layout, that1.Layout) - } - if this.Chunker != that1.Chunker { - return fmt.Errorf("Chunker this(%v) Not Equal that(%v)", this.Chunker, that1.Chunker) - } - return nil -} -func (this *UploadOptions) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*UploadOptions) - if !ok { - that2, ok := that.(UploadOptions) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.MultiHash != that1.MultiHash { - return false - } - if this.Layout != that1.Layout { - return false - } - if this.Chunker != that1.Chunker { - return false - } - return true -} -func (this *DownloadRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DownloadRequest) - if !ok { - that2, ok := that.(DownloadRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DownloadRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DownloadRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DownloadRequest but is not nil && this == nil") - } - if this.Hash != that1.Hash { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - if this.ChunkSize != that1.ChunkSize { - return fmt.Errorf("ChunkSize this(%v) Not Equal that(%v)", this.ChunkSize, that1.ChunkSize) - } - return nil -} -func (this *DownloadRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DownloadRequest) - if !ok { - that2, ok := that.(DownloadRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Hash != that1.Hash { - return false - } - if this.ChunkSize != that1.ChunkSize { - return false - } - return true -} -func (this *DownloadResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DownloadResponse) - if !ok { - that2, ok := that.(DownloadResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DownloadResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DownloadResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DownloadResponse but is not nil && this == nil") - } - if !this.Blob.Equal(that1.Blob) { - return fmt.Errorf("Blob this(%v) Not Equal that(%v)", this.Blob, that1.Blob) - } - return nil -} -func (this *DownloadResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DownloadResponse) - if !ok { - that2, ok := that.(DownloadResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !this.Blob.Equal(that1.Blob) { - return false - } - return true -} -func (this *Blob) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Blob) - if !ok { - that2, ok := that.(Blob) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Blob") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Blob but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Blob but is not nil && this == nil") - } - if !bytes.Equal(this.Content, that1.Content) { - return fmt.Errorf("Content this(%v) Not Equal that(%v)", this.Content, that1.Content) - } - return nil -} -func (this *Blob) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Blob) - if !ok { - that2, ok := that.(Blob) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.Content, that1.Content) { - return false - } - return true -} -func (this *UploadRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.UploadRequest{") - if this.Blob != nil { - s = append(s, "Blob: "+fmt.Sprintf("%#v", this.Blob)+",\n") - } - if this.Options != nil { - s = append(s, "Options: "+fmt.Sprintf("%#v", this.Options)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *UploadOptions) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.UploadOptions{") - s = append(s, "MultiHash: "+fmt.Sprintf("%#v", this.MultiHash)+",\n") - s = append(s, "Layout: "+fmt.Sprintf("%#v", this.Layout)+",\n") - s = append(s, "Chunker: "+fmt.Sprintf("%#v", this.Chunker)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DownloadRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.DownloadRequest{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "ChunkSize: "+fmt.Sprintf("%#v", this.ChunkSize)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DownloadResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DownloadResponse{") - if this.Blob != nil { - s = append(s, "Blob: "+fmt.Sprintf("%#v", this.Blob)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Blob) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.Blob{") - s = append(s, "Content: "+fmt.Sprintf("%#v", this.Content)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringFile(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 329 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x51, 0x41, 0x4b, 0x33, 0x31, + 0x14, 0xdc, 0xf4, 0xeb, 0xd7, 0xda, 0x67, 0xa5, 0x1a, 0x45, 0x96, 0x52, 0x96, 0xb2, 0xa7, 0x82, + 0x50, 0x4a, 0xf5, 0xea, 0xc1, 0x2a, 0xa2, 0x27, 0x4b, 0xc4, 0x8b, 0x17, 0xe9, 0x6a, 0xa4, 0x8b, + 0x31, 0x89, 0xdd, 0x04, 0xd1, 0x83, 0xbf, 0xc1, 0x9f, 0xe5, 0xb1, 0x47, 0x8f, 0xd2, 0xfe, 0x11, + 0xc9, 0xdb, 0x0d, 0x5b, 0x3d, 0x78, 0xdb, 0x99, 0x37, 0x6f, 0xde, 0xec, 0x04, 0xe0, 0x3e, 0x15, + 0xbc, 0xaf, 0x67, 0xca, 0x28, 0x5a, 0xd1, 0x49, 0x1b, 0xac, 0x49, 0x45, 0x8e, 0xe3, 0x6b, 0xd8, + 0xb8, 0xd2, 0x42, 0x4d, 0xee, 0x18, 0x7f, 0xb2, 0x3c, 0x33, 0xb4, 0x03, 0xd5, 0x44, 0xa8, 0x24, + 0x24, 0x5d, 0xd2, 0x5b, 0x1f, 0xae, 0xf5, 0x75, 0xd2, 0x1f, 0x09, 0x95, 0x30, 0x64, 0xe9, 0x1e, + 0xd4, 0x95, 0x36, 0xa9, 0x92, 0x59, 0x58, 0x41, 0xc1, 0x96, 0x13, 0xe4, 0x0e, 0x17, 0xf9, 0x80, + 0x79, 0x45, 0x7c, 0xe3, 0xbd, 0x8b, 0x09, 0xed, 0x40, 0xe3, 0xd1, 0x0a, 0x93, 0x9e, 0x4d, 0xb2, + 0x29, 0x1e, 0x68, 0xb0, 0x92, 0xa0, 0xbb, 0x50, 0x13, 0x93, 0x17, 0x65, 0x0d, 0x5a, 0x37, 0x58, + 0x81, 0x68, 0x08, 0xf5, 0xdb, 0xa9, 0x95, 0x0f, 0x7c, 0x16, 0xfe, 0xc3, 0x81, 0x87, 0xf1, 0x31, + 0xb4, 0x4e, 0xd4, 0xb3, 0x5c, 0x8d, 0x4f, 0xa1, 0x3a, 0x2d, 0xdd, 0xf1, 0xdb, 0x9d, 0xc5, 0x8d, + 0xcb, 0xf4, 0x95, 0xa3, 0xf7, 0x7f, 0x56, 0x12, 0xf1, 0x00, 0x36, 0x4b, 0x93, 0x4c, 0x2b, 0x99, + 0xf1, 0xbf, 0x4b, 0x88, 0xbb, 0x50, 0x75, 0x08, 0x83, 0x29, 0x69, 0xb8, 0x34, 0x28, 0x6c, 0x32, + 0x0f, 0x87, 0x6f, 0x50, 0x3f, 0x4d, 0x05, 0x3f, 0x1a, 0x9f, 0xd3, 0x03, 0x80, 0xbc, 0x04, 0x47, + 0xd0, 0x95, 0xba, 0x8a, 0xc4, 0xed, 0x96, 0xa3, 0xc6, 0xd6, 0xf8, 0xe3, 0x71, 0xd0, 0x23, 0xf4, + 0x10, 0x9a, 0x3e, 0x14, 0xee, 0x6d, 0x3b, 0xd1, 0xaf, 0x7f, 0x6d, 0xef, 0xfc, 0x24, 0xfd, 0xfa, + 0x80, 0x8c, 0xc2, 0x8f, 0x45, 0x44, 0xe6, 0x8b, 0x88, 0x7c, 0x2d, 0x22, 0xf2, 0xbe, 0x8c, 0x82, + 0xf9, 0x32, 0x0a, 0x3e, 0x97, 0x51, 0x90, 0xd4, 0xf0, 0xd9, 0xf7, 0xbf, 0x03, 0x00, 0x00, 0xff, + 0xff, 0x86, 0x7f, 0x82, 0x6f, 0x14, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1082,135 +716,6 @@ func encodeVarintFile(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedUploadRequest(r randyFile, easy bool) *UploadRequest { - this := &UploadRequest{} - if r.Intn(5) != 0 { - this.Blob = NewPopulatedBlob(r, easy) - } - if r.Intn(5) != 0 { - this.Options = NewPopulatedUploadOptions(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedUploadOptions(r randyFile, easy bool) *UploadOptions { - this := &UploadOptions{} - this.MultiHash = string(randStringFile(r)) - this.Layout = string(randStringFile(r)) - this.Chunker = string(randStringFile(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDownloadRequest(r randyFile, easy bool) *DownloadRequest { - this := &DownloadRequest{} - this.Hash = string(randStringFile(r)) - this.ChunkSize = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ChunkSize *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDownloadResponse(r randyFile, easy bool) *DownloadResponse { - this := &DownloadResponse{} - if r.Intn(5) != 0 { - this.Blob = NewPopulatedBlob(r, easy) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedBlob(r randyFile, easy bool) *Blob { - this := &Blob{} - v1 := r.Intn(100) - this.Content = make([]byte, v1) - for i := 0; i < v1; i++ { - this.Content[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyFile interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneFile(r randyFile) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringFile(r randyFile) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneFile(r) - } - return string(tmps) -} -func randUnrecognizedFile(r randyFile, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldFile(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldFile(dAtA []byte, r randyFile, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateFile(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateFile(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateFile(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateFile(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateFile(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateFile(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateFile(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *UploadRequest) Size() (n int) { if m == nil { return 0 @@ -1297,68 +802,6 @@ func sovFile(x uint64) (n int) { func sozFile(x uint64) (n int) { return sovFile(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *UploadRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UploadRequest{`, - `Blob:` + strings.Replace(this.Blob.String(), "Blob", "Blob", 1) + `,`, - `Options:` + strings.Replace(this.Options.String(), "UploadOptions", "UploadOptions", 1) + `,`, - `}`, - }, "") - return s -} -func (this *UploadOptions) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&UploadOptions{`, - `MultiHash:` + fmt.Sprintf("%v", this.MultiHash) + `,`, - `Layout:` + fmt.Sprintf("%v", this.Layout) + `,`, - `Chunker:` + fmt.Sprintf("%v", this.Chunker) + `,`, - `}`, - }, "") - return s -} -func (this *DownloadRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DownloadRequest{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `ChunkSize:` + fmt.Sprintf("%v", this.ChunkSize) + `,`, - `}`, - }, "") - return s -} -func (this *DownloadResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DownloadResponse{`, - `Blob:` + strings.Replace(this.Blob.String(), "Blob", "Blob", 1) + `,`, - `}`, - }, "") - return s -} -func (this *Blob) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Blob{`, - `Content:` + fmt.Sprintf("%v", this.Content) + `,`, - `}`, - }, "") - return s -} -func valueToStringFile(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *UploadRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/filepb_test.go b/go/filepb_test.go deleted file mode 100644 index ffe6a3f..0000000 --- a/go/filepb_test.go +++ /dev/null @@ -1,906 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: file.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestUploadRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUploadRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadOptionsProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadOptions{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestUploadOptionsMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadOptions{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDownloadRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDownloadResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlobProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Blob{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestBlobMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Blob{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUploadOptionsJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &UploadOptions{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDownloadRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDownloadResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DownloadResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestBlobJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Blob{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestUploadRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UploadRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UploadRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadOptionsProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &UploadOptions{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadOptionsProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &UploadOptions{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DownloadRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DownloadRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DownloadResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDownloadResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DownloadResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlobProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Blob{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestBlobProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Blob{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestUploadRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UploadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUploadOptionsVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadOptions(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &UploadOptions{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDownloadRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DownloadRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDownloadResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DownloadResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestBlobVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlob(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Blob{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestUploadRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUploadOptionsGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadOptions(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDownloadRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDownloadResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestBlobGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlob(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestUploadRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestUploadOptionsSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedUploadOptions(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDownloadRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDownloadResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDownloadResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestBlobSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedBlob(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestUploadRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestUploadOptionsStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedUploadOptions(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDownloadRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDownloadResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDownloadResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestBlobStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedBlob(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/keystore.pb.go b/go/keystore.pb.go index 0e1d3e8..4d142af 100644 --- a/go/keystore.pb.go +++ b/go/keystore.pb.go @@ -4,16 +4,12 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -41,8 +37,9 @@ type KeystoreRequest struct { PrivateKey []byte `protobuf:"bytes,2,opt,name=privateKey,proto3" json:"privateKey,omitempty"` } -func (m *KeystoreRequest) Reset() { *m = KeystoreRequest{} } -func (*KeystoreRequest) ProtoMessage() {} +func (m *KeystoreRequest) Reset() { *m = KeystoreRequest{} } +func (m *KeystoreRequest) String() string { return proto.CompactTextString(m) } +func (*KeystoreRequest) ProtoMessage() {} func (*KeystoreRequest) Descriptor() ([]byte, []int) { return fileDescriptor_ac3dafe49d0dc795, []int{0} } @@ -100,8 +97,9 @@ type KeystoreResponse struct { KeyNames []string `protobuf:"bytes,3,rep,name=keyNames,proto3" json:"keyNames,omitempty"` } -func (m *KeystoreResponse) Reset() { *m = KeystoreResponse{} } -func (*KeystoreResponse) ProtoMessage() {} +func (m *KeystoreResponse) Reset() { *m = KeystoreResponse{} } +func (m *KeystoreResponse) String() string { return proto.CompactTextString(m) } +func (*KeystoreResponse) ProtoMessage() {} func (*KeystoreResponse) Descriptor() ([]byte, []int) { return fileDescriptor_ac3dafe49d0dc795, []int{1} } @@ -161,195 +159,23 @@ func init() { func init() { proto.RegisterFile("keystore.proto", fileDescriptor_ac3dafe49d0dc795) } var fileDescriptor_ac3dafe49d0dc795 = []byte{ - // 309 bytes of a gzipped FileDescriptorProto + // 249 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0xcb, 0x4e, 0xad, 0x2c, - 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0xd2, - 0x4d, 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, - 0x07, 0x4b, 0x25, 0x95, 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa2, 0xe4, 0xca, 0xc5, - 0xef, 0x0d, 0x35, 0x24, 0x28, 0xb5, 0xb0, 0x34, 0xb5, 0xb8, 0x44, 0x48, 0x88, 0x8b, 0x25, 0x2f, - 0x31, 0x37, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xcc, 0x16, 0x92, 0xe3, 0xe2, 0x2a, - 0x28, 0xca, 0x2c, 0x4b, 0x2c, 0x49, 0xf5, 0x4e, 0xad, 0x94, 0x60, 0x52, 0x60, 0xd4, 0xe0, 0x09, - 0x42, 0x12, 0x51, 0x4a, 0xe3, 0x12, 0x40, 0x18, 0x53, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x24, - 0xc6, 0xc5, 0x56, 0x5c, 0x92, 0x58, 0x52, 0x5a, 0x0c, 0x35, 0x09, 0xca, 0x23, 0x64, 0x96, 0x90, - 0x14, 0x17, 0x47, 0x76, 0x6a, 0xa5, 0x5f, 0x62, 0x6e, 0x6a, 0xb1, 0x04, 0xb3, 0x02, 0xb3, 0x06, - 0x67, 0x10, 0x9c, 0x6f, 0xb4, 0x97, 0x89, 0x8b, 0x1b, 0x66, 0x91, 0x63, 0x80, 0xa7, 0x90, 0x15, - 0x82, 0xeb, 0x91, 0x58, 0x2c, 0x24, 0xac, 0x57, 0x90, 0xa4, 0x87, 0xe6, 0x1f, 0x29, 0x11, 0x54, - 0x41, 0x88, 0xeb, 0x94, 0x18, 0x90, 0xf5, 0xba, 0xa7, 0x96, 0x90, 0xad, 0x37, 0xa0, 0x94, 0x44, - 0xbd, 0xb6, 0x5c, 0x7c, 0x30, 0x51, 0x97, 0xd4, 0x9c, 0xd4, 0x92, 0x54, 0xd2, 0xb4, 0x5b, 0x73, - 0xf1, 0xc0, 0x44, 0x7d, 0x32, 0x8b, 0x49, 0xb3, 0xdb, 0xc9, 0xe4, 0xc6, 0x43, 0x39, 0x86, 0x07, - 0x0f, 0xe5, 0x18, 0x3f, 0x3c, 0x94, 0x63, 0xfc, 0xf1, 0x50, 0x8e, 0xb1, 0xe1, 0x91, 0x1c, 0xe3, - 0x8a, 0x47, 0x72, 0x8c, 0x3b, 0x1e, 0xc9, 0x31, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, - 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, - 0x1c, 0x43, 0x12, 0x1b, 0x38, 0xad, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x23, 0xa1, 0x86, - 0x8f, 0x70, 0x02, 0x00, 0x00, -} - -func (this *KeystoreRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KeystoreRequest) - if !ok { - that2, ok := that.(KeystoreRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KeystoreRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KeystoreRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KeystoreRequest but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return fmt.Errorf("PrivateKey this(%v) Not Equal that(%v)", this.PrivateKey, that1.PrivateKey) - } - return nil -} -func (this *KeystoreRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KeystoreRequest) - if !ok { - that2, ok := that.(KeystoreRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return false - } - return true -} -func (this *KeystoreResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*KeystoreResponse) - if !ok { - that2, ok := that.(KeystoreResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *KeystoreResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *KeystoreResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *KeystoreResponse but is not nil && this == nil") - } - if this.Status != that1.Status { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return fmt.Errorf("PrivateKey this(%v) Not Equal that(%v)", this.PrivateKey, that1.PrivateKey) - } - if len(this.KeyNames) != len(that1.KeyNames) { - return fmt.Errorf("KeyNames this(%v) Not Equal that(%v)", len(this.KeyNames), len(that1.KeyNames)) - } - for i := range this.KeyNames { - if this.KeyNames[i] != that1.KeyNames[i] { - return fmt.Errorf("KeyNames this[%v](%v) Not Equal that[%v](%v)", i, this.KeyNames[i], i, that1.KeyNames[i]) - } - } - return nil -} -func (this *KeystoreResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*KeystoreResponse) - if !ok { - that2, ok := that.(KeystoreResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Status != that1.Status { - return false - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return false - } - if len(this.KeyNames) != len(that1.KeyNames) { - return false - } - for i := range this.KeyNames { - if this.KeyNames[i] != that1.KeyNames[i] { - return false - } - } - return true -} -func (this *KeystoreRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.KeystoreRequest{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "PrivateKey: "+fmt.Sprintf("%#v", this.PrivateKey)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *KeystoreResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.KeystoreResponse{") - s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") - s = append(s, "PrivateKey: "+fmt.Sprintf("%#v", this.PrivateKey)+",\n") - s = append(s, "KeyNames: "+fmt.Sprintf("%#v", this.KeyNames)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringKeystore(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + 0x2e, 0xc9, 0x2f, 0x4a, 0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x72, + 0xe5, 0xe2, 0xf7, 0x86, 0x8a, 0x06, 0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x09, 0x71, 0xb1, + 0xe4, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06, 0x81, 0xd9, 0x42, 0x72, 0x5c, + 0x5c, 0x05, 0x45, 0x99, 0x65, 0x89, 0x25, 0xa9, 0xde, 0xa9, 0x95, 0x12, 0x4c, 0x0a, 0x8c, 0x1a, + 0x3c, 0x41, 0x48, 0x22, 0x4a, 0x69, 0x5c, 0x02, 0x08, 0x63, 0x8a, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, + 0x85, 0xc4, 0xb8, 0xd8, 0x8a, 0x4b, 0x12, 0x4b, 0x4a, 0x8b, 0xa1, 0x26, 0x41, 0x79, 0x84, 0xcc, + 0x12, 0x92, 0xe2, 0xe2, 0xc8, 0x4e, 0xad, 0xf4, 0x4b, 0xcc, 0x4d, 0x2d, 0x96, 0x60, 0x56, 0x60, + 0xd6, 0xe0, 0x0c, 0x82, 0xf3, 0x8d, 0xf6, 0x32, 0x71, 0x71, 0xc3, 0x2c, 0x72, 0x0c, 0xf0, 0x14, + 0xb2, 0x42, 0x70, 0x3d, 0x12, 0x8b, 0x85, 0x84, 0xf5, 0x0a, 0x92, 0xf4, 0xd0, 0xfc, 0x23, 0x25, + 0x82, 0x2a, 0x08, 0x71, 0x9d, 0x12, 0x03, 0xb2, 0x5e, 0xf7, 0xd4, 0x12, 0xb2, 0xf5, 0x06, 0x94, + 0x92, 0xa8, 0xd7, 0x96, 0x8b, 0x0f, 0x26, 0xea, 0x92, 0x9a, 0x93, 0x5a, 0x92, 0x4a, 0x9a, 0x76, + 0x6b, 0x2e, 0x1e, 0x98, 0xa8, 0x4f, 0x66, 0x31, 0x69, 0x76, 0x3b, 0x49, 0x9c, 0x78, 0x24, 0xc7, + 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, + 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x12, 0x1b, 0x38, 0x4d, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x44, 0xd9, 0x67, 0x69, 0x25, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -680,109 +506,6 @@ func encodeVarintKeystore(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedKeystoreRequest(r randyKeystore, easy bool) *KeystoreRequest { - this := &KeystoreRequest{} - this.Name = string(randStringKeystore(r)) - v1 := r.Intn(100) - this.PrivateKey = make([]byte, v1) - for i := 0; i < v1; i++ { - this.PrivateKey[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedKeystoreResponse(r randyKeystore, easy bool) *KeystoreResponse { - this := &KeystoreResponse{} - this.Status = string(randStringKeystore(r)) - v2 := r.Intn(100) - this.PrivateKey = make([]byte, v2) - for i := 0; i < v2; i++ { - this.PrivateKey[i] = byte(r.Intn(256)) - } - v3 := r.Intn(10) - this.KeyNames = make([]string, v3) - for i := 0; i < v3; i++ { - this.KeyNames[i] = string(randStringKeystore(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyKeystore interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneKeystore(r randyKeystore) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringKeystore(r randyKeystore) string { - v4 := r.Intn(100) - tmps := make([]rune, v4) - for i := 0; i < v4; i++ { - tmps[i] = randUTF8RuneKeystore(r) - } - return string(tmps) -} -func randUnrecognizedKeystore(r randyKeystore, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldKeystore(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldKeystore(dAtA []byte, r randyKeystore, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(key)) - v5 := r.Int63() - if r.Intn(2) == 0 { - v5 *= -1 - } - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(v5)) - case 1: - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateKeystore(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateKeystore(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *KeystoreRequest) Size() (n int) { if m == nil { return 0 @@ -829,37 +552,6 @@ func sovKeystore(x uint64) (n int) { func sozKeystore(x uint64) (n int) { return sovKeystore(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *KeystoreRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&KeystoreRequest{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `PrivateKey:` + fmt.Sprintf("%v", this.PrivateKey) + `,`, - `}`, - }, "") - return s -} -func (this *KeystoreResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&KeystoreResponse{`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `PrivateKey:` + fmt.Sprintf("%v", this.PrivateKey) + `,`, - `KeyNames:` + fmt.Sprintf("%v", this.KeyNames) + `,`, - `}`, - }, "") - return s -} -func valueToStringKeystore(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *KeystoreRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/keystorepb_test.go b/go/keystorepb_test.go deleted file mode 100644 index e87967d..0000000 --- a/go/keystorepb_test.go +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: keystore.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestKeystoreRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeystoreRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestKeystoreResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeystoreResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &KeystoreResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestKeystoreRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &KeystoreRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &KeystoreRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &KeystoreResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &KeystoreResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestKeystoreRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KeystoreRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKeystoreResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &KeystoreResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestKeystoreRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestKeystoreResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestKeystoreRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestKeystoreResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedKeystoreResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestKeystoreRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestKeystoreResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedKeystoreResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/namesys.pb.go b/go/namesys.pb.go index 67f719a..1c4cf3e 100644 --- a/go/namesys.pb.go +++ b/go/namesys.pb.go @@ -4,16 +4,12 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -45,8 +41,9 @@ type NameSysResolveRequest struct { DhtTimeout int32 `protobuf:"varint,4,opt,name=dhtTimeout,proto3" json:"dhtTimeout,omitempty"` } -func (m *NameSysResolveRequest) Reset() { *m = NameSysResolveRequest{} } -func (*NameSysResolveRequest) ProtoMessage() {} +func (m *NameSysResolveRequest) Reset() { *m = NameSysResolveRequest{} } +func (m *NameSysResolveRequest) String() string { return proto.CompactTextString(m) } +func (*NameSysResolveRequest) ProtoMessage() {} func (*NameSysResolveRequest) Descriptor() ([]byte, []int) { return fileDescriptor_70d41f629e281f22, []int{0} } @@ -113,8 +110,9 @@ type NameSysResolveResult struct { Error string `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` } -func (m *NameSysResolveResult) Reset() { *m = NameSysResolveResult{} } -func (*NameSysResolveResult) ProtoMessage() {} +func (m *NameSysResolveResult) Reset() { *m = NameSysResolveResult{} } +func (m *NameSysResolveResult) String() string { return proto.CompactTextString(m) } +func (*NameSysResolveResult) ProtoMessage() {} func (*NameSysResolveResult) Descriptor() ([]byte, []int) { return fileDescriptor_70d41f629e281f22, []int{1} } @@ -174,8 +172,9 @@ type NameSysPublishRequest struct { Ttl int32 `protobuf:"varint,4,opt,name=ttl,proto3" json:"ttl,omitempty"` } -func (m *NameSysPublishRequest) Reset() { *m = NameSysPublishRequest{} } -func (*NameSysPublishRequest) ProtoMessage() {} +func (m *NameSysPublishRequest) Reset() { *m = NameSysPublishRequest{} } +func (m *NameSysPublishRequest) String() string { return proto.CompactTextString(m) } +func (*NameSysPublishRequest) ProtoMessage() {} func (*NameSysPublishRequest) Descriptor() ([]byte, []int) { return fileDescriptor_70d41f629e281f22, []int{2} } @@ -243,283 +242,29 @@ func init() { func init() { proto.RegisterFile("namesys.proto", fileDescriptor_70d41f629e281f22) } var fileDescriptor_70d41f629e281f22 = []byte{ - // 402 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xcd, 0xaa, 0xd3, 0x40, - 0x18, 0xcd, 0x77, 0xef, 0xad, 0xd0, 0x0f, 0xef, 0x45, 0xc6, 0x2b, 0xc4, 0x2c, 0x86, 0x92, 0x85, - 0x74, 0x63, 0xae, 0xa8, 0x0b, 0x97, 0x56, 0x11, 0x11, 0xa1, 0x94, 0xd1, 0x17, 0x48, 0x9a, 0xb1, - 0x09, 0x24, 0x9d, 0x34, 0x33, 0x53, 0xc8, 0xce, 0xad, 0x3b, 0x1f, 0xc3, 0x47, 0xf0, 0x11, 0x5c, - 0x76, 0xd9, 0x9d, 0x4d, 0xfa, 0x02, 0x2e, 0x5d, 0xca, 0x4c, 0xda, 0xd2, 0x94, 0xae, 0xdc, 0x9d, - 0x9f, 0x70, 0xe6, 0x9c, 0x8f, 0xe0, 0xf5, 0x3c, 0xcc, 0xb9, 0xac, 0x64, 0x50, 0x94, 0x42, 0x09, - 0x72, 0x51, 0x44, 0x1e, 0x6a, 0x95, 0x66, 0x2d, 0xf7, 0x9e, 0xce, 0x52, 0x95, 0xe8, 0x28, 0x98, - 0x8a, 0xfc, 0x6e, 0x26, 0x66, 0xe2, 0xce, 0xca, 0x91, 0xfe, 0x62, 0x99, 0x25, 0x16, 0xb5, 0x9f, - 0xfb, 0xdf, 0x00, 0x1f, 0x8d, 0xc3, 0x9c, 0x7f, 0xaa, 0x24, 0xe3, 0x52, 0x64, 0x4b, 0xce, 0xf8, - 0x42, 0x73, 0xa9, 0x08, 0xc1, 0x2b, 0xf3, 0x92, 0x0b, 0x03, 0x18, 0xf6, 0x99, 0xc5, 0xe4, 0x16, - 0x7b, 0x31, 0x2f, 0x54, 0xe2, 0x5e, 0x0c, 0x60, 0x78, 0xcd, 0x5a, 0x42, 0x9e, 0xe0, 0x4d, 0x9c, - 0x28, 0xc6, 0xa7, 0xa2, 0x8c, 0xdf, 0x0a, 0x3d, 0x57, 0xee, 0xa5, 0xb5, 0x4f, 0x54, 0x42, 0x11, - 0xe3, 0x44, 0x7d, 0x4e, 0x73, 0x2e, 0xb4, 0x72, 0xaf, 0x06, 0x30, 0xec, 0xb1, 0x23, 0xc5, 0x7f, - 0x8d, 0xb7, 0xa7, 0x55, 0xa4, 0xce, 0x6c, 0x93, 0x22, 0x54, 0xc9, 0xbe, 0x89, 0xc1, 0xa6, 0x09, - 0x2f, 0x4b, 0x51, 0xda, 0x26, 0x7d, 0xd6, 0x12, 0x7f, 0x71, 0x18, 0x33, 0xd1, 0x51, 0x96, 0xca, - 0x64, 0x3f, 0x86, 0x22, 0x16, 0x65, 0xba, 0x0c, 0x15, 0xff, 0xc8, 0x2b, 0x1b, 0x74, 0x9f, 0x1d, - 0x29, 0x26, 0x6e, 0x19, 0x66, 0x9a, 0xef, 0xe3, 0x2c, 0x21, 0x0f, 0xf0, 0x92, 0x8b, 0xcc, 0xae, - 0xe9, 0x31, 0x03, 0x8d, 0xa2, 0x54, 0xb6, 0xeb, 0x6e, 0xe0, 0xf3, 0xdf, 0x80, 0xb8, 0x7b, 0x73, - 0x34, 0xf9, 0x40, 0xde, 0xe3, 0x4d, 0x77, 0x03, 0x79, 0x1c, 0x14, 0x51, 0x70, 0xf6, 0xc4, 0x9e, - 0x7b, 0xce, 0x32, 0x93, 0x7d, 0x87, 0x8c, 0xf1, 0x61, 0xd7, 0x19, 0xc9, 0x6a, 0x3e, 0xfd, 0xcf, - 0xb4, 0x67, 0x40, 0x5e, 0x1d, 0x8a, 0xed, 0x4e, 0xd3, 0x89, 0xea, 0x9e, 0xcb, 0xeb, 0x1b, 0xeb, - 0x5d, 0x5e, 0xa8, 0xca, 0x77, 0xde, 0xbc, 0x5c, 0xd7, 0xd4, 0xd9, 0xd4, 0x14, 0xfe, 0xd4, 0x14, - 0xfe, 0xd6, 0x14, 0xbe, 0x36, 0x14, 0x7e, 0x34, 0x14, 0x7e, 0x36, 0x14, 0x7e, 0x35, 0x14, 0x56, - 0x0d, 0x85, 0x4d, 0x43, 0xe1, 0xfb, 0x96, 0x3a, 0xab, 0x2d, 0x75, 0xd6, 0x5b, 0xea, 0x44, 0xf7, - 0xec, 0xff, 0xf5, 0xe2, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x63, 0x5b, 0x3d, 0x32, 0xaf, 0x02, - 0x00, 0x00, -} - -func (this *NameSysResolveRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NameSysResolveRequest) - if !ok { - that2, ok := that.(NameSysResolveRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NameSysResolveRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NameSysResolveRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NameSysResolveRequest but is not nil && this == nil") - } - if this.Name != that1.Name { - return fmt.Errorf("Name this(%v) Not Equal that(%v)", this.Name, that1.Name) - } - if this.Depth != that1.Depth { - return fmt.Errorf("Depth this(%v) Not Equal that(%v)", this.Depth, that1.Depth) - } - if this.DhtRecordCount != that1.DhtRecordCount { - return fmt.Errorf("DhtRecordCount this(%v) Not Equal that(%v)", this.DhtRecordCount, that1.DhtRecordCount) - } - if this.DhtTimeout != that1.DhtTimeout { - return fmt.Errorf("DhtTimeout this(%v) Not Equal that(%v)", this.DhtTimeout, that1.DhtTimeout) - } - return nil -} -func (this *NameSysResolveRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NameSysResolveRequest) - if !ok { - that2, ok := that.(NameSysResolveRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Name != that1.Name { - return false - } - if this.Depth != that1.Depth { - return false - } - if this.DhtRecordCount != that1.DhtRecordCount { - return false - } - if this.DhtTimeout != that1.DhtTimeout { - return false - } - return true -} -func (this *NameSysResolveResult) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NameSysResolveResult) - if !ok { - that2, ok := that.(NameSysResolveResult) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NameSysResolveResult") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NameSysResolveResult but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NameSysResolveResult but is not nil && this == nil") - } - if this.Path != that1.Path { - return fmt.Errorf("Path this(%v) Not Equal that(%v)", this.Path, that1.Path) - } - if this.Error != that1.Error { - return fmt.Errorf("Error this(%v) Not Equal that(%v)", this.Error, that1.Error) - } - return nil -} -func (this *NameSysResolveResult) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NameSysResolveResult) - if !ok { - that2, ok := that.(NameSysResolveResult) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Path != that1.Path { - return false - } - if this.Error != that1.Error { - return false - } - return true -} -func (this *NameSysPublishRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*NameSysPublishRequest) - if !ok { - that2, ok := that.(NameSysPublishRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *NameSysPublishRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *NameSysPublishRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *NameSysPublishRequest but is not nil && this == nil") - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return fmt.Errorf("PrivateKey this(%v) Not Equal that(%v)", this.PrivateKey, that1.PrivateKey) - } - if this.Value != that1.Value { - return fmt.Errorf("Value this(%v) Not Equal that(%v)", this.Value, that1.Value) - } - if this.Eol != that1.Eol { - return fmt.Errorf("Eol this(%v) Not Equal that(%v)", this.Eol, that1.Eol) - } - if this.Ttl != that1.Ttl { - return fmt.Errorf("Ttl this(%v) Not Equal that(%v)", this.Ttl, that1.Ttl) - } - return nil -} -func (this *NameSysPublishRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*NameSysPublishRequest) - if !ok { - that2, ok := that.(NameSysPublishRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.PrivateKey, that1.PrivateKey) { - return false - } - if this.Value != that1.Value { - return false - } - if this.Eol != that1.Eol { - return false - } - if this.Ttl != that1.Ttl { - return false - } - return true -} -func (this *NameSysResolveRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&pb.NameSysResolveRequest{") - s = append(s, "Name: "+fmt.Sprintf("%#v", this.Name)+",\n") - s = append(s, "Depth: "+fmt.Sprintf("%#v", this.Depth)+",\n") - s = append(s, "DhtRecordCount: "+fmt.Sprintf("%#v", this.DhtRecordCount)+",\n") - s = append(s, "DhtTimeout: "+fmt.Sprintf("%#v", this.DhtTimeout)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NameSysResolveResult) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.NameSysResolveResult{") - s = append(s, "Path: "+fmt.Sprintf("%#v", this.Path)+",\n") - s = append(s, "Error: "+fmt.Sprintf("%#v", this.Error)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *NameSysPublishRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&pb.NameSysPublishRequest{") - s = append(s, "PrivateKey: "+fmt.Sprintf("%#v", this.PrivateKey)+",\n") - s = append(s, "Value: "+fmt.Sprintf("%#v", this.Value)+",\n") - s = append(s, "Eol: "+fmt.Sprintf("%#v", this.Eol)+",\n") - s = append(s, "Ttl: "+fmt.Sprintf("%#v", this.Ttl)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringNamesys(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 345 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x52, 0xcd, 0x4a, 0xeb, 0x40, + 0x18, 0xcd, 0xf4, 0xe7, 0x42, 0x3f, 0x6e, 0xcb, 0x65, 0x6e, 0x85, 0xd8, 0xc5, 0x50, 0xb2, 0x90, + 0xae, 0x8a, 0xe8, 0xc6, 0xa5, 0x55, 0x44, 0x44, 0x28, 0x65, 0xf4, 0x05, 0x92, 0xe6, 0x83, 0x04, + 0x92, 0xce, 0x34, 0x33, 0x53, 0xc8, 0x23, 0xb8, 0xf3, 0xb1, 0x5c, 0x76, 0xe9, 0x4e, 0x69, 0x5f, + 0x44, 0x66, 0xfa, 0x43, 0x53, 0xba, 0x72, 0x77, 0x7e, 0xc8, 0xc9, 0x39, 0x1f, 0x03, 0xed, 0x59, + 0x98, 0xa3, 0x2a, 0xd5, 0x50, 0x16, 0x42, 0x0b, 0x5a, 0x93, 0x51, 0x0f, 0x8c, 0x4e, 0xb3, 0x0d, + 0x0f, 0xde, 0x08, 0x9c, 0x8d, 0xc3, 0x1c, 0x5f, 0x4a, 0xc5, 0x51, 0x89, 0x6c, 0x81, 0x1c, 0xe7, + 0x06, 0x95, 0xa6, 0x14, 0x1a, 0xf6, 0x53, 0x9f, 0xf4, 0xc9, 0xa0, 0xc5, 0x1d, 0xa6, 0x5d, 0x68, + 0xc6, 0x28, 0x75, 0xe2, 0xd7, 0xfa, 0x64, 0xd0, 0xe6, 0x1b, 0x42, 0x2f, 0xa0, 0x13, 0x27, 0x9a, + 0xe3, 0x54, 0x14, 0xf1, 0xbd, 0x30, 0x33, 0xed, 0xd7, 0x9d, 0x7d, 0xa4, 0x52, 0x06, 0x10, 0x27, + 0xfa, 0x35, 0xcd, 0x51, 0x18, 0xed, 0x37, 0xfa, 0x64, 0xd0, 0xe4, 0x07, 0x4a, 0x70, 0x0b, 0xdd, + 0xe3, 0x2a, 0xca, 0x64, 0xae, 0x89, 0x0c, 0x75, 0xb2, 0x6b, 0x62, 0xb1, 0x6d, 0x82, 0x45, 0x21, + 0x0a, 0xd7, 0xa4, 0xc5, 0x37, 0x24, 0x98, 0xef, 0xc7, 0x4c, 0x4c, 0x94, 0xa5, 0x2a, 0xd9, 0x8d, + 0x61, 0x00, 0xb2, 0x48, 0x17, 0xa1, 0xc6, 0x67, 0x2c, 0x5d, 0xd0, 0x5f, 0x7e, 0xa0, 0xd8, 0xb8, + 0x45, 0x98, 0x19, 0xdc, 0xc5, 0x39, 0x42, 0xff, 0x41, 0x1d, 0x45, 0xe6, 0xd6, 0x34, 0xb9, 0x85, + 0x56, 0xd1, 0x3a, 0xdb, 0x76, 0xb7, 0xf0, 0xea, 0x8b, 0x00, 0x6c, 0xff, 0x39, 0x9a, 0x3c, 0xd1, + 0x47, 0xe8, 0x54, 0x37, 0xd0, 0xf3, 0xa1, 0x8c, 0x86, 0x27, 0x4f, 0xdc, 0xf3, 0x4f, 0x59, 0x76, + 0x72, 0xe0, 0xd1, 0x31, 0xfc, 0xaf, 0x3a, 0x23, 0x55, 0xce, 0xa6, 0xbf, 0x4c, 0xbb, 0x24, 0xf4, + 0x66, 0x5f, 0x6c, 0x7b, 0x9a, 0x4a, 0x54, 0xf5, 0x5c, 0xbd, 0x96, 0xb5, 0x1e, 0x72, 0xa9, 0xcb, + 0xc0, 0xbb, 0xf3, 0x3f, 0x56, 0x8c, 0x2c, 0x57, 0x8c, 0x7c, 0xaf, 0x18, 0x79, 0x5f, 0x33, 0x6f, + 0xb9, 0x66, 0xde, 0xe7, 0x9a, 0x79, 0xd1, 0x1f, 0xf7, 0x86, 0xae, 0x7f, 0x02, 0x00, 0x00, 0xff, + 0xff, 0x57, 0x29, 0x6f, 0x5f, 0x64, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -850,122 +595,6 @@ func encodeVarintNamesys(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedNameSysResolveRequest(r randyNamesys, easy bool) *NameSysResolveRequest { - this := &NameSysResolveRequest{} - this.Name = string(randStringNamesys(r)) - this.Depth = uint32(r.Uint32()) - this.DhtRecordCount = uint32(r.Uint32()) - this.DhtTimeout = int32(r.Int31()) - if r.Intn(2) == 0 { - this.DhtTimeout *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNameSysResolveResult(r randyNamesys, easy bool) *NameSysResolveResult { - this := &NameSysResolveResult{} - this.Path = string(randStringNamesys(r)) - this.Error = string(randStringNamesys(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedNameSysPublishRequest(r randyNamesys, easy bool) *NameSysPublishRequest { - this := &NameSysPublishRequest{} - v1 := r.Intn(100) - this.PrivateKey = make([]byte, v1) - for i := 0; i < v1; i++ { - this.PrivateKey[i] = byte(r.Intn(256)) - } - this.Value = string(randStringNamesys(r)) - this.Eol = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Eol *= -1 - } - this.Ttl = int32(r.Int31()) - if r.Intn(2) == 0 { - this.Ttl *= -1 - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyNamesys interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneNamesys(r randyNamesys) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringNamesys(r randyNamesys) string { - v2 := r.Intn(100) - tmps := make([]rune, v2) - for i := 0; i < v2; i++ { - tmps[i] = randUTF8RuneNamesys(r) - } - return string(tmps) -} -func randUnrecognizedNamesys(r randyNamesys, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldNamesys(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldNamesys(dAtA []byte, r randyNamesys, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(key)) - v3 := r.Int63() - if r.Intn(2) == 0 { - v3 *= -1 - } - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(v3)) - case 1: - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateNamesys(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateNamesys(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *NameSysResolveRequest) Size() (n int) { if m == nil { return 0 @@ -1034,51 +663,6 @@ func sovNamesys(x uint64) (n int) { func sozNamesys(x uint64) (n int) { return sovNamesys(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *NameSysResolveRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NameSysResolveRequest{`, - `Name:` + fmt.Sprintf("%v", this.Name) + `,`, - `Depth:` + fmt.Sprintf("%v", this.Depth) + `,`, - `DhtRecordCount:` + fmt.Sprintf("%v", this.DhtRecordCount) + `,`, - `DhtTimeout:` + fmt.Sprintf("%v", this.DhtTimeout) + `,`, - `}`, - }, "") - return s -} -func (this *NameSysResolveResult) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NameSysResolveResult{`, - `Path:` + fmt.Sprintf("%v", this.Path) + `,`, - `Error:` + fmt.Sprintf("%v", this.Error) + `,`, - `}`, - }, "") - return s -} -func (this *NameSysPublishRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&NameSysPublishRequest{`, - `PrivateKey:` + fmt.Sprintf("%v", this.PrivateKey) + `,`, - `Value:` + fmt.Sprintf("%v", this.Value) + `,`, - `Eol:` + fmt.Sprintf("%v", this.Eol) + `,`, - `Ttl:` + fmt.Sprintf("%v", this.Ttl) + `,`, - `}`, - }, "") - return s -} -func valueToStringNamesys(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *NameSysResolveRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/namesyspb_test.go b/go/namesyspb_test.go deleted file mode 100644 index b08ef14..0000000 --- a/go/namesyspb_test.go +++ /dev/null @@ -1,554 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: namesys.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestNameSysResolveRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNameSysResolveRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveResultProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveResult{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNameSysResolveResultMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveResult{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysPublishRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestNameSysPublishRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNameSysResolveResultJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysResolveResult{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNameSysPublishRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &NameSysPublishRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestNameSysResolveRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NameSysResolveRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NameSysResolveRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveResultProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NameSysResolveResult{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveResultProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NameSysResolveResult{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysPublishRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &NameSysPublishRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysPublishRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &NameSysPublishRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestNameSysResolveRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NameSysResolveRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNameSysResolveResultVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveResult(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NameSysResolveResult{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNameSysPublishRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysPublishRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &NameSysPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestNameSysResolveRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNameSysResolveResultGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveResult(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNameSysPublishRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysPublishRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestNameSysResolveRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNameSysResolveResultSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysResolveResult(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNameSysPublishRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedNameSysPublishRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestNameSysResolveRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNameSysResolveResultStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysResolveResult(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestNameSysPublishRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedNameSysPublishRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/node.pb.go b/go/node.pb.go index 31f5996..6f94f31 100644 --- a/go/node.pb.go +++ b/go/node.pb.go @@ -9,12 +9,8 @@ import ( io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" - github_com_gogo_protobuf_sortkeys "github.com/gogo/protobuf/sortkeys" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" @@ -124,8 +120,9 @@ type P2PRequest struct { ReportPeerID bool `protobuf:"varint,9,opt,name=reportPeerID,proto3" json:"reportPeerID,omitempty"` } -func (m *P2PRequest) Reset() { *m = P2PRequest{} } -func (*P2PRequest) ProtoMessage() {} +func (m *P2PRequest) Reset() { *m = P2PRequest{} } +func (m *P2PRequest) String() string { return proto.CompactTextString(m) } +func (*P2PRequest) ProtoMessage() {} func (*P2PRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{0} } @@ -230,8 +227,9 @@ type P2PResponse struct { StreamInfos []*P2PLsInfo `protobuf:"bytes,4,rep,name=streamInfos,proto3" json:"streamInfos,omitempty"` } -func (m *P2PResponse) Reset() { *m = P2PResponse{} } -func (*P2PResponse) ProtoMessage() {} +func (m *P2PResponse) Reset() { *m = P2PResponse{} } +func (m *P2PResponse) String() string { return proto.CompactTextString(m) } +func (*P2PResponse) ProtoMessage() {} func (*P2PResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{1} } @@ -299,8 +297,9 @@ type P2PLsInfo struct { Local bool `protobuf:"varint,4,opt,name=local,proto3" json:"local,omitempty"` } -func (m *P2PLsInfo) Reset() { *m = P2PLsInfo{} } -func (*P2PLsInfo) ProtoMessage() {} +func (m *P2PLsInfo) Reset() { *m = P2PLsInfo{} } +func (m *P2PLsInfo) String() string { return proto.CompactTextString(m) } +func (*P2PLsInfo) ProtoMessage() {} func (*P2PLsInfo) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{2} } @@ -365,8 +364,9 @@ type GetPeersResponse struct { PeerIDs []string `protobuf:"bytes,1,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"` } -func (m *GetPeersResponse) Reset() { *m = GetPeersResponse{} } -func (*GetPeersResponse) ProtoMessage() {} +func (m *GetPeersResponse) Reset() { *m = GetPeersResponse{} } +func (m *GetPeersResponse) String() string { return proto.CompactTextString(m) } +func (*GetPeersResponse) ProtoMessage() {} func (*GetPeersResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{3} } @@ -410,8 +410,9 @@ type ConnectRequest struct { MultiAddrs []string `protobuf:"bytes,1,rep,name=multiAddrs,proto3" json:"multiAddrs,omitempty"` } -func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } -func (*ConnectRequest) ProtoMessage() {} +func (m *ConnectRequest) Reset() { *m = ConnectRequest{} } +func (m *ConnectRequest) String() string { return proto.CompactTextString(m) } +func (*ConnectRequest) ProtoMessage() {} func (*ConnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{4} } @@ -455,8 +456,9 @@ type IsConnectedRequest struct { PeerIDs []string `protobuf:"bytes,1,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"` } -func (m *IsConnectedRequest) Reset() { *m = IsConnectedRequest{} } -func (*IsConnectedRequest) ProtoMessage() {} +func (m *IsConnectedRequest) Reset() { *m = IsConnectedRequest{} } +func (m *IsConnectedRequest) String() string { return proto.CompactTextString(m) } +func (*IsConnectedRequest) ProtoMessage() {} func (*IsConnectedRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{5} } @@ -500,8 +502,9 @@ type IsConnectedResponse struct { Connected map[string]bool `protobuf:"bytes,1,rep,name=connected,proto3" json:"connected,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"varint,2,opt,name=value,proto3"` } -func (m *IsConnectedResponse) Reset() { *m = IsConnectedResponse{} } -func (*IsConnectedResponse) ProtoMessage() {} +func (m *IsConnectedResponse) Reset() { *m = IsConnectedResponse{} } +func (m *IsConnectedResponse) String() string { return proto.CompactTextString(m) } +func (*IsConnectedResponse) ProtoMessage() {} func (*IsConnectedResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{6} } @@ -545,8 +548,9 @@ type DisconnectRequest struct { PeerIDs []string `protobuf:"bytes,1,rep,name=peerIDs,proto3" json:"peerIDs,omitempty"` } -func (m *DisconnectRequest) Reset() { *m = DisconnectRequest{} } -func (*DisconnectRequest) ProtoMessage() {} +func (m *DisconnectRequest) Reset() { *m = DisconnectRequest{} } +func (m *DisconnectRequest) String() string { return proto.CompactTextString(m) } +func (*DisconnectRequest) ProtoMessage() {} func (*DisconnectRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{7} } @@ -590,8 +594,9 @@ type DisconnectResponse struct { Status map[string]*DisconnectResponse_StatusMessage `protobuf:"bytes,1,rep,name=status,proto3" json:"status,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -func (m *DisconnectResponse) Reset() { *m = DisconnectResponse{} } -func (*DisconnectResponse) ProtoMessage() {} +func (m *DisconnectResponse) Reset() { *m = DisconnectResponse{} } +func (m *DisconnectResponse) String() string { return proto.CompactTextString(m) } +func (*DisconnectResponse) ProtoMessage() {} func (*DisconnectResponse) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{8} } @@ -637,8 +642,9 @@ type DisconnectResponse_StatusMessage struct { Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"` } -func (m *DisconnectResponse_StatusMessage) Reset() { *m = DisconnectResponse_StatusMessage{} } -func (*DisconnectResponse_StatusMessage) ProtoMessage() {} +func (m *DisconnectResponse_StatusMessage) Reset() { *m = DisconnectResponse_StatusMessage{} } +func (m *DisconnectResponse_StatusMessage) String() string { return proto.CompactTextString(m) } +func (*DisconnectResponse_StatusMessage) ProtoMessage() {} func (*DisconnectResponse_StatusMessage) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{8, 1} } @@ -689,8 +695,9 @@ type EnableExtrasRequest struct { ExtrasFeature EXTRASTYPE `protobuf:"varint,1,opt,name=extrasFeature,proto3,enum=pb.EXTRASTYPE" json:"extrasFeature,omitempty"` } -func (m *EnableExtrasRequest) Reset() { *m = EnableExtrasRequest{} } -func (*EnableExtrasRequest) ProtoMessage() {} +func (m *EnableExtrasRequest) Reset() { *m = EnableExtrasRequest{} } +func (m *EnableExtrasRequest) String() string { return proto.CompactTextString(m) } +func (*EnableExtrasRequest) ProtoMessage() {} func (*EnableExtrasRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{9} } @@ -734,8 +741,9 @@ type DisableExtrasRequest struct { ExtrasFeature EXTRASTYPE `protobuf:"varint,1,opt,name=extrasFeature,proto3,enum=pb.EXTRASTYPE" json:"extrasFeature,omitempty"` } -func (m *DisableExtrasRequest) Reset() { *m = DisableExtrasRequest{} } -func (*DisableExtrasRequest) ProtoMessage() {} +func (m *DisableExtrasRequest) Reset() { *m = DisableExtrasRequest{} } +func (m *DisableExtrasRequest) String() string { return proto.CompactTextString(m) } +func (*DisableExtrasRequest) ProtoMessage() {} func (*DisableExtrasRequest) Descriptor() ([]byte, []int) { return fileDescriptor_0c843d59d2d938e7, []int{10} } @@ -795,1052 +803,60 @@ func init() { func init() { proto.RegisterFile("node.proto", fileDescriptor_0c843d59d2d938e7) } var fileDescriptor_0c843d59d2d938e7 = []byte{ - // 902 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6f, 0xe3, 0x44, - 0x14, 0xf7, 0x38, 0x9b, 0x7f, 0xcf, 0x4d, 0x31, 0xb3, 0xa1, 0x58, 0x39, 0x58, 0x91, 0xb5, 0x42, - 0x51, 0x45, 0xd3, 0x55, 0x28, 0x68, 0x55, 0x81, 0x44, 0x9b, 0xb8, 0x28, 0xda, 0xd0, 0x1a, 0x27, - 0x0b, 0xf4, 0x84, 0x9c, 0x64, 0x36, 0x44, 0x38, 0x9e, 0xe0, 0x19, 0x2f, 0xf4, 0xc6, 0x47, 0x80, - 0x23, 0xdf, 0x60, 0x3f, 0x02, 0x1f, 0x81, 0xe3, 0x1e, 0x7b, 0xdc, 0xa6, 0x5f, 0x80, 0x23, 0x17, - 0x10, 0x9a, 0xb1, 0x9d, 0xda, 0xdb, 0x14, 0x56, 0x68, 0x6f, 0xf3, 0x7e, 0xf3, 0x7b, 0x6f, 0xde, - 0xfb, 0xbd, 0xf7, 0x06, 0x20, 0xa0, 0x53, 0xd2, 0x5e, 0x86, 0x94, 0x53, 0xac, 0x2e, 0xc7, 0x0d, - 0x88, 0xf8, 0xdc, 0x8f, 0xed, 0xc6, 0xde, 0x6c, 0xce, 0xbf, 0x8d, 0xc6, 0xed, 0x09, 0x5d, 0xec, - 0xcf, 0xe8, 0x8c, 0xee, 0x4b, 0x78, 0x1c, 0x3d, 0x95, 0x96, 0x34, 0xe4, 0x29, 0xa6, 0x5b, 0x97, - 0x2a, 0x80, 0xd3, 0x71, 0x5c, 0xf2, 0x7d, 0x44, 0x18, 0xc7, 0x0f, 0x41, 0x0b, 0xe3, 0xe3, 0xe8, - 0x62, 0x49, 0x0c, 0xd4, 0x44, 0xad, 0xed, 0xce, 0x76, 0x7b, 0x39, 0x6e, 0x0b, 0x92, 0xfd, 0xc5, - 0xe8, 0xdc, 0xb1, 0xdd, 0x2c, 0x05, 0xeb, 0x50, 0xf0, 0x7c, 0xdf, 0x50, 0x9b, 0xa8, 0x55, 0x71, - 0xc5, 0x11, 0x1b, 0x50, 0x7e, 0x46, 0xc2, 0x31, 0x65, 0xc4, 0x28, 0x48, 0x34, 0x35, 0xb1, 0x05, - 0x5b, 0xf2, 0xd5, 0x09, 0xf5, 0x4f, 0xbd, 0x05, 0x31, 0xee, 0x35, 0x51, 0xab, 0xea, 0xe6, 0x30, - 0xfc, 0x00, 0x6a, 0xfe, 0x9c, 0x71, 0x12, 0x1c, 0x4d, 0xa7, 0x21, 0x61, 0xcc, 0x28, 0x4a, 0x52, - 0x1e, 0x14, 0x2c, 0xee, 0x85, 0x33, 0xc2, 0x53, 0x56, 0x29, 0x66, 0xe5, 0x40, 0xc1, 0x0a, 0xc9, - 0x82, 0x72, 0x92, 0xb2, 0xca, 0x31, 0x2b, 0x07, 0xe2, 0x0e, 0xd4, 0x3d, 0xdf, 0xa7, 0x3f, 0x74, - 0x23, 0xc6, 0xe9, 0xc2, 0x49, 0x92, 0x61, 0x46, 0x45, 0x26, 0xbf, 0xf1, 0x4e, 0x54, 0x12, 0x92, - 0x25, 0x0d, 0xb9, 0x43, 0x48, 0xd8, 0xef, 0x19, 0x55, 0xc9, 0xcd, 0x61, 0xd6, 0x73, 0x04, 0x9a, - 0x94, 0x96, 0x2d, 0x69, 0xc0, 0xc8, 0xff, 0xd0, 0xb6, 0x0e, 0xc5, 0xc0, 0x5b, 0x10, 0x66, 0xa8, - 0xcd, 0x42, 0xab, 0xea, 0xc6, 0x06, 0x6e, 0x82, 0x36, 0xa1, 0x41, 0xc0, 0xba, 0x3e, 0x65, 0x64, - 0x2a, 0x35, 0x2e, 0xba, 0x59, 0x08, 0xef, 0x83, 0xc6, 0x78, 0x48, 0xbc, 0x45, 0x3f, 0x78, 0x4a, - 0x99, 0x71, 0xaf, 0x59, 0x68, 0x69, 0x9d, 0x5a, 0xf2, 0xd2, 0x80, 0x09, 0xd4, 0xcd, 0x32, 0xac, - 0x5f, 0x10, 0x54, 0xd7, 0x57, 0xb7, 0xda, 0x84, 0x5e, 0xa7, 0x4d, 0xea, 0x6b, 0xb5, 0xa9, 0xb0, - 0xa9, 0x4d, 0x75, 0x28, 0xfa, 0x74, 0xe2, 0xf9, 0x72, 0x1e, 0x2a, 0x6e, 0x6c, 0x58, 0xef, 0x83, - 0xfe, 0x19, 0x91, 0x5a, 0xb2, 0xb5, 0x84, 0x06, 0x94, 0x97, 0x52, 0x5c, 0x66, 0x20, 0x29, 0x49, - 0x6a, 0x5a, 0x0f, 0x61, 0xbb, 0x4b, 0x83, 0x80, 0x4c, 0x78, 0x3a, 0xca, 0x26, 0xc0, 0x22, 0xf2, - 0xf9, 0x5c, 0xbc, 0x92, 0xd2, 0x33, 0x88, 0xd5, 0x06, 0xdc, 0x67, 0x89, 0x0f, 0x99, 0xa6, 0x5e, - 0x77, 0xbf, 0xf0, 0x2b, 0x82, 0xfb, 0x39, 0x87, 0x24, 0xa7, 0x1e, 0x54, 0x27, 0x29, 0x28, 0x7d, - 0xb4, 0xce, 0x7b, 0x42, 0xea, 0x0d, 0xdc, 0xf6, 0x1a, 0xb1, 0x03, 0x1e, 0x5e, 0xb8, 0x37, 0x8e, - 0x8d, 0x8f, 0xd7, 0xf9, 0x27, 0x97, 0x62, 0xb1, 0xbe, 0x23, 0x17, 0x89, 0xf8, 0xe2, 0x28, 0x74, - 0x7a, 0xe6, 0xf9, 0x11, 0x49, 0x96, 0x2d, 0x36, 0x0e, 0xd5, 0x47, 0xc8, 0xda, 0x83, 0xb7, 0x7b, - 0x73, 0x36, 0xc9, 0x0b, 0x70, 0x77, 0x29, 0x7f, 0x23, 0xc0, 0x59, 0x7e, 0x52, 0xc9, 0x21, 0x94, - 0x18, 0xf7, 0x78, 0xc4, 0x92, 0x32, 0x2c, 0x51, 0xc6, 0x6d, 0x5e, 0x7b, 0x28, 0x49, 0x71, 0x09, - 0x89, 0x47, 0xe3, 0x1b, 0xd0, 0x32, 0xf0, 0x86, 0xe4, 0x0f, 0xb3, 0xc9, 0x6b, 0x9d, 0x07, 0xff, - 0x1a, 0xfb, 0x73, 0xc2, 0x98, 0x37, 0x23, 0x99, 0x12, 0x1b, 0x8f, 0xa1, 0x96, 0xbb, 0x13, 0x53, - 0x3a, 0x5d, 0xfb, 0x4b, 0xe9, 0xe5, 0x0a, 0x66, 0x31, 0xbc, 0x03, 0xa5, 0x90, 0x78, 0x8c, 0x06, - 0xc9, 0x78, 0x26, 0x96, 0xf5, 0x18, 0xee, 0xdb, 0x81, 0x37, 0xf6, 0x89, 0xfd, 0x23, 0x0f, 0x3d, - 0x96, 0x2a, 0x76, 0x00, 0x35, 0x22, 0x81, 0x13, 0xe2, 0xf1, 0x28, 0xcc, 0xed, 0xa8, 0xfd, 0xf5, - 0xc8, 0x3d, 0x1a, 0xca, 0x1d, 0xcd, 0x93, 0xac, 0x01, 0xd4, 0x7b, 0x73, 0xf6, 0x86, 0xa2, 0xed, - 0x3e, 0x8a, 0xff, 0xe3, 0xf8, 0x3b, 0xc0, 0x55, 0x28, 0x76, 0x07, 0x67, 0x43, 0x5b, 0x57, 0xb0, - 0x06, 0xe5, 0x93, 0x33, 0xf7, 0xab, 0x23, 0xb7, 0xa7, 0x23, 0x0c, 0x50, 0x1a, 0xf4, 0x87, 0x23, - 0xfb, 0x54, 0x57, 0x71, 0x09, 0xd4, 0xc1, 0x50, 0x2f, 0xec, 0x7e, 0x08, 0x70, 0x13, 0x16, 0x6f, - 0x41, 0xa5, 0xdf, 0xb3, 0x4f, 0x47, 0xfd, 0x93, 0x73, 0x5d, 0x11, 0x7c, 0xe7, 0xc9, 0xf1, 0xf0, - 0xc9, 0xb1, 0x8e, 0x70, 0x0d, 0xaa, 0xbd, 0xfe, 0xb0, 0x7b, 0xf6, 0xa5, 0xed, 0x9e, 0xeb, 0x6a, - 0xe7, 0x2f, 0x15, 0xca, 0xa7, 0x74, 0x4a, 0x8e, 0x9c, 0x3e, 0xde, 0x83, 0x4a, 0xba, 0x73, 0xb8, - 0x2a, 0xf3, 0x5c, 0x2c, 0xf9, 0x45, 0xa3, 0x2e, 0x8e, 0xaf, 0x2e, 0xa3, 0xa5, 0xe0, 0x5d, 0x28, - 0x27, 0x43, 0x8b, 0xb1, 0xa0, 0xe4, 0x37, 0xb0, 0x71, 0x13, 0xc1, 0x52, 0xf0, 0x27, 0x00, 0x37, - 0xed, 0xc6, 0xef, 0xbc, 0xda, 0xfe, 0xd8, 0x63, 0x67, 0xf3, 0x54, 0x58, 0x0a, 0xfe, 0x14, 0xb4, - 0xcc, 0x42, 0xe1, 0x9d, 0x5b, 0x1b, 0x16, 0x07, 0x78, 0xf7, 0x8e, 0xcd, 0xb3, 0x14, 0x7c, 0x00, - 0x5b, 0xd9, 0x9e, 0x63, 0x49, 0xdd, 0x30, 0x05, 0xf9, 0xb4, 0x3f, 0x82, 0x5a, 0xae, 0xb9, 0xd8, - 0x48, 0x52, 0xfc, 0x0f, 0xbf, 0x16, 0x14, 0x9c, 0x8e, 0x83, 0xd7, 0xdf, 0x7b, 0xc2, 0x79, 0x6b, - 0x6d, 0xa7, 0x79, 0x1d, 0x1f, 0x5c, 0x5e, 0x99, 0xca, 0xcb, 0x2b, 0x13, 0xfd, 0x71, 0x65, 0xa2, - 0x3f, 0xaf, 0x4c, 0xf4, 0xd3, 0xca, 0x44, 0xcf, 0x57, 0x26, 0xfa, 0x6d, 0x65, 0xa2, 0xdf, 0x57, - 0x26, 0x7a, 0xb1, 0x32, 0xd1, 0xcb, 0x95, 0x89, 0x7e, 0xbe, 0x36, 0x95, 0x17, 0xd7, 0xa6, 0x72, - 0x79, 0x6d, 0x2a, 0xe3, 0x92, 0xfc, 0x8d, 0x3f, 0xf8, 0x27, 0x00, 0x00, 0xff, 0xff, 0xfd, 0x62, - 0x4b, 0xfc, 0x0b, 0x08, 0x00, 0x00, -} - -func (this *P2PRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*P2PRequest) - if !ok { - that2, ok := that.(P2PRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *P2PRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *P2PRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *P2PRequest but is not nil && this == nil") - } - if this.RequestType != that1.RequestType { - return fmt.Errorf("RequestType this(%v) Not Equal that(%v)", this.RequestType, that1.RequestType) - } - if this.All != that1.All { - return fmt.Errorf("All this(%v) Not Equal that(%v)", this.All, that1.All) - } - if this.Verbose != that1.Verbose { - return fmt.Errorf("Verbose this(%v) Not Equal that(%v)", this.Verbose, that1.Verbose) - } - if this.ProtocolName != that1.ProtocolName { - return fmt.Errorf("ProtocolName this(%v) Not Equal that(%v)", this.ProtocolName, that1.ProtocolName) - } - if this.ListenAddress != that1.ListenAddress { - return fmt.Errorf("ListenAddress this(%v) Not Equal that(%v)", this.ListenAddress, that1.ListenAddress) - } - if this.TargetAddress != that1.TargetAddress { - return fmt.Errorf("TargetAddress this(%v) Not Equal that(%v)", this.TargetAddress, that1.TargetAddress) - } - if this.RemoteAddress != that1.RemoteAddress { - return fmt.Errorf("RemoteAddress this(%v) Not Equal that(%v)", this.RemoteAddress, that1.RemoteAddress) - } - if this.AllowCustomProtocols != that1.AllowCustomProtocols { - return fmt.Errorf("AllowCustomProtocols this(%v) Not Equal that(%v)", this.AllowCustomProtocols, that1.AllowCustomProtocols) - } - if this.ReportPeerID != that1.ReportPeerID { - return fmt.Errorf("ReportPeerID this(%v) Not Equal that(%v)", this.ReportPeerID, that1.ReportPeerID) - } - return nil -} -func (this *P2PRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*P2PRequest) - if !ok { - that2, ok := that.(P2PRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RequestType != that1.RequestType { - return false - } - if this.All != that1.All { - return false - } - if this.Verbose != that1.Verbose { - return false - } - if this.ProtocolName != that1.ProtocolName { - return false - } - if this.ListenAddress != that1.ListenAddress { - return false - } - if this.TargetAddress != that1.TargetAddress { - return false - } - if this.RemoteAddress != that1.RemoteAddress { - return false - } - if this.AllowCustomProtocols != that1.AllowCustomProtocols { - return false - } - if this.ReportPeerID != that1.ReportPeerID { - return false - } - return true -} -func (this *P2PResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*P2PResponse) - if !ok { - that2, ok := that.(P2PResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *P2PResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *P2PResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *P2PResponse but is not nil && this == nil") - } - if this.RequestType != that1.RequestType { - return fmt.Errorf("RequestType this(%v) Not Equal that(%v)", this.RequestType, that1.RequestType) - } - if len(this.Names) != len(that1.Names) { - return fmt.Errorf("Names this(%v) Not Equal that(%v)", len(this.Names), len(that1.Names)) - } - for i := range this.Names { - if this.Names[i] != that1.Names[i] { - return fmt.Errorf("Names this[%v](%v) Not Equal that[%v](%v)", i, this.Names[i], i, that1.Names[i]) - } - } - if this.ConnsClosed != that1.ConnsClosed { - return fmt.Errorf("ConnsClosed this(%v) Not Equal that(%v)", this.ConnsClosed, that1.ConnsClosed) - } - if len(this.StreamInfos) != len(that1.StreamInfos) { - return fmt.Errorf("StreamInfos this(%v) Not Equal that(%v)", len(this.StreamInfos), len(that1.StreamInfos)) - } - for i := range this.StreamInfos { - if !this.StreamInfos[i].Equal(that1.StreamInfos[i]) { - return fmt.Errorf("StreamInfos this[%v](%v) Not Equal that[%v](%v)", i, this.StreamInfos[i], i, that1.StreamInfos[i]) - } - } - return nil -} -func (this *P2PResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*P2PResponse) - if !ok { - that2, ok := that.(P2PResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.RequestType != that1.RequestType { - return false - } - if len(this.Names) != len(that1.Names) { - return false - } - for i := range this.Names { - if this.Names[i] != that1.Names[i] { - return false - } - } - if this.ConnsClosed != that1.ConnsClosed { - return false - } - if len(this.StreamInfos) != len(that1.StreamInfos) { - return false - } - for i := range this.StreamInfos { - if !this.StreamInfos[i].Equal(that1.StreamInfos[i]) { - return false - } - } - return true -} -func (this *P2PLsInfo) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*P2PLsInfo) - if !ok { - that2, ok := that.(P2PLsInfo) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *P2PLsInfo") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *P2PLsInfo but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *P2PLsInfo but is not nil && this == nil") - } - if this.ProtocolName != that1.ProtocolName { - return fmt.Errorf("ProtocolName this(%v) Not Equal that(%v)", this.ProtocolName, that1.ProtocolName) - } - if this.ListenAddress != that1.ListenAddress { - return fmt.Errorf("ListenAddress this(%v) Not Equal that(%v)", this.ListenAddress, that1.ListenAddress) - } - if this.TargetAddress != that1.TargetAddress { - return fmt.Errorf("TargetAddress this(%v) Not Equal that(%v)", this.TargetAddress, that1.TargetAddress) - } - if this.Local != that1.Local { - return fmt.Errorf("Local this(%v) Not Equal that(%v)", this.Local, that1.Local) - } - return nil -} -func (this *P2PLsInfo) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*P2PLsInfo) - if !ok { - that2, ok := that.(P2PLsInfo) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ProtocolName != that1.ProtocolName { - return false - } - if this.ListenAddress != that1.ListenAddress { - return false - } - if this.TargetAddress != that1.TargetAddress { - return false - } - if this.Local != that1.Local { - return false - } - return true -} -func (this *GetPeersResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*GetPeersResponse) - if !ok { - that2, ok := that.(GetPeersResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *GetPeersResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *GetPeersResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *GetPeersResponse but is not nil && this == nil") - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return fmt.Errorf("PeerIDs this(%v) Not Equal that(%v)", len(this.PeerIDs), len(that1.PeerIDs)) - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return fmt.Errorf("PeerIDs this[%v](%v) Not Equal that[%v](%v)", i, this.PeerIDs[i], i, that1.PeerIDs[i]) - } - } - return nil -} -func (this *GetPeersResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*GetPeersResponse) - if !ok { - that2, ok := that.(GetPeersResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return false - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return false - } - } - return true -} -func (this *ConnectRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*ConnectRequest) - if !ok { - that2, ok := that.(ConnectRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *ConnectRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *ConnectRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *ConnectRequest but is not nil && this == nil") - } - if len(this.MultiAddrs) != len(that1.MultiAddrs) { - return fmt.Errorf("MultiAddrs this(%v) Not Equal that(%v)", len(this.MultiAddrs), len(that1.MultiAddrs)) - } - for i := range this.MultiAddrs { - if this.MultiAddrs[i] != that1.MultiAddrs[i] { - return fmt.Errorf("MultiAddrs this[%v](%v) Not Equal that[%v](%v)", i, this.MultiAddrs[i], i, that1.MultiAddrs[i]) - } - } - return nil -} -func (this *ConnectRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*ConnectRequest) - if !ok { - that2, ok := that.(ConnectRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.MultiAddrs) != len(that1.MultiAddrs) { - return false - } - for i := range this.MultiAddrs { - if this.MultiAddrs[i] != that1.MultiAddrs[i] { - return false - } - } - return true -} -func (this *IsConnectedRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IsConnectedRequest) - if !ok { - that2, ok := that.(IsConnectedRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IsConnectedRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IsConnectedRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IsConnectedRequest but is not nil && this == nil") - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return fmt.Errorf("PeerIDs this(%v) Not Equal that(%v)", len(this.PeerIDs), len(that1.PeerIDs)) - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return fmt.Errorf("PeerIDs this[%v](%v) Not Equal that[%v](%v)", i, this.PeerIDs[i], i, that1.PeerIDs[i]) - } - } - return nil -} -func (this *IsConnectedRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IsConnectedRequest) - if !ok { - that2, ok := that.(IsConnectedRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return false - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return false - } - } - return true -} -func (this *IsConnectedResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*IsConnectedResponse) - if !ok { - that2, ok := that.(IsConnectedResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *IsConnectedResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *IsConnectedResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *IsConnectedResponse but is not nil && this == nil") - } - if len(this.Connected) != len(that1.Connected) { - return fmt.Errorf("Connected this(%v) Not Equal that(%v)", len(this.Connected), len(that1.Connected)) - } - for i := range this.Connected { - if this.Connected[i] != that1.Connected[i] { - return fmt.Errorf("Connected this[%v](%v) Not Equal that[%v](%v)", i, this.Connected[i], i, that1.Connected[i]) - } - } - return nil -} -func (this *IsConnectedResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*IsConnectedResponse) - if !ok { - that2, ok := that.(IsConnectedResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Connected) != len(that1.Connected) { - return false - } - for i := range this.Connected { - if this.Connected[i] != that1.Connected[i] { - return false - } - } - return true -} -func (this *DisconnectRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DisconnectRequest) - if !ok { - that2, ok := that.(DisconnectRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DisconnectRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DisconnectRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DisconnectRequest but is not nil && this == nil") - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return fmt.Errorf("PeerIDs this(%v) Not Equal that(%v)", len(this.PeerIDs), len(that1.PeerIDs)) - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return fmt.Errorf("PeerIDs this[%v](%v) Not Equal that[%v](%v)", i, this.PeerIDs[i], i, that1.PeerIDs[i]) - } - } - return nil -} -func (this *DisconnectRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DisconnectRequest) - if !ok { - that2, ok := that.(DisconnectRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.PeerIDs) != len(that1.PeerIDs) { - return false - } - for i := range this.PeerIDs { - if this.PeerIDs[i] != that1.PeerIDs[i] { - return false - } - } - return true -} -func (this *DisconnectResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DisconnectResponse) - if !ok { - that2, ok := that.(DisconnectResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DisconnectResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DisconnectResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DisconnectResponse but is not nil && this == nil") - } - if len(this.Status) != len(that1.Status) { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", len(this.Status), len(that1.Status)) - } - for i := range this.Status { - if !this.Status[i].Equal(that1.Status[i]) { - return fmt.Errorf("Status this[%v](%v) Not Equal that[%v](%v)", i, this.Status[i], i, that1.Status[i]) - } - } - return nil -} -func (this *DisconnectResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DisconnectResponse) - if !ok { - that2, ok := that.(DisconnectResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Status) != len(that1.Status) { - return false - } - for i := range this.Status { - if !this.Status[i].Equal(that1.Status[i]) { - return false - } - } - return true -} -func (this *DisconnectResponse_StatusMessage) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DisconnectResponse_StatusMessage) - if !ok { - that2, ok := that.(DisconnectResponse_StatusMessage) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DisconnectResponse_StatusMessage") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DisconnectResponse_StatusMessage but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DisconnectResponse_StatusMessage but is not nil && this == nil") - } - if this.Disconnected != that1.Disconnected { - return fmt.Errorf("Disconnected this(%v) Not Equal that(%v)", this.Disconnected, that1.Disconnected) - } - if this.Reason != that1.Reason { - return fmt.Errorf("Reason this(%v) Not Equal that(%v)", this.Reason, that1.Reason) - } - return nil -} -func (this *DisconnectResponse_StatusMessage) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DisconnectResponse_StatusMessage) - if !ok { - that2, ok := that.(DisconnectResponse_StatusMessage) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Disconnected != that1.Disconnected { - return false - } - if this.Reason != that1.Reason { - return false - } - return true -} -func (this *EnableExtrasRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*EnableExtrasRequest) - if !ok { - that2, ok := that.(EnableExtrasRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *EnableExtrasRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *EnableExtrasRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *EnableExtrasRequest but is not nil && this == nil") - } - if this.ExtrasFeature != that1.ExtrasFeature { - return fmt.Errorf("ExtrasFeature this(%v) Not Equal that(%v)", this.ExtrasFeature, that1.ExtrasFeature) - } - return nil -} -func (this *EnableExtrasRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*EnableExtrasRequest) - if !ok { - that2, ok := that.(EnableExtrasRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ExtrasFeature != that1.ExtrasFeature { - return false - } - return true -} -func (this *DisableExtrasRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*DisableExtrasRequest) - if !ok { - that2, ok := that.(DisableExtrasRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *DisableExtrasRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *DisableExtrasRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *DisableExtrasRequest but is not nil && this == nil") - } - if this.ExtrasFeature != that1.ExtrasFeature { - return fmt.Errorf("ExtrasFeature this(%v) Not Equal that(%v)", this.ExtrasFeature, that1.ExtrasFeature) - } - return nil -} -func (this *DisableExtrasRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*DisableExtrasRequest) - if !ok { - that2, ok := that.(DisableExtrasRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.ExtrasFeature != that1.ExtrasFeature { - return false - } - return true -} -func (this *P2PRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 13) - s = append(s, "&pb.P2PRequest{") - s = append(s, "RequestType: "+fmt.Sprintf("%#v", this.RequestType)+",\n") - s = append(s, "All: "+fmt.Sprintf("%#v", this.All)+",\n") - s = append(s, "Verbose: "+fmt.Sprintf("%#v", this.Verbose)+",\n") - s = append(s, "ProtocolName: "+fmt.Sprintf("%#v", this.ProtocolName)+",\n") - s = append(s, "ListenAddress: "+fmt.Sprintf("%#v", this.ListenAddress)+",\n") - s = append(s, "TargetAddress: "+fmt.Sprintf("%#v", this.TargetAddress)+",\n") - s = append(s, "RemoteAddress: "+fmt.Sprintf("%#v", this.RemoteAddress)+",\n") - s = append(s, "AllowCustomProtocols: "+fmt.Sprintf("%#v", this.AllowCustomProtocols)+",\n") - s = append(s, "ReportPeerID: "+fmt.Sprintf("%#v", this.ReportPeerID)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *P2PResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&pb.P2PResponse{") - s = append(s, "RequestType: "+fmt.Sprintf("%#v", this.RequestType)+",\n") - s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n") - s = append(s, "ConnsClosed: "+fmt.Sprintf("%#v", this.ConnsClosed)+",\n") - if this.StreamInfos != nil { - s = append(s, "StreamInfos: "+fmt.Sprintf("%#v", this.StreamInfos)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *P2PLsInfo) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 8) - s = append(s, "&pb.P2PLsInfo{") - s = append(s, "ProtocolName: "+fmt.Sprintf("%#v", this.ProtocolName)+",\n") - s = append(s, "ListenAddress: "+fmt.Sprintf("%#v", this.ListenAddress)+",\n") - s = append(s, "TargetAddress: "+fmt.Sprintf("%#v", this.TargetAddress)+",\n") - s = append(s, "Local: "+fmt.Sprintf("%#v", this.Local)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *GetPeersResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.GetPeersResponse{") - s = append(s, "PeerIDs: "+fmt.Sprintf("%#v", this.PeerIDs)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *ConnectRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.ConnectRequest{") - s = append(s, "MultiAddrs: "+fmt.Sprintf("%#v", this.MultiAddrs)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IsConnectedRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.IsConnectedRequest{") - s = append(s, "PeerIDs: "+fmt.Sprintf("%#v", this.PeerIDs)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *IsConnectedResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.IsConnectedResponse{") - keysForConnected := make([]string, 0, len(this.Connected)) - for k := range this.Connected { - keysForConnected = append(keysForConnected, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForConnected) - mapStringForConnected := "map[string]bool{" - for _, k := range keysForConnected { - mapStringForConnected += fmt.Sprintf("%#v: %#v,", k, this.Connected[k]) - } - mapStringForConnected += "}" - if this.Connected != nil { - s = append(s, "Connected: "+mapStringForConnected+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DisconnectRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DisconnectRequest{") - s = append(s, "PeerIDs: "+fmt.Sprintf("%#v", this.PeerIDs)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DisconnectResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DisconnectResponse{") - keysForStatus := make([]string, 0, len(this.Status)) - for k := range this.Status { - keysForStatus = append(keysForStatus, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStatus) - mapStringForStatus := "map[string]*DisconnectResponse_StatusMessage{" - for _, k := range keysForStatus { - mapStringForStatus += fmt.Sprintf("%#v: %#v,", k, this.Status[k]) - } - mapStringForStatus += "}" - if this.Status != nil { - s = append(s, "Status: "+mapStringForStatus+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DisconnectResponse_StatusMessage) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.DisconnectResponse_StatusMessage{") - s = append(s, "Disconnected: "+fmt.Sprintf("%#v", this.Disconnected)+",\n") - s = append(s, "Reason: "+fmt.Sprintf("%#v", this.Reason)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *EnableExtrasRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.EnableExtrasRequest{") - s = append(s, "ExtrasFeature: "+fmt.Sprintf("%#v", this.ExtrasFeature)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *DisableExtrasRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.DisableExtrasRequest{") - s = append(s, "ExtrasFeature: "+fmt.Sprintf("%#v", this.ExtrasFeature)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringNode(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 844 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x5f, 0x8f, 0xdb, 0x44, + 0x10, 0xf7, 0x3a, 0xcd, 0x1f, 0x8f, 0x2f, 0x87, 0xd9, 0x86, 0xc3, 0xca, 0x43, 0x14, 0x59, 0x15, + 0x8a, 0x4e, 0x34, 0x54, 0xa6, 0xa0, 0xea, 0x04, 0x12, 0xb9, 0xc4, 0x87, 0xac, 0x86, 0x9c, 0x71, + 0x52, 0xe0, 0x9e, 0x90, 0x93, 0x2c, 0x55, 0x84, 0xe3, 0x35, 0xde, 0x4d, 0x21, 0xdf, 0x02, 0x1e, + 0xf9, 0x06, 0x7c, 0x14, 0x1e, 0xfb, 0xd8, 0x47, 0x74, 0xf7, 0x39, 0x40, 0x68, 0xd7, 0x76, 0x62, + 0xf7, 0x72, 0x50, 0x21, 0xde, 0x76, 0x7e, 0xfb, 0x9b, 0xd9, 0x99, 0xdf, 0xcc, 0x2c, 0x40, 0x44, + 0x97, 0xa4, 0x1f, 0x27, 0x94, 0x53, 0xac, 0xc6, 0xf3, 0x36, 0x6c, 0xf8, 0x2a, 0x4c, 0x6d, 0xeb, + 0x95, 0x0a, 0xe0, 0xd9, 0x9e, 0x4f, 0x7e, 0xd8, 0x10, 0xc6, 0xf1, 0x23, 0xd0, 0x93, 0xf4, 0x38, + 0xdb, 0xc6, 0xc4, 0x44, 0x5d, 0xd4, 0x3b, 0xb6, 0x8f, 0xfb, 0xf1, 0xbc, 0x2f, 0x48, 0xce, 0x97, + 0xb3, 0x2b, 0xcf, 0xf1, 0x8b, 0x14, 0x6c, 0x40, 0x25, 0x08, 0x43, 0x53, 0xed, 0xa2, 0x5e, 0xc3, + 0x17, 0x47, 0x6c, 0x42, 0xfd, 0x05, 0x49, 0xe6, 0x94, 0x11, 0xb3, 0x22, 0xd1, 0xdc, 0xc4, 0x16, + 0x1c, 0xc9, 0x57, 0x17, 0x34, 0x9c, 0x04, 0x6b, 0x62, 0xde, 0xeb, 0xa2, 0x9e, 0xe6, 0x97, 0x30, + 0xfc, 0x00, 0x9a, 0xe1, 0x8a, 0x71, 0x12, 0x0d, 0x96, 0xcb, 0x84, 0x30, 0x66, 0x56, 0x25, 0xa9, + 0x0c, 0x0a, 0x16, 0x0f, 0x92, 0xe7, 0x84, 0xe7, 0xac, 0x5a, 0xca, 0x2a, 0x81, 0x82, 0x95, 0x90, + 0x35, 0xe5, 0x24, 0x67, 0xd5, 0x53, 0x56, 0x09, 0xc4, 0x36, 0xb4, 0x82, 0x30, 0xa4, 0x3f, 0x0e, + 0x37, 0x8c, 0xd3, 0xb5, 0x97, 0x25, 0xc3, 0xcc, 0x86, 0x4c, 0xfe, 0xe0, 0x9d, 0xa8, 0x24, 0x21, + 0x31, 0x4d, 0xb8, 0x47, 0x48, 0xe2, 0x8e, 0x4c, 0x4d, 0x72, 0x4b, 0x98, 0xf5, 0x1b, 0x02, 0x5d, + 0x4a, 0xcb, 0x62, 0x1a, 0x31, 0xf2, 0x1f, 0xb4, 0x6d, 0x41, 0x35, 0x0a, 0xd6, 0x84, 0x99, 0x6a, + 0xb7, 0xd2, 0xd3, 0xfc, 0xd4, 0xc0, 0x5d, 0xd0, 0x17, 0x34, 0x8a, 0xd8, 0x30, 0xa4, 0x8c, 0x2c, + 0xa5, 0xc6, 0x55, 0xbf, 0x08, 0xe1, 0x0f, 0x40, 0x67, 0x3c, 0x21, 0xc1, 0xda, 0x8d, 0xbe, 0xa3, + 0xcc, 0xbc, 0xd7, 0xad, 0xf4, 0x74, 0xbb, 0x99, 0xbd, 0x34, 0x66, 0x02, 0xf5, 0x8b, 0x0c, 0xeb, + 0x17, 0x04, 0xda, 0xee, 0xea, 0x56, 0x9b, 0xd0, 0x9b, 0xb4, 0x49, 0x7d, 0xa3, 0x36, 0x55, 0x0e, + 0xb5, 0xa9, 0x05, 0xd5, 0x90, 0x2e, 0x82, 0x50, 0xce, 0x43, 0xc3, 0x4f, 0x0d, 0xeb, 0x7d, 0x30, + 0x3e, 0x27, 0x52, 0x4b, 0xb6, 0x93, 0xd0, 0x84, 0x7a, 0x2c, 0xc5, 0x65, 0x26, 0x92, 0x92, 0xe4, + 0xa6, 0xf5, 0x08, 0x8e, 0x87, 0x34, 0x8a, 0xc8, 0x82, 0xe7, 0xa3, 0xdc, 0x01, 0x58, 0x6f, 0x42, + 0xbe, 0x12, 0xaf, 0xe4, 0xf4, 0x02, 0x62, 0xf5, 0x01, 0xbb, 0x2c, 0xf3, 0x21, 0xcb, 0xdc, 0xeb, + 0xee, 0x17, 0x7e, 0x45, 0x70, 0xbf, 0xe4, 0x90, 0xe5, 0x34, 0x02, 0x6d, 0x91, 0x83, 0xd2, 0x47, + 0xb7, 0xdf, 0x13, 0x52, 0x1f, 0xe0, 0xf6, 0x77, 0x88, 0x13, 0xf1, 0x64, 0xeb, 0xef, 0x1d, 0xdb, + 0x9f, 0xec, 0xf2, 0xcf, 0x2e, 0xc5, 0x62, 0x7d, 0x4f, 0xb6, 0x99, 0xf8, 0xe2, 0x28, 0x74, 0x7a, + 0x11, 0x84, 0x1b, 0x92, 0x2d, 0x5b, 0x6a, 0x9c, 0xa9, 0x4f, 0x90, 0xf5, 0x10, 0xde, 0x1e, 0xad, + 0xd8, 0xa2, 0x2c, 0xc0, 0xdd, 0xa5, 0xfc, 0x85, 0x00, 0x17, 0xf9, 0x59, 0x25, 0x67, 0x50, 0x63, + 0x3c, 0xe0, 0x1b, 0x96, 0x95, 0x61, 0x89, 0x32, 0x6e, 0xf3, 0xfa, 0x53, 0x49, 0x4a, 0x4b, 0xc8, + 0x3c, 0xda, 0xdf, 0x82, 0x5e, 0x80, 0x0f, 0x24, 0x7f, 0x56, 0x4c, 0x5e, 0xb7, 0x1f, 0xfc, 0x63, + 0xec, 0x2f, 0x08, 0x63, 0xc1, 0x73, 0x52, 0x28, 0xb1, 0xfd, 0x14, 0x9a, 0xa5, 0x3b, 0x31, 0xa5, + 0xcb, 0x9d, 0xbf, 0x94, 0x5e, 0xae, 0x60, 0x11, 0xc3, 0x27, 0x50, 0x4b, 0x48, 0xc0, 0x68, 0x94, + 0x8d, 0x67, 0x66, 0x59, 0x4f, 0xe1, 0xbe, 0x13, 0x05, 0xf3, 0x90, 0x38, 0x3f, 0xf1, 0x24, 0x60, + 0xb9, 0x62, 0x8f, 0xa1, 0x49, 0x24, 0x70, 0x41, 0x02, 0xbe, 0x49, 0x4a, 0x3b, 0xea, 0x7c, 0x33, + 0xf3, 0x07, 0x53, 0xb9, 0xa3, 0x65, 0x92, 0x35, 0x86, 0xd6, 0x68, 0xc5, 0xfe, 0xa7, 0x68, 0xa7, + 0x4f, 0xd2, 0xff, 0x38, 0xfd, 0x0e, 0xb0, 0x06, 0xd5, 0xe1, 0xf8, 0x72, 0xea, 0x18, 0x0a, 0xd6, + 0xa1, 0x7e, 0x71, 0xe9, 0x7f, 0x3d, 0xf0, 0x47, 0x06, 0xc2, 0x00, 0xb5, 0xb1, 0x3b, 0x9d, 0x39, + 0x13, 0x43, 0xc5, 0x35, 0x50, 0xc7, 0x53, 0xa3, 0x72, 0xfa, 0x11, 0xc0, 0x3e, 0x2c, 0x3e, 0x82, + 0x86, 0x3b, 0x72, 0x26, 0x33, 0xf7, 0xe2, 0xca, 0x50, 0x04, 0xdf, 0x7b, 0x76, 0x3e, 0x7d, 0x76, + 0x6e, 0x20, 0xdc, 0x04, 0x6d, 0xe4, 0x4e, 0x87, 0x97, 0x5f, 0x39, 0xfe, 0x95, 0xa1, 0xda, 0x7f, + 0xaa, 0x50, 0x9f, 0xd0, 0x25, 0x19, 0x78, 0x2e, 0x7e, 0x08, 0x8d, 0x7c, 0xe7, 0xb0, 0x26, 0xf3, + 0x5c, 0xc7, 0x7c, 0xdb, 0x6e, 0x89, 0xe3, 0xeb, 0xcb, 0x68, 0x29, 0xf8, 0x14, 0xea, 0xd9, 0xd0, + 0x62, 0x2c, 0x28, 0xe5, 0x0d, 0x6c, 0xef, 0x23, 0x58, 0x0a, 0xfe, 0x14, 0x60, 0xdf, 0x6e, 0xfc, + 0xce, 0xeb, 0xed, 0x4f, 0x3d, 0x4e, 0x0e, 0x4f, 0x85, 0xa5, 0xe0, 0xcf, 0x40, 0x2f, 0x2c, 0x14, + 0x3e, 0xb9, 0xb5, 0x61, 0x69, 0x80, 0x77, 0xef, 0xd8, 0x3c, 0x4b, 0xc1, 0x8f, 0xe1, 0xa8, 0xd8, + 0x73, 0x2c, 0xa9, 0x07, 0xa6, 0xa0, 0x9c, 0xf6, 0xc7, 0xd0, 0x2c, 0x35, 0x17, 0x9b, 0x59, 0x8a, + 0xff, 0xe2, 0xd7, 0x83, 0x8a, 0x67, 0x7b, 0x78, 0xf7, 0xbd, 0x67, 0x9c, 0xb7, 0x76, 0x76, 0x9e, + 0xd7, 0xb9, 0xf9, 0xfb, 0x75, 0x07, 0xbd, 0xbc, 0xee, 0xa0, 0x3f, 0xae, 0x3b, 0xe8, 0xe7, 0x9b, + 0x8e, 0xf2, 0xf2, 0xa6, 0xa3, 0xbc, 0xba, 0xe9, 0x28, 0xf3, 0x9a, 0xfc, 0x71, 0x3f, 0xfc, 0x3b, + 0x00, 0x00, 0xff, 0xff, 0x55, 0x43, 0x53, 0xb9, 0xc0, 0x07, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -2692,231 +1708,6 @@ func encodeVarintNode(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedP2PRequest(r randyNode, easy bool) *P2PRequest { - this := &P2PRequest{} - this.RequestType = P2PREQTYPE([]int32{0, 1, 2, 3}[r.Intn(4)]) - this.All = bool(bool(r.Intn(2) == 0)) - this.Verbose = bool(bool(r.Intn(2) == 0)) - this.ProtocolName = string(randStringNode(r)) - this.ListenAddress = string(randStringNode(r)) - this.TargetAddress = string(randStringNode(r)) - this.RemoteAddress = string(randStringNode(r)) - this.AllowCustomProtocols = bool(bool(r.Intn(2) == 0)) - this.ReportPeerID = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedP2PResponse(r randyNode, easy bool) *P2PResponse { - this := &P2PResponse{} - this.RequestType = P2PREQTYPE([]int32{0, 1, 2, 3}[r.Intn(4)]) - v1 := r.Intn(10) - this.Names = make([]string, v1) - for i := 0; i < v1; i++ { - this.Names[i] = string(randStringNode(r)) - } - this.ConnsClosed = int32(r.Int31()) - if r.Intn(2) == 0 { - this.ConnsClosed *= -1 - } - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.StreamInfos = make([]*P2PLsInfo, v2) - for i := 0; i < v2; i++ { - this.StreamInfos[i] = NewPopulatedP2PLsInfo(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedP2PLsInfo(r randyNode, easy bool) *P2PLsInfo { - this := &P2PLsInfo{} - this.ProtocolName = string(randStringNode(r)) - this.ListenAddress = string(randStringNode(r)) - this.TargetAddress = string(randStringNode(r)) - this.Local = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedGetPeersResponse(r randyNode, easy bool) *GetPeersResponse { - this := &GetPeersResponse{} - v3 := r.Intn(10) - this.PeerIDs = make([]string, v3) - for i := 0; i < v3; i++ { - this.PeerIDs[i] = string(randStringNode(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedConnectRequest(r randyNode, easy bool) *ConnectRequest { - this := &ConnectRequest{} - v4 := r.Intn(10) - this.MultiAddrs = make([]string, v4) - for i := 0; i < v4; i++ { - this.MultiAddrs[i] = string(randStringNode(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedIsConnectedRequest(r randyNode, easy bool) *IsConnectedRequest { - this := &IsConnectedRequest{} - v5 := r.Intn(10) - this.PeerIDs = make([]string, v5) - for i := 0; i < v5; i++ { - this.PeerIDs[i] = string(randStringNode(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedIsConnectedResponse(r randyNode, easy bool) *IsConnectedResponse { - this := &IsConnectedResponse{} - if r.Intn(5) != 0 { - v6 := r.Intn(10) - this.Connected = make(map[string]bool) - for i := 0; i < v6; i++ { - v7 := randStringNode(r) - this.Connected[v7] = bool(bool(r.Intn(2) == 0)) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDisconnectRequest(r randyNode, easy bool) *DisconnectRequest { - this := &DisconnectRequest{} - v8 := r.Intn(10) - this.PeerIDs = make([]string, v8) - for i := 0; i < v8; i++ { - this.PeerIDs[i] = string(randStringNode(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDisconnectResponse(r randyNode, easy bool) *DisconnectResponse { - this := &DisconnectResponse{} - if r.Intn(5) != 0 { - v9 := r.Intn(10) - this.Status = make(map[string]*DisconnectResponse_StatusMessage) - for i := 0; i < v9; i++ { - this.Status[randStringNode(r)] = NewPopulatedDisconnectResponse_StatusMessage(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDisconnectResponse_StatusMessage(r randyNode, easy bool) *DisconnectResponse_StatusMessage { - this := &DisconnectResponse_StatusMessage{} - this.Disconnected = bool(bool(r.Intn(2) == 0)) - this.Reason = string(randStringNode(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedEnableExtrasRequest(r randyNode, easy bool) *EnableExtrasRequest { - this := &EnableExtrasRequest{} - this.ExtrasFeature = EXTRASTYPE([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedDisableExtrasRequest(r randyNode, easy bool) *DisableExtrasRequest { - this := &DisableExtrasRequest{} - this.ExtrasFeature = EXTRASTYPE([]int32{0, 1, 2}[r.Intn(3)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyNode interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneNode(r randyNode) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringNode(r randyNode) string { - v10 := r.Intn(100) - tmps := make([]rune, v10) - for i := 0; i < v10; i++ { - tmps[i] = randUTF8RuneNode(r) - } - return string(tmps) -} -func randUnrecognizedNode(r randyNode, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldNode(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldNode(dAtA []byte, r randyNode, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - v11 := r.Int63() - if r.Intn(2) == 0 { - v11 *= -1 - } - dAtA = encodeVarintPopulateNode(dAtA, uint64(v11)) - case 1: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateNode(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateNode(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateNode(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *P2PRequest) Size() (n int) { if m == nil { return 0 @@ -3153,174 +1944,6 @@ func sovNode(x uint64) (n int) { func sozNode(x uint64) (n int) { return sovNode(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *P2PRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&P2PRequest{`, - `RequestType:` + fmt.Sprintf("%v", this.RequestType) + `,`, - `All:` + fmt.Sprintf("%v", this.All) + `,`, - `Verbose:` + fmt.Sprintf("%v", this.Verbose) + `,`, - `ProtocolName:` + fmt.Sprintf("%v", this.ProtocolName) + `,`, - `ListenAddress:` + fmt.Sprintf("%v", this.ListenAddress) + `,`, - `TargetAddress:` + fmt.Sprintf("%v", this.TargetAddress) + `,`, - `RemoteAddress:` + fmt.Sprintf("%v", this.RemoteAddress) + `,`, - `AllowCustomProtocols:` + fmt.Sprintf("%v", this.AllowCustomProtocols) + `,`, - `ReportPeerID:` + fmt.Sprintf("%v", this.ReportPeerID) + `,`, - `}`, - }, "") - return s -} -func (this *P2PResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForStreamInfos := "[]*P2PLsInfo{" - for _, f := range this.StreamInfos { - repeatedStringForStreamInfos += strings.Replace(f.String(), "P2PLsInfo", "P2PLsInfo", 1) + "," - } - repeatedStringForStreamInfos += "}" - s := strings.Join([]string{`&P2PResponse{`, - `RequestType:` + fmt.Sprintf("%v", this.RequestType) + `,`, - `Names:` + fmt.Sprintf("%v", this.Names) + `,`, - `ConnsClosed:` + fmt.Sprintf("%v", this.ConnsClosed) + `,`, - `StreamInfos:` + repeatedStringForStreamInfos + `,`, - `}`, - }, "") - return s -} -func (this *P2PLsInfo) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&P2PLsInfo{`, - `ProtocolName:` + fmt.Sprintf("%v", this.ProtocolName) + `,`, - `ListenAddress:` + fmt.Sprintf("%v", this.ListenAddress) + `,`, - `TargetAddress:` + fmt.Sprintf("%v", this.TargetAddress) + `,`, - `Local:` + fmt.Sprintf("%v", this.Local) + `,`, - `}`, - }, "") - return s -} -func (this *GetPeersResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&GetPeersResponse{`, - `PeerIDs:` + fmt.Sprintf("%v", this.PeerIDs) + `,`, - `}`, - }, "") - return s -} -func (this *ConnectRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&ConnectRequest{`, - `MultiAddrs:` + fmt.Sprintf("%v", this.MultiAddrs) + `,`, - `}`, - }, "") - return s -} -func (this *IsConnectedRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&IsConnectedRequest{`, - `PeerIDs:` + fmt.Sprintf("%v", this.PeerIDs) + `,`, - `}`, - }, "") - return s -} -func (this *IsConnectedResponse) String() string { - if this == nil { - return "nil" - } - keysForConnected := make([]string, 0, len(this.Connected)) - for k := range this.Connected { - keysForConnected = append(keysForConnected, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForConnected) - mapStringForConnected := "map[string]bool{" - for _, k := range keysForConnected { - mapStringForConnected += fmt.Sprintf("%v: %v,", k, this.Connected[k]) - } - mapStringForConnected += "}" - s := strings.Join([]string{`&IsConnectedResponse{`, - `Connected:` + mapStringForConnected + `,`, - `}`, - }, "") - return s -} -func (this *DisconnectRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DisconnectRequest{`, - `PeerIDs:` + fmt.Sprintf("%v", this.PeerIDs) + `,`, - `}`, - }, "") - return s -} -func (this *DisconnectResponse) String() string { - if this == nil { - return "nil" - } - keysForStatus := make([]string, 0, len(this.Status)) - for k := range this.Status { - keysForStatus = append(keysForStatus, k) - } - github_com_gogo_protobuf_sortkeys.Strings(keysForStatus) - mapStringForStatus := "map[string]*DisconnectResponse_StatusMessage{" - for _, k := range keysForStatus { - mapStringForStatus += fmt.Sprintf("%v: %v,", k, this.Status[k]) - } - mapStringForStatus += "}" - s := strings.Join([]string{`&DisconnectResponse{`, - `Status:` + mapStringForStatus + `,`, - `}`, - }, "") - return s -} -func (this *DisconnectResponse_StatusMessage) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DisconnectResponse_StatusMessage{`, - `Disconnected:` + fmt.Sprintf("%v", this.Disconnected) + `,`, - `Reason:` + fmt.Sprintf("%v", this.Reason) + `,`, - `}`, - }, "") - return s -} -func (this *EnableExtrasRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&EnableExtrasRequest{`, - `ExtrasFeature:` + fmt.Sprintf("%v", this.ExtrasFeature) + `,`, - `}`, - }, "") - return s -} -func (this *DisableExtrasRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&DisableExtrasRequest{`, - `ExtrasFeature:` + fmt.Sprintf("%v", this.ExtrasFeature) + `,`, - `}`, - }, "") - return s -} -func valueToStringNode(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *P2PRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/nodepb_test.go b/go/nodepb_test.go deleted file mode 100644 index 4af6b88..0000000 --- a/go/nodepb_test.go +++ /dev/null @@ -1,2138 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: node.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestP2PRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestP2PRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestP2PResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PLsInfoProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PLsInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestP2PLsInfoMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PLsInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetPeersResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestGetPeersResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestConnectRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ConnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestConnectRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ConnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIsConnectedRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestIsConnectedResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDisconnectRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDisconnectResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponse_StatusMessageProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse_StatusMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDisconnectResponse_StatusMessageMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse_StatusMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEnableExtrasRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EnableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEnableExtrasRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EnableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisableExtrasRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestDisableExtrasRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestP2PResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestP2PLsInfoJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &P2PLsInfo{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestGetPeersResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &GetPeersResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestConnectRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &ConnectRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIsConnectedRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestIsConnectedResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &IsConnectedResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDisconnectRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDisconnectResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDisconnectResponse_StatusMessageJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisconnectResponse_StatusMessage{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEnableExtrasRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &EnableExtrasRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestDisableExtrasRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &DisableExtrasRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestP2PRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &P2PRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &P2PRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &P2PResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &P2PResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PLsInfoProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &P2PLsInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PLsInfoProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &P2PLsInfo{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetPeersResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &GetPeersResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestGetPeersResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &GetPeersResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestConnectRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &ConnectRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestConnectRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &ConnectRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IsConnectedRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IsConnectedRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &IsConnectedResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestIsConnectedResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &IsConnectedResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DisconnectRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DisconnectRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DisconnectResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DisconnectResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponse_StatusMessageProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DisconnectResponse_StatusMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisconnectResponse_StatusMessageProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DisconnectResponse_StatusMessage{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEnableExtrasRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &EnableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEnableExtrasRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &EnableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisableExtrasRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &DisableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestDisableExtrasRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &DisableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestP2PRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &P2PRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestP2PResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &P2PResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestP2PLsInfoVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PLsInfo(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &P2PLsInfo{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestGetPeersResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetPeersResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &GetPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestConnectRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedConnectRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &ConnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIsConnectedRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IsConnectedRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestIsConnectedResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &IsConnectedResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDisconnectRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DisconnectRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDisconnectResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DisconnectResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDisconnectResponse_StatusMessageVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DisconnectResponse_StatusMessage{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestEnableExtrasRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnableExtrasRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &EnableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestDisableExtrasRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisableExtrasRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &DisableExtrasRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestP2PRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestP2PResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestP2PLsInfoGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PLsInfo(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestGetPeersResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetPeersResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestConnectRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedConnectRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestIsConnectedRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestIsConnectedResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDisconnectRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDisconnectResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDisconnectResponse_StatusMessageGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestEnableExtrasRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnableExtrasRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestDisableExtrasRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisableExtrasRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestP2PRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestP2PResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestP2PLsInfoSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedP2PLsInfo(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestGetPeersResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedGetPeersResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestConnectRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedConnectRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestIsConnectedRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestIsConnectedResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedIsConnectedResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDisconnectRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDisconnectResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDisconnectResponse_StatusMessageSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestEnableExtrasRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEnableExtrasRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestDisableExtrasRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedDisableExtrasRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestP2PRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestP2PResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestP2PLsInfoStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedP2PLsInfo(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestGetPeersResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedGetPeersResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestConnectRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedConnectRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIsConnectedRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestIsConnectedResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedIsConnectedResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDisconnectRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDisconnectResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDisconnectResponse_StatusMessageStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisconnectResponse_StatusMessage(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestEnableExtrasRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEnableExtrasRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestDisableExtrasRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedDisableExtrasRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/pubsub.pb.go b/go/pubsub.pb.go index 90da6c4..4f1a1fd 100644 --- a/go/pubsub.pb.go +++ b/go/pubsub.pb.go @@ -4,16 +4,12 @@ package pb import ( - bytes "bytes" context "context" fmt "fmt" io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -39,8 +35,9 @@ type PubSubListPeersRequest struct { Topics []string `protobuf:"bytes,1,rep,name=topics,proto3" json:"topics,omitempty"` } -func (m *PubSubListPeersRequest) Reset() { *m = PubSubListPeersRequest{} } -func (*PubSubListPeersRequest) ProtoMessage() {} +func (m *PubSubListPeersRequest) Reset() { *m = PubSubListPeersRequest{} } +func (m *PubSubListPeersRequest) String() string { return proto.CompactTextString(m) } +func (*PubSubListPeersRequest) ProtoMessage() {} func (*PubSubListPeersRequest) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{0} } @@ -83,8 +80,9 @@ type PubSubListPeersResponse struct { Peers []*PubSubListPeersResponse_Peer `protobuf:"bytes,1,rep,name=peers,proto3" json:"peers,omitempty"` } -func (m *PubSubListPeersResponse) Reset() { *m = PubSubListPeersResponse{} } -func (*PubSubListPeersResponse) ProtoMessage() {} +func (m *PubSubListPeersResponse) Reset() { *m = PubSubListPeersResponse{} } +func (m *PubSubListPeersResponse) String() string { return proto.CompactTextString(m) } +func (*PubSubListPeersResponse) ProtoMessage() {} func (*PubSubListPeersResponse) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{1} } @@ -130,8 +128,9 @@ type PubSubListPeersResponse_Peer struct { PeerID string `protobuf:"bytes,2,opt,name=peerID,proto3" json:"peerID,omitempty"` } -func (m *PubSubListPeersResponse_Peer) Reset() { *m = PubSubListPeersResponse_Peer{} } -func (*PubSubListPeersResponse_Peer) ProtoMessage() {} +func (m *PubSubListPeersResponse_Peer) Reset() { *m = PubSubListPeersResponse_Peer{} } +func (m *PubSubListPeersResponse_Peer) String() string { return proto.CompactTextString(m) } +func (*PubSubListPeersResponse_Peer) ProtoMessage() {} func (*PubSubListPeersResponse_Peer) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{1, 0} } @@ -186,8 +185,9 @@ type PubSubPublishRequest struct { Advertise bool `protobuf:"varint,3,opt,name=advertise,proto3" json:"advertise,omitempty"` } -func (m *PubSubPublishRequest) Reset() { *m = PubSubPublishRequest{} } -func (*PubSubPublishRequest) ProtoMessage() {} +func (m *PubSubPublishRequest) Reset() { *m = PubSubPublishRequest{} } +func (m *PubSubPublishRequest) String() string { return proto.CompactTextString(m) } +func (*PubSubPublishRequest) ProtoMessage() {} func (*PubSubPublishRequest) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{2} } @@ -249,8 +249,9 @@ type PubSubSubscribeRequest struct { Discover bool `protobuf:"varint,2,opt,name=discover,proto3" json:"discover,omitempty"` } -func (m *PubSubSubscribeRequest) Reset() { *m = PubSubSubscribeRequest{} } -func (*PubSubSubscribeRequest) ProtoMessage() {} +func (m *PubSubSubscribeRequest) Reset() { *m = PubSubSubscribeRequest{} } +func (m *PubSubSubscribeRequest) String() string { return proto.CompactTextString(m) } +func (*PubSubSubscribeRequest) ProtoMessage() {} func (*PubSubSubscribeRequest) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{3} } @@ -302,8 +303,9 @@ type PubSubTopicsResponse struct { Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` } -func (m *PubSubTopicsResponse) Reset() { *m = PubSubTopicsResponse{} } -func (*PubSubTopicsResponse) ProtoMessage() {} +func (m *PubSubTopicsResponse) Reset() { *m = PubSubTopicsResponse{} } +func (m *PubSubTopicsResponse) String() string { return proto.CompactTextString(m) } +func (*PubSubTopicsResponse) ProtoMessage() {} func (*PubSubTopicsResponse) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{4} } @@ -358,8 +360,9 @@ type PubSubMessageResponse struct { Key []byte `protobuf:"bytes,6,opt,name=key,proto3" json:"key,omitempty"` } -func (m *PubSubMessageResponse) Reset() { *m = PubSubMessageResponse{} } -func (*PubSubMessageResponse) ProtoMessage() {} +func (m *PubSubMessageResponse) Reset() { *m = PubSubMessageResponse{} } +func (m *PubSubMessageResponse) String() string { return proto.CompactTextString(m) } +func (*PubSubMessageResponse) ProtoMessage() {} func (*PubSubMessageResponse) Descriptor() ([]byte, []int) { return fileDescriptor_91df006b05e20cf7, []int{5} } @@ -445,602 +448,36 @@ func init() { func init() { proto.RegisterFile("pubsub.proto", fileDescriptor_91df006b05e20cf7) } var fileDescriptor_91df006b05e20cf7 = []byte{ - // 519 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x93, 0x3f, 0x6f, 0xd3, 0x4e, - 0x18, 0xc7, 0x7d, 0xf9, 0xa7, 0xe4, 0xf9, 0xe5, 0x27, 0xd0, 0x29, 0x14, 0x63, 0xd0, 0x29, 0xf2, - 0x94, 0x01, 0xd2, 0xaa, 0x54, 0xa8, 0x2b, 0xa8, 0x08, 0x05, 0x15, 0x29, 0x72, 0x99, 0x91, 0x7c, - 0xc9, 0xd5, 0xb5, 0x68, 0x72, 0xae, 0xef, 0xae, 0x52, 0x37, 0x36, 0x56, 0x76, 0x26, 0x36, 0x5e, - 0x02, 0x2f, 0x81, 0xb1, 0x63, 0xc7, 0xc6, 0x79, 0x03, 0x8c, 0x8c, 0xc8, 0xcf, 0xd5, 0x76, 0x52, - 0x42, 0xb7, 0xe7, 0xf3, 0xf8, 0xf9, 0xfb, 0xbd, 0xc7, 0xd0, 0x4d, 0x0c, 0x57, 0x86, 0x0f, 0x93, - 0x54, 0x6a, 0x49, 0x6b, 0x09, 0xf7, 0xc0, 0xe8, 0xf8, 0xd4, 0xb2, 0xf7, 0x2c, 0x8a, 0xf5, 0x89, - 0xe1, 0xc3, 0x89, 0x9c, 0x6d, 0x47, 0x32, 0x92, 0xdb, 0xe8, 0xe6, 0xe6, 0x18, 0x09, 0x01, 0x2d, - 0x1b, 0xee, 0xef, 0xc0, 0xd6, 0xd8, 0xf0, 0x23, 0xc3, 0x0f, 0x63, 0xa5, 0xc7, 0x42, 0xa4, 0x2a, - 0x10, 0x67, 0x46, 0x28, 0x4d, 0xb7, 0xa0, 0xa5, 0x65, 0x12, 0x4f, 0x94, 0x4b, 0xfa, 0xf5, 0x41, - 0x27, 0xb8, 0x21, 0xff, 0x33, 0x81, 0x87, 0x7f, 0xa5, 0xa8, 0x44, 0xce, 0x95, 0xa0, 0x2f, 0xa0, - 0x99, 0xe4, 0x0e, 0x4c, 0xf9, 0x6f, 0xb7, 0x3f, 0x4c, 0xf8, 0xf0, 0x1f, 0xb1, 0xc3, 0x9c, 0x02, - 0x1b, 0xee, 0xed, 0x41, 0x23, 0x47, 0xda, 0x83, 0x26, 0x76, 0x71, 0x49, 0x9f, 0x0c, 0x3a, 0x81, - 0x85, 0x7c, 0x92, 0x3c, 0x6c, 0x74, 0xe0, 0xd6, 0xd0, 0x7d, 0x43, 0xfe, 0x07, 0xe8, 0xd9, 0xe2, - 0x63, 0xc3, 0x4f, 0x63, 0x75, 0x52, 0x4c, 0xbe, 0xb9, 0x0a, 0x85, 0xc6, 0x34, 0xd4, 0x21, 0xd6, - 0xe8, 0x06, 0x68, 0xd3, 0x27, 0xd0, 0x09, 0xa7, 0xe7, 0x22, 0xd5, 0xb1, 0x12, 0x6e, 0xbd, 0x4f, - 0x06, 0xed, 0xa0, 0x72, 0xf8, 0x6f, 0x0b, 0x6d, 0x8e, 0x0c, 0x57, 0x93, 0x34, 0xe6, 0xe2, 0xee, - 0x0e, 0x1e, 0xb4, 0xa7, 0xb1, 0x9a, 0xc8, 0x73, 0x91, 0x62, 0x97, 0x76, 0x50, 0xb2, 0xff, 0xb4, - 0x98, 0xf5, 0x3d, 0xaa, 0x58, 0x2a, 0xd6, 0x83, 0xe6, 0x3c, 0x9c, 0x89, 0x42, 0x64, 0x0b, 0xfe, - 0x37, 0x02, 0x0f, 0x6c, 0xf8, 0x3b, 0xa1, 0x54, 0x18, 0x89, 0x32, 0x9e, 0x42, 0xe3, 0x38, 0x95, - 0x33, 0x6c, 0xdc, 0x0d, 0xd0, 0xde, 0xb8, 0x59, 0x0f, 0x9a, 0x4a, 0x9c, 0xcd, 0x25, 0x6e, 0xd5, - 0x0d, 0x2c, 0xe4, 0x13, 0xe2, 0xa8, 0xa3, 0x03, 0xe5, 0x36, 0xb0, 0x61, 0xc9, 0xb9, 0x16, 0x2a, - 0x8e, 0xe6, 0xa1, 0x36, 0xa9, 0x70, 0x9b, 0x98, 0x55, 0x39, 0xe8, 0x7d, 0xa8, 0x7f, 0x14, 0x17, - 0x6e, 0x0b, 0xfd, 0xb9, 0xb9, 0xfb, 0xb5, 0x06, 0x1d, 0x3b, 0xe3, 0xcb, 0xf1, 0x88, 0xee, 0xc3, - 0x3d, 0x0b, 0x6f, 0x84, 0xb6, 0x2b, 0xd2, 0x4e, 0xfe, 0xfa, 0xaf, 0x67, 0x89, 0xbe, 0xf0, 0xdc, - 0xea, 0x10, 0xd6, 0xf7, 0xf7, 0x1d, 0x7a, 0x58, 0x64, 0x96, 0x27, 0x42, 0xbd, 0x8d, 0x77, 0x83, - 0xd2, 0x7b, 0x8f, 0xef, 0xb8, 0xa9, 0xd5, 0x6a, 0xe5, 0x9b, 0xad, 0x56, 0xbb, 0xfd, 0x90, 0xde, - 0xa3, 0xea, 0xdb, 0x2d, 0xa5, 0x7d, 0x67, 0x87, 0xd0, 0x7d, 0xf8, 0x7f, 0xed, 0xc2, 0xe8, 0xca, - 0x22, 0xeb, 0x47, 0xe7, 0x55, 0xdb, 0xfa, 0xce, 0x80, 0xbc, 0xda, 0xbb, 0x5a, 0x30, 0xe7, 0x7a, - 0xc1, 0xc8, 0xaf, 0x05, 0x23, 0xbf, 0x17, 0x8c, 0x7c, 0xca, 0x18, 0xf9, 0x9e, 0x31, 0xf2, 0x23, - 0x63, 0xe4, 0x67, 0xc6, 0xc8, 0x65, 0xc6, 0xc8, 0x75, 0xc6, 0xc8, 0x97, 0x25, 0x73, 0x2e, 0x97, - 0xcc, 0xb9, 0x5a, 0x32, 0x87, 0xb7, 0xf0, 0xa7, 0x7c, 0xfe, 0x27, 0x00, 0x00, 0xff, 0xff, 0xcb, - 0x2a, 0xee, 0xa5, 0xe3, 0x03, 0x00, 0x00, -} - -func (this *PubSubListPeersRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubListPeersRequest) - if !ok { - that2, ok := that.(PubSubListPeersRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubListPeersRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubListPeersRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubListPeersRequest but is not nil && this == nil") - } - if len(this.Topics) != len(that1.Topics) { - return fmt.Errorf("Topics this(%v) Not Equal that(%v)", len(this.Topics), len(that1.Topics)) - } - for i := range this.Topics { - if this.Topics[i] != that1.Topics[i] { - return fmt.Errorf("Topics this[%v](%v) Not Equal that[%v](%v)", i, this.Topics[i], i, that1.Topics[i]) - } - } - return nil -} -func (this *PubSubListPeersRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubListPeersRequest) - if !ok { - that2, ok := that.(PubSubListPeersRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Topics) != len(that1.Topics) { - return false - } - for i := range this.Topics { - if this.Topics[i] != that1.Topics[i] { - return false - } - } - return true -} -func (this *PubSubListPeersResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubListPeersResponse) - if !ok { - that2, ok := that.(PubSubListPeersResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubListPeersResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubListPeersResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubListPeersResponse but is not nil && this == nil") - } - if len(this.Peers) != len(that1.Peers) { - return fmt.Errorf("Peers this(%v) Not Equal that(%v)", len(this.Peers), len(that1.Peers)) - } - for i := range this.Peers { - if !this.Peers[i].Equal(that1.Peers[i]) { - return fmt.Errorf("Peers this[%v](%v) Not Equal that[%v](%v)", i, this.Peers[i], i, that1.Peers[i]) - } - } - return nil -} -func (this *PubSubListPeersResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubListPeersResponse) - if !ok { - that2, ok := that.(PubSubListPeersResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Peers) != len(that1.Peers) { - return false - } - for i := range this.Peers { - if !this.Peers[i].Equal(that1.Peers[i]) { - return false - } - } - return true -} -func (this *PubSubListPeersResponse_Peer) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubListPeersResponse_Peer) - if !ok { - that2, ok := that.(PubSubListPeersResponse_Peer) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubListPeersResponse_Peer") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubListPeersResponse_Peer but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubListPeersResponse_Peer but is not nil && this == nil") - } - if this.Topic != that1.Topic { - return fmt.Errorf("Topic this(%v) Not Equal that(%v)", this.Topic, that1.Topic) - } - if this.PeerID != that1.PeerID { - return fmt.Errorf("PeerID this(%v) Not Equal that(%v)", this.PeerID, that1.PeerID) - } - return nil -} -func (this *PubSubListPeersResponse_Peer) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubListPeersResponse_Peer) - if !ok { - that2, ok := that.(PubSubListPeersResponse_Peer) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Topic != that1.Topic { - return false - } - if this.PeerID != that1.PeerID { - return false - } - return true -} -func (this *PubSubPublishRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubPublishRequest) - if !ok { - that2, ok := that.(PubSubPublishRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubPublishRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubPublishRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubPublishRequest but is not nil && this == nil") - } - if this.Topic != that1.Topic { - return fmt.Errorf("Topic this(%v) Not Equal that(%v)", this.Topic, that1.Topic) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if this.Advertise != that1.Advertise { - return fmt.Errorf("Advertise this(%v) Not Equal that(%v)", this.Advertise, that1.Advertise) - } - return nil -} -func (this *PubSubPublishRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubPublishRequest) - if !ok { - that2, ok := that.(PubSubPublishRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Topic != that1.Topic { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if this.Advertise != that1.Advertise { - return false - } - return true -} -func (this *PubSubSubscribeRequest) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubSubscribeRequest) - if !ok { - that2, ok := that.(PubSubSubscribeRequest) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubSubscribeRequest") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubSubscribeRequest but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubSubscribeRequest but is not nil && this == nil") - } - if this.Topic != that1.Topic { - return fmt.Errorf("Topic this(%v) Not Equal that(%v)", this.Topic, that1.Topic) - } - if this.Discover != that1.Discover { - return fmt.Errorf("Discover this(%v) Not Equal that(%v)", this.Discover, that1.Discover) - } - return nil -} -func (this *PubSubSubscribeRequest) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubSubscribeRequest) - if !ok { - that2, ok := that.(PubSubSubscribeRequest) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Topic != that1.Topic { - return false - } - if this.Discover != that1.Discover { - return false - } - return true -} -func (this *PubSubTopicsResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubTopicsResponse) - if !ok { - that2, ok := that.(PubSubTopicsResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubTopicsResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubTopicsResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubTopicsResponse but is not nil && this == nil") - } - if len(this.Names) != len(that1.Names) { - return fmt.Errorf("Names this(%v) Not Equal that(%v)", len(this.Names), len(that1.Names)) - } - for i := range this.Names { - if this.Names[i] != that1.Names[i] { - return fmt.Errorf("Names this[%v](%v) Not Equal that[%v](%v)", i, this.Names[i], i, that1.Names[i]) - } - } - return nil -} -func (this *PubSubTopicsResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubTopicsResponse) - if !ok { - that2, ok := that.(PubSubTopicsResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if len(this.Names) != len(that1.Names) { - return false - } - for i := range this.Names { - if this.Names[i] != that1.Names[i] { - return false - } - } - return true -} -func (this *PubSubMessageResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PubSubMessageResponse) - if !ok { - that2, ok := that.(PubSubMessageResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PubSubMessageResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PubSubMessageResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PubSubMessageResponse but is not nil && this == nil") - } - if !bytes.Equal(this.From, that1.From) { - return fmt.Errorf("From this(%v) Not Equal that(%v)", this.From, that1.From) - } - if !bytes.Equal(this.Data, that1.Data) { - return fmt.Errorf("Data this(%v) Not Equal that(%v)", this.Data, that1.Data) - } - if !bytes.Equal(this.Seqno, that1.Seqno) { - return fmt.Errorf("Seqno this(%v) Not Equal that(%v)", this.Seqno, that1.Seqno) - } - if len(this.TopicIDs) != len(that1.TopicIDs) { - return fmt.Errorf("TopicIDs this(%v) Not Equal that(%v)", len(this.TopicIDs), len(that1.TopicIDs)) - } - for i := range this.TopicIDs { - if this.TopicIDs[i] != that1.TopicIDs[i] { - return fmt.Errorf("TopicIDs this[%v](%v) Not Equal that[%v](%v)", i, this.TopicIDs[i], i, that1.TopicIDs[i]) - } - } - if !bytes.Equal(this.Signature, that1.Signature) { - return fmt.Errorf("Signature this(%v) Not Equal that(%v)", this.Signature, that1.Signature) - } - if !bytes.Equal(this.Key, that1.Key) { - return fmt.Errorf("Key this(%v) Not Equal that(%v)", this.Key, that1.Key) - } - return nil -} -func (this *PubSubMessageResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PubSubMessageResponse) - if !ok { - that2, ok := that.(PubSubMessageResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if !bytes.Equal(this.From, that1.From) { - return false - } - if !bytes.Equal(this.Data, that1.Data) { - return false - } - if !bytes.Equal(this.Seqno, that1.Seqno) { - return false - } - if len(this.TopicIDs) != len(that1.TopicIDs) { - return false - } - for i := range this.TopicIDs { - if this.TopicIDs[i] != that1.TopicIDs[i] { - return false - } - } - if !bytes.Equal(this.Signature, that1.Signature) { - return false - } - if !bytes.Equal(this.Key, that1.Key) { - return false - } - return true -} -func (this *PubSubListPeersRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.PubSubListPeersRequest{") - s = append(s, "Topics: "+fmt.Sprintf("%#v", this.Topics)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubListPeersResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.PubSubListPeersResponse{") - if this.Peers != nil { - s = append(s, "Peers: "+fmt.Sprintf("%#v", this.Peers)+",\n") - } - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubListPeersResponse_Peer) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.PubSubListPeersResponse_Peer{") - s = append(s, "Topic: "+fmt.Sprintf("%#v", this.Topic)+",\n") - s = append(s, "PeerID: "+fmt.Sprintf("%#v", this.PeerID)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubPublishRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 7) - s = append(s, "&pb.PubSubPublishRequest{") - s = append(s, "Topic: "+fmt.Sprintf("%#v", this.Topic)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "Advertise: "+fmt.Sprintf("%#v", this.Advertise)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubSubscribeRequest) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.PubSubSubscribeRequest{") - s = append(s, "Topic: "+fmt.Sprintf("%#v", this.Topic)+",\n") - s = append(s, "Discover: "+fmt.Sprintf("%#v", this.Discover)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubTopicsResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.PubSubTopicsResponse{") - s = append(s, "Names: "+fmt.Sprintf("%#v", this.Names)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *PubSubMessageResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 10) - s = append(s, "&pb.PubSubMessageResponse{") - s = append(s, "From: "+fmt.Sprintf("%#v", this.From)+",\n") - s = append(s, "Data: "+fmt.Sprintf("%#v", this.Data)+",\n") - s = append(s, "Seqno: "+fmt.Sprintf("%#v", this.Seqno)+",\n") - s = append(s, "TopicIDs: "+fmt.Sprintf("%#v", this.TopicIDs)+",\n") - s = append(s, "Signature: "+fmt.Sprintf("%#v", this.Signature)+",\n") - s = append(s, "Key: "+fmt.Sprintf("%#v", this.Key)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringPubsub(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 464 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x53, 0xcf, 0x6f, 0xd3, 0x30, + 0x14, 0x8e, 0xdb, 0xa6, 0x6a, 0x1e, 0x45, 0x20, 0xab, 0x0c, 0x13, 0x50, 0x54, 0xf9, 0xd4, 0x03, + 0xaa, 0xa6, 0x81, 0xd0, 0xae, 0xa0, 0x21, 0x54, 0x34, 0xa4, 0xca, 0xe3, 0x8c, 0x14, 0xb7, 0x66, + 0x44, 0xac, 0x4d, 0x16, 0xdb, 0x93, 0xf6, 0x17, 0x70, 0xe5, 0xce, 0x89, 0xff, 0x86, 0xe3, 0x8e, + 0x1c, 0x51, 0xfb, 0x8f, 0x20, 0x3f, 0x2f, 0x49, 0x3b, 0x4a, 0x6f, 0xfe, 0x5e, 0xde, 0xaf, 0xef, + 0x7b, 0x5f, 0xa0, 0x5f, 0x58, 0xa9, 0xad, 0x1c, 0x17, 0x65, 0x6e, 0x72, 0xda, 0x2a, 0x64, 0x0c, + 0xd6, 0x64, 0x17, 0x1e, 0xf3, 0x43, 0x38, 0x98, 0x5a, 0x79, 0x66, 0xe5, 0x69, 0xa6, 0xcd, 0x54, + 0xa9, 0x52, 0x0b, 0x75, 0x69, 0x95, 0x36, 0xf4, 0x00, 0xba, 0x26, 0x2f, 0xb2, 0x99, 0x66, 0x64, + 0xd8, 0x1e, 0x45, 0xe2, 0x16, 0xf1, 0x6f, 0x04, 0x1e, 0xff, 0x53, 0xa2, 0x8b, 0x7c, 0xa9, 0x15, + 0x7d, 0x05, 0x61, 0xe1, 0x02, 0x58, 0x72, 0xef, 0x68, 0x38, 0x2e, 0xe4, 0xf8, 0x3f, 0xb9, 0x63, + 0x87, 0x84, 0x4f, 0x8f, 0x5f, 0x42, 0xc7, 0x41, 0x3a, 0x80, 0x10, 0xa7, 0x30, 0x32, 0x24, 0xa3, + 0x48, 0x78, 0xe0, 0x36, 0x71, 0x69, 0x93, 0x13, 0xd6, 0xc2, 0xf0, 0x2d, 0xe2, 0x9f, 0x60, 0xe0, + 0x9b, 0x4f, 0xad, 0xbc, 0xc8, 0xf4, 0x97, 0x6a, 0xf3, 0xdd, 0x5d, 0x28, 0x74, 0xe6, 0xa9, 0x49, + 0xb1, 0x47, 0x5f, 0xe0, 0x9b, 0x3e, 0x83, 0x28, 0x9d, 0x5f, 0xa9, 0xd2, 0x64, 0x5a, 0xb1, 0xf6, + 0x90, 0x8c, 0x7a, 0xa2, 0x09, 0xf0, 0xf7, 0x95, 0x36, 0x67, 0x56, 0xea, 0x59, 0x99, 0x49, 0xb5, + 0x7f, 0x42, 0x0c, 0xbd, 0x79, 0xa6, 0x67, 0xf9, 0x95, 0x2a, 0x71, 0x4a, 0x4f, 0xd4, 0x98, 0x3f, + 0xaf, 0x76, 0xfd, 0x88, 0x2a, 0xd6, 0x8a, 0x0d, 0x20, 0x5c, 0xa6, 0x0b, 0x55, 0x89, 0xec, 0x01, + 0xff, 0x49, 0xe0, 0x91, 0x4f, 0xff, 0xa0, 0xb4, 0x4e, 0xcf, 0x55, 0x9d, 0x4f, 0xa1, 0xf3, 0xb9, + 0xcc, 0x17, 0x38, 0xb8, 0x2f, 0xf0, 0xbd, 0x93, 0xd9, 0x00, 0x42, 0xad, 0x2e, 0x97, 0x39, 0xb2, + 0xea, 0x0b, 0x0f, 0xdc, 0x86, 0xb8, 0xea, 0xe4, 0x44, 0xb3, 0x0e, 0x0e, 0xac, 0xb1, 0xd3, 0x42, + 0x67, 0xe7, 0xcb, 0xd4, 0xd8, 0x52, 0xb1, 0x10, 0xab, 0x9a, 0x00, 0x7d, 0x08, 0xed, 0xaf, 0xea, + 0x9a, 0x75, 0x31, 0xee, 0x9e, 0x47, 0x3f, 0x5a, 0x10, 0xf9, 0x1d, 0x5f, 0x4f, 0x27, 0xf4, 0x18, + 0x1e, 0x78, 0xf0, 0x4e, 0x19, 0x4f, 0x91, 0x46, 0xee, 0xfa, 0x6f, 0x17, 0x85, 0xb9, 0x8e, 0x59, + 0x63, 0x84, 0x6d, 0xfe, 0x3c, 0xa0, 0xa7, 0x55, 0x65, 0x6d, 0x11, 0x1a, 0xef, 0xf4, 0x0d, 0x4a, + 0x1f, 0x3f, 0xdd, 0xe3, 0xa9, 0xcd, 0x6e, 0xf5, 0xcd, 0x36, 0xbb, 0xdd, 0x3d, 0x64, 0xfc, 0xa4, + 0xf9, 0x76, 0x47, 0x69, 0x1e, 0x1c, 0x12, 0x7a, 0x0c, 0xf7, 0xb7, 0x1c, 0x46, 0x37, 0x88, 0x6c, + 0x9b, 0x2e, 0x6e, 0xd8, 0xf2, 0x60, 0x44, 0xde, 0xb0, 0x5f, 0xab, 0x84, 0xdc, 0xac, 0x12, 0xf2, + 0x67, 0x95, 0x90, 0xef, 0xeb, 0x24, 0xb8, 0x59, 0x27, 0xc1, 0xef, 0x75, 0x12, 0xc8, 0x2e, 0xfe, + 0x78, 0x2f, 0xfe, 0x06, 0x00, 0x00, 0xff, 0xff, 0x5e, 0x01, 0x83, 0x4d, 0x98, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1614,185 +1051,6 @@ func encodeVarintPubsub(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedPubSubListPeersRequest(r randyPubsub, easy bool) *PubSubListPeersRequest { - this := &PubSubListPeersRequest{} - v1 := r.Intn(10) - this.Topics = make([]string, v1) - for i := 0; i < v1; i++ { - this.Topics[i] = string(randStringPubsub(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubListPeersResponse(r randyPubsub, easy bool) *PubSubListPeersResponse { - this := &PubSubListPeersResponse{} - if r.Intn(5) != 0 { - v2 := r.Intn(5) - this.Peers = make([]*PubSubListPeersResponse_Peer, v2) - for i := 0; i < v2; i++ { - this.Peers[i] = NewPopulatedPubSubListPeersResponse_Peer(r, easy) - } - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubListPeersResponse_Peer(r randyPubsub, easy bool) *PubSubListPeersResponse_Peer { - this := &PubSubListPeersResponse_Peer{} - this.Topic = string(randStringPubsub(r)) - this.PeerID = string(randStringPubsub(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubPublishRequest(r randyPubsub, easy bool) *PubSubPublishRequest { - this := &PubSubPublishRequest{} - this.Topic = string(randStringPubsub(r)) - v3 := r.Intn(100) - this.Data = make([]byte, v3) - for i := 0; i < v3; i++ { - this.Data[i] = byte(r.Intn(256)) - } - this.Advertise = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubSubscribeRequest(r randyPubsub, easy bool) *PubSubSubscribeRequest { - this := &PubSubSubscribeRequest{} - this.Topic = string(randStringPubsub(r)) - this.Discover = bool(bool(r.Intn(2) == 0)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubTopicsResponse(r randyPubsub, easy bool) *PubSubTopicsResponse { - this := &PubSubTopicsResponse{} - v4 := r.Intn(10) - this.Names = make([]string, v4) - for i := 0; i < v4; i++ { - this.Names[i] = string(randStringPubsub(r)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedPubSubMessageResponse(r randyPubsub, easy bool) *PubSubMessageResponse { - this := &PubSubMessageResponse{} - v5 := r.Intn(100) - this.From = make([]byte, v5) - for i := 0; i < v5; i++ { - this.From[i] = byte(r.Intn(256)) - } - v6 := r.Intn(100) - this.Data = make([]byte, v6) - for i := 0; i < v6; i++ { - this.Data[i] = byte(r.Intn(256)) - } - v7 := r.Intn(100) - this.Seqno = make([]byte, v7) - for i := 0; i < v7; i++ { - this.Seqno[i] = byte(r.Intn(256)) - } - v8 := r.Intn(10) - this.TopicIDs = make([]string, v8) - for i := 0; i < v8; i++ { - this.TopicIDs[i] = string(randStringPubsub(r)) - } - v9 := r.Intn(100) - this.Signature = make([]byte, v9) - for i := 0; i < v9; i++ { - this.Signature[i] = byte(r.Intn(256)) - } - v10 := r.Intn(100) - this.Key = make([]byte, v10) - for i := 0; i < v10; i++ { - this.Key[i] = byte(r.Intn(256)) - } - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyPubsub interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RunePubsub(r randyPubsub) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringPubsub(r randyPubsub) string { - v11 := r.Intn(100) - tmps := make([]rune, v11) - for i := 0; i < v11; i++ { - tmps[i] = randUTF8RunePubsub(r) - } - return string(tmps) -} -func randUnrecognizedPubsub(r randyPubsub, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldPubsub(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldPubsub(dAtA []byte, r randyPubsub, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(key)) - v12 := r.Int63() - if r.Intn(2) == 0 { - v12 *= -1 - } - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(v12)) - case 1: - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulatePubsub(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulatePubsub(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *PubSubListPeersRequest) Size() (n int) { if m == nil { return 0 @@ -1932,98 +1190,6 @@ func sovPubsub(x uint64) (n int) { func sozPubsub(x uint64) (n int) { return sovPubsub(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *PubSubListPeersRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubListPeersRequest{`, - `Topics:` + fmt.Sprintf("%v", this.Topics) + `,`, - `}`, - }, "") - return s -} -func (this *PubSubListPeersResponse) String() string { - if this == nil { - return "nil" - } - repeatedStringForPeers := "[]*PubSubListPeersResponse_Peer{" - for _, f := range this.Peers { - repeatedStringForPeers += strings.Replace(fmt.Sprintf("%v", f), "PubSubListPeersResponse_Peer", "PubSubListPeersResponse_Peer", 1) + "," - } - repeatedStringForPeers += "}" - s := strings.Join([]string{`&PubSubListPeersResponse{`, - `Peers:` + repeatedStringForPeers + `,`, - `}`, - }, "") - return s -} -func (this *PubSubListPeersResponse_Peer) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubListPeersResponse_Peer{`, - `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, - `PeerID:` + fmt.Sprintf("%v", this.PeerID) + `,`, - `}`, - }, "") - return s -} -func (this *PubSubPublishRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubPublishRequest{`, - `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Advertise:` + fmt.Sprintf("%v", this.Advertise) + `,`, - `}`, - }, "") - return s -} -func (this *PubSubSubscribeRequest) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubSubscribeRequest{`, - `Topic:` + fmt.Sprintf("%v", this.Topic) + `,`, - `Discover:` + fmt.Sprintf("%v", this.Discover) + `,`, - `}`, - }, "") - return s -} -func (this *PubSubTopicsResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubTopicsResponse{`, - `Names:` + fmt.Sprintf("%v", this.Names) + `,`, - `}`, - }, "") - return s -} -func (this *PubSubMessageResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PubSubMessageResponse{`, - `From:` + fmt.Sprintf("%v", this.From) + `,`, - `Data:` + fmt.Sprintf("%v", this.Data) + `,`, - `Seqno:` + fmt.Sprintf("%v", this.Seqno) + `,`, - `TopicIDs:` + fmt.Sprintf("%v", this.TopicIDs) + `,`, - `Signature:` + fmt.Sprintf("%v", this.Signature) + `,`, - `Key:` + fmt.Sprintf("%v", this.Key) + `,`, - `}`, - }, "") - return s -} -func valueToStringPubsub(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *PubSubListPeersRequest) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/pubsubpb_test.go b/go/pubsubpb_test.go deleted file mode 100644 index 35183b2..0000000 --- a/go/pubsubpb_test.go +++ /dev/null @@ -1,1258 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: pubsub.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestPubSubListPeersRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubListPeersRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubListPeersResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponse_PeerProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse_Peer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubListPeersResponse_PeerMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse_Peer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubPublishRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubPublishRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubSubscribeRequestProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubSubscribeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubSubscribeRequestMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubSubscribeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubTopicsResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubTopicsResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubTopicsResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubTopicsResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubMessageResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubMessageResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPubSubMessageResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubMessageResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubListPeersResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubListPeersResponse_PeerJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubListPeersResponse_Peer{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubPublishRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubPublishRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubSubscribeRequestJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubSubscribeRequest{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubTopicsResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubTopicsResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubMessageResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PubSubMessageResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPubSubListPeersRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubListPeersRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubListPeersRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubListPeersResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubListPeersResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponse_PeerProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubListPeersResponse_Peer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersResponse_PeerProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubListPeersResponse_Peer{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubPublishRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubPublishRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubPublishRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubPublishRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubSubscribeRequestProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubSubscribeRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubSubscribeRequestProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubSubscribeRequest{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubTopicsResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubTopicsResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubTopicsResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubTopicsResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubMessageResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PubSubMessageResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubMessageResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PubSubMessageResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPubSubListPeersRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubListPeersRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubListPeersResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubListPeersResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubListPeersResponse_PeerVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubListPeersResponse_Peer{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubPublishRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubPublishRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubPublishRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubSubscribeRequestVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubSubscribeRequest(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubSubscribeRequest{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubTopicsResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubTopicsResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubTopicsResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubMessageResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubMessageResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PubSubMessageResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPubSubListPeersRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubListPeersResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubListPeersResponse_PeerGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubPublishRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubPublishRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubSubscribeRequestGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubSubscribeRequest(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubTopicsResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubTopicsResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubMessageResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubMessageResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPubSubListPeersRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubListPeersResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubListPeersResponse_PeerSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubPublishRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubPublishRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubSubscribeRequestSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubSubscribeRequest(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubTopicsResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubTopicsResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubMessageResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPubSubMessageResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPubSubListPeersRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubListPeersResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubListPeersResponse_PeerStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubListPeersResponse_Peer(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubPublishRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubPublishRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubSubscribeRequestStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubSubscribeRequest(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubTopicsResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubTopicsResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestPubSubMessageResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPubSubMessageResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/status.pb.go b/go/status.pb.go index 0e73b94..ebe0daf 100644 --- a/go/status.pb.go +++ b/go/status.pb.go @@ -9,10 +9,7 @@ import ( io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -73,8 +70,9 @@ type VersionResponse struct { Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"` } -func (m *VersionResponse) Reset() { *m = VersionResponse{} } -func (*VersionResponse) ProtoMessage() {} +func (m *VersionResponse) Reset() { *m = VersionResponse{} } +func (m *VersionResponse) String() string { return proto.CompactTextString(m) } +func (*VersionResponse) ProtoMessage() {} func (*VersionResponse) Descriptor() ([]byte, []int) { return fileDescriptor_dfe4fce6682daf5b, []int{0} } @@ -121,8 +119,9 @@ type StatusResponse struct { Status APISTATUS `protobuf:"varint,2,opt,name=status,proto3,enum=pb.APISTATUS" json:"status,omitempty"` } -func (m *StatusResponse) Reset() { *m = StatusResponse{} } -func (*StatusResponse) ProtoMessage() {} +func (m *StatusResponse) Reset() { *m = StatusResponse{} } +func (m *StatusResponse) String() string { return proto.CompactTextString(m) } +func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) Descriptor() ([]byte, []int) { return fileDescriptor_dfe4fce6682daf5b, []int{1} } @@ -176,173 +175,25 @@ func init() { func init() { proto.RegisterFile("status.proto", fileDescriptor_dfe4fce6682daf5b) } var fileDescriptor_dfe4fce6682daf5b = []byte{ - // 339 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0x41, 0x4e, 0xc2, 0x40, - 0x14, 0x86, 0x67, 0x50, 0x4b, 0xfa, 0x54, 0x6c, 0x46, 0x17, 0x0d, 0x8b, 0x09, 0x69, 0x62, 0x82, - 0x12, 0x4b, 0x82, 0x5e, 0xa0, 0xca, 0x48, 0x1a, 0xb5, 0x34, 0x03, 0xb8, 0x35, 0x96, 0x20, 0x90, - 0x08, 0xd3, 0xd0, 0xa9, 0x89, 0x3b, 0x8f, 0xe0, 0x31, 0x3c, 0x82, 0x47, 0x70, 0xc9, 0x92, 0x25, - 0x2d, 0x17, 0x70, 0xe9, 0xd2, 0x30, 0x45, 0xa2, 0xee, 0xfe, 0xff, 0x9f, 0x6f, 0xf2, 0xde, 0xff, - 0x60, 0x27, 0x92, 0xf7, 0x32, 0x8e, 0xec, 0x70, 0x22, 0xa4, 0x20, 0xb9, 0x30, 0x28, 0x42, 0x2c, - 0x87, 0x8f, 0x99, 0x2f, 0x9e, 0xf4, 0x87, 0x72, 0x10, 0x07, 0x76, 0x57, 0x8c, 0xaa, 0x7d, 0xd1, - 0x17, 0x55, 0x15, 0x07, 0xf1, 0x83, 0x72, 0xca, 0x28, 0x95, 0xe1, 0x56, 0x05, 0xf6, 0x6e, 0x7b, - 0x93, 0x68, 0x28, 0xc6, 0xbc, 0x17, 0x85, 0x62, 0x1c, 0xf5, 0x88, 0x09, 0xf9, 0xa7, 0x2c, 0x32, - 0x71, 0x09, 0x97, 0x75, 0xfe, 0x63, 0xad, 0x2b, 0x28, 0xb4, 0xd4, 0xec, 0x35, 0x4b, 0x60, 0x73, - 0x20, 0x22, 0xb9, 0x02, 0x95, 0x26, 0x87, 0xa0, 0x65, 0x1b, 0x9a, 0xb9, 0x12, 0x2e, 0x17, 0x6a, - 0xbb, 0x76, 0x18, 0xd8, 0x8e, 0xef, 0xb6, 0xda, 0x4e, 0xbb, 0xd3, 0xe2, 0xab, 0xc7, 0x63, 0x17, - 0xf4, 0x75, 0x48, 0x00, 0xb4, 0xa6, 0x77, 0xed, 0x7a, 0xcc, 0x40, 0x64, 0x1b, 0xf2, 0x7e, 0x87, - 0x37, 0x5c, 0xaf, 0x61, 0x60, 0x62, 0xc2, 0x41, 0x9d, 0x35, 0xb8, 0x53, 0x67, 0xf5, 0x3b, 0x9f, - 0xf1, 0xcb, 0x26, 0xbf, 0x71, 0xbc, 0x0b, 0x66, 0xe4, 0x88, 0x0e, 0x5b, 0x8c, 0xf3, 0x26, 0x37, - 0x36, 0x6a, 0x5d, 0xd0, 0xb3, 0xbd, 0x1c, 0xdf, 0x25, 0x15, 0xc8, 0xaf, 0x1a, 0x11, 0x7d, 0x39, - 0x99, 0x8d, 0x42, 0xf9, 0x5c, 0xdc, 0x5f, 0xca, 0x7f, 0x4d, 0x2d, 0x44, 0x8e, 0x40, 0xcb, 0x7e, - 0xfe, 0x66, 0xc9, 0x52, 0xfe, 0x2d, 0x6a, 0xa1, 0xf3, 0xb3, 0x59, 0x42, 0xd1, 0x3c, 0xa1, 0xf8, - 0x33, 0xa1, 0xf8, 0x2b, 0xa1, 0xf8, 0x25, 0xa5, 0xf8, 0x2d, 0xa5, 0xf8, 0x3d, 0xa5, 0xf8, 0x23, - 0xa5, 0x78, 0x9a, 0x52, 0x3c, 0x4f, 0x29, 0x7e, 0x5d, 0x50, 0x34, 0x5d, 0x50, 0x34, 0x5b, 0x50, - 0x14, 0x68, 0xea, 0xcc, 0xa7, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xf6, 0x2c, 0x1c, 0xcc, 0xb5, - 0x01, 0x00, 0x00, -} - -func (this *VersionResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*VersionResponse) - if !ok { - that2, ok := that.(VersionResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *VersionResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *VersionResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *VersionResponse but is not nil && this == nil") - } - if this.Version != that1.Version { - return fmt.Errorf("Version this(%v) Not Equal that(%v)", this.Version, that1.Version) - } - return nil -} -func (this *VersionResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*VersionResponse) - if !ok { - that2, ok := that.(VersionResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Version != that1.Version { - return false - } - return true -} -func (this *StatusResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*StatusResponse) - if !ok { - that2, ok := that.(StatusResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *StatusResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *StatusResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *StatusResponse but is not nil && this == nil") - } - if this.Host != that1.Host { - return fmt.Errorf("Host this(%v) Not Equal that(%v)", this.Host, that1.Host) - } - if this.Status != that1.Status { - return fmt.Errorf("Status this(%v) Not Equal that(%v)", this.Status, that1.Status) - } - return nil -} -func (this *StatusResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*StatusResponse) - if !ok { - that2, ok := that.(StatusResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Host != that1.Host { - return false - } - if this.Status != that1.Status { - return false - } - return true -} -func (this *VersionResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.VersionResponse{") - s = append(s, "Version: "+fmt.Sprintf("%#v", this.Version)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *StatusResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 6) - s = append(s, "&pb.StatusResponse{") - s = append(s, "Host: "+fmt.Sprintf("%#v", this.Host)+",\n") - s = append(s, "Status: "+fmt.Sprintf("%#v", this.Status)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringStatus(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) + // 283 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x2e, 0x49, 0x2c, + 0x29, 0x2d, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0xe2, 0x2a, 0x2d, + 0xc9, 0xcc, 0x81, 0xf0, 0x95, 0xb4, 0xb9, 0xf8, 0xc3, 0x52, 0x8b, 0x8a, 0x33, 0xf3, 0xf3, 0x82, + 0x52, 0x8b, 0x0b, 0xf2, 0xf3, 0x8a, 0x53, 0x85, 0x24, 0xb8, 0xd8, 0xcb, 0x20, 0x42, 0x12, 0x8c, + 0x0a, 0x8c, 0x1a, 0x9c, 0x41, 0x30, 0xae, 0x92, 0x37, 0x17, 0x5f, 0x30, 0xd8, 0x30, 0xb8, 0x5a, + 0x21, 0x2e, 0x96, 0x8c, 0xfc, 0xe2, 0x12, 0xa8, 0x42, 0x30, 0x5b, 0x48, 0x95, 0x8b, 0x0d, 0x62, + 0xa5, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x9f, 0x11, 0xaf, 0x5e, 0x41, 0x92, 0x9e, 0x63, 0x80, 0x67, + 0x70, 0x88, 0x63, 0x48, 0x68, 0x70, 0x10, 0x54, 0x52, 0xcb, 0x93, 0x8b, 0x13, 0x2e, 0x28, 0xc4, + 0xc5, 0xc5, 0xe6, 0xef, 0xe7, 0xe3, 0xe9, 0xe7, 0x2a, 0xc0, 0x20, 0xc4, 0xcd, 0xc5, 0x1e, 0x10, + 0x1a, 0xe4, 0xee, 0xe9, 0xe7, 0x2e, 0xc0, 0x28, 0x24, 0xc1, 0x25, 0xe2, 0xe2, 0xea, 0x1e, 0xe4, + 0xe8, 0xe2, 0xea, 0x12, 0x1f, 0xe0, 0x1a, 0xe4, 0xe6, 0x1f, 0xe4, 0xeb, 0xe8, 0xe7, 0xec, 0x2a, + 0xc0, 0x24, 0xc4, 0xc9, 0xc5, 0xea, 0x1a, 0x14, 0xe4, 0x1f, 0x24, 0xc0, 0x6c, 0x94, 0xcc, 0xc5, + 0x09, 0x71, 0x97, 0x63, 0x80, 0xa7, 0x90, 0x36, 0x17, 0x3b, 0xd4, 0x47, 0x42, 0x9c, 0x20, 0x9b, + 0x5d, 0x73, 0x0b, 0x4a, 0x2a, 0xa5, 0x84, 0x41, 0x4c, 0x34, 0x9f, 0x2a, 0x31, 0x08, 0x69, 0x72, + 0xb1, 0x41, 0x74, 0x22, 0xab, 0x15, 0x02, 0x31, 0x51, 0x3d, 0xaa, 0xc4, 0xe0, 0x24, 0x71, 0xe2, + 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, + 0xe1, 0xb1, 0x1c, 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x49, 0x6c, 0xe0, 0xa0, 0x34, 0x06, 0x04, 0x00, + 0x00, 0xff, 0xff, 0x87, 0xf2, 0xa5, 0x3a, 0x6a, 0x01, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -541,95 +392,6 @@ func encodeVarintStatus(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedVersionResponse(r randyStatus, easy bool) *VersionResponse { - this := &VersionResponse{} - this.Version = string(randStringStatus(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedStatusResponse(r randyStatus, easy bool) *StatusResponse { - this := &StatusResponse{} - this.Host = string(randStringStatus(r)) - this.Status = APISTATUS([]int32{0, 1, 2, 3}[r.Intn(4)]) - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyStatus interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneStatus(r randyStatus) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringStatus(r randyStatus) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneStatus(r) - } - return string(tmps) -} -func randUnrecognizedStatus(r randyStatus, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldStatus(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldStatus(dAtA []byte, r randyStatus, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateStatus(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateStatus(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateStatus(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateStatus(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *VersionResponse) Size() (n int) { if m == nil { return 0 @@ -665,35 +427,6 @@ func sovStatus(x uint64) (n int) { func sozStatus(x uint64) (n int) { return sovStatus(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *VersionResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&VersionResponse{`, - `Version:` + fmt.Sprintf("%v", this.Version) + `,`, - `}`, - }, "") - return s -} -func (this *StatusResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&StatusResponse{`, - `Host:` + fmt.Sprintf("%v", this.Host) + `,`, - `Status:` + fmt.Sprintf("%v", this.Status) + `,`, - `}`, - }, "") - return s -} -func valueToStringStatus(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *VersionResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/statuspb_test.go b/go/statuspb_test.go deleted file mode 100644 index 03bab54..0000000 --- a/go/statuspb_test.go +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: status.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestVersionResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestVersionResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStatusResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StatusResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestStatusResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StatusResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVersionResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &VersionResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestStatusResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &StatusResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestVersionResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &VersionResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVersionResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &VersionResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStatusResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &StatusResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestStatusResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &StatusResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestVersionResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVersionResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &VersionResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestStatusResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &StatusResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestVersionResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVersionResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestStatusResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestVersionResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedVersionResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestStatusResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedStatusResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestVersionResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedVersionResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestStatusResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedStatusResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/go/util.pb.go b/go/util.pb.go index c58e4c5..c65db0c 100644 --- a/go/util.pb.go +++ b/go/util.pb.go @@ -8,10 +8,7 @@ import ( io "io" math "math" math_bits "math/bits" - reflect "reflect" - strings "strings" - _ "github.com/gogo/protobuf/gogoproto" proto "github.com/gogo/protobuf/proto" ) @@ -32,8 +29,9 @@ type PutResponse struct { Hash string `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` } -func (m *PutResponse) Reset() { *m = PutResponse{} } -func (*PutResponse) ProtoMessage() {} +func (m *PutResponse) Reset() { *m = PutResponse{} } +func (m *PutResponse) String() string { return proto.CompactTextString(m) } +func (*PutResponse) ProtoMessage() {} func (*PutResponse) Descriptor() ([]byte, []int) { return fileDescriptor_170ba741606d8a4c, []int{0} } @@ -75,8 +73,9 @@ func (m *PutResponse) GetHash() string { type Empty struct { } -func (m *Empty) Reset() { *m = Empty{} } -func (*Empty) ProtoMessage() {} +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor_170ba741606d8a4c, []int{1} } @@ -115,149 +114,17 @@ func init() { func init() { proto.RegisterFile("util.proto", fileDescriptor_170ba741606d8a4c) } var fileDescriptor_170ba741606d8a4c = []byte{ - // 173 bytes of a gzipped FileDescriptorProto + // 113 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x2a, 0x2d, 0xc9, 0xcc, - 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x92, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, - 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x4f, 0xcf, 0x4f, 0xcf, 0xd7, 0x07, 0x4b, 0x25, 0x95, - 0xa6, 0x81, 0x79, 0x60, 0x0e, 0x98, 0x05, 0xd1, 0xa2, 0xa4, 0xc8, 0xc5, 0x1d, 0x50, 0x5a, 0x12, - 0x94, 0x5a, 0x5c, 0x90, 0x9f, 0x57, 0x9c, 0x2a, 0x24, 0xc4, 0xc5, 0x92, 0x91, 0x58, 0x9c, 0x21, - 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0x66, 0x2b, 0xb1, 0x73, 0xb1, 0xba, 0xe6, 0x16, 0x94, - 0x54, 0x3a, 0x99, 0xdc, 0x78, 0x28, 0xc7, 0xf0, 0xe0, 0xa1, 0x1c, 0xe3, 0x87, 0x87, 0x72, 0x8c, - 0x3f, 0x1e, 0xca, 0x31, 0x36, 0x3c, 0x92, 0x63, 0x5c, 0xf1, 0x48, 0x8e, 0x71, 0xc7, 0x23, 0x39, - 0xc6, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, - 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x48, 0x62, 0x03, 0x5b, 0x64, 0x0c, - 0x08, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x64, 0x4c, 0xaa, 0xa9, 0x00, 0x00, 0x00, + 0xd1, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x2a, 0x48, 0x52, 0x52, 0xe4, 0xe2, 0x0e, 0x28, + 0x2d, 0x09, 0x4a, 0x2d, 0x2e, 0xc8, 0xcf, 0x2b, 0x4e, 0x15, 0x12, 0xe2, 0x62, 0xc9, 0x48, 0x2c, + 0xce, 0x90, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x95, 0xd8, 0xb9, 0x58, 0x5d, 0x73, + 0x0b, 0x4a, 0x2a, 0x9d, 0x24, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, + 0x39, 0xc6, 0x09, 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0x89, + 0x0d, 0x6c, 0xa0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xb3, 0x03, 0x3f, 0x67, 0x5e, 0x00, 0x00, + 0x00, } -func (this *PutResponse) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*PutResponse) - if !ok { - that2, ok := that.(PutResponse) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *PutResponse") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *PutResponse but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *PutResponse but is not nil && this == nil") - } - if this.Hash != that1.Hash { - return fmt.Errorf("Hash this(%v) Not Equal that(%v)", this.Hash, that1.Hash) - } - return nil -} -func (this *PutResponse) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*PutResponse) - if !ok { - that2, ok := that.(PutResponse) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - if this.Hash != that1.Hash { - return false - } - return true -} -func (this *Empty) VerboseEqual(that interface{}) error { - if that == nil { - if this == nil { - return nil - } - return fmt.Errorf("that == nil && this != nil") - } - - that1, ok := that.(*Empty) - if !ok { - that2, ok := that.(Empty) - if ok { - that1 = &that2 - } else { - return fmt.Errorf("that is not of type *Empty") - } - } - if that1 == nil { - if this == nil { - return nil - } - return fmt.Errorf("that is type *Empty but is nil && this != nil") - } else if this == nil { - return fmt.Errorf("that is type *Empty but is not nil && this == nil") - } - return nil -} -func (this *Empty) Equal(that interface{}) bool { - if that == nil { - return this == nil - } - - that1, ok := that.(*Empty) - if !ok { - that2, ok := that.(Empty) - if ok { - that1 = &that2 - } else { - return false - } - } - if that1 == nil { - return this == nil - } else if this == nil { - return false - } - return true -} -func (this *PutResponse) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 5) - s = append(s, "&pb.PutResponse{") - s = append(s, "Hash: "+fmt.Sprintf("%#v", this.Hash)+",\n") - s = append(s, "}") - return strings.Join(s, "") -} -func (this *Empty) GoString() string { - if this == nil { - return "nil" - } - s := make([]string, 0, 4) - s = append(s, "&pb.Empty{") - s = append(s, "}") - return strings.Join(s, "") -} -func valueToGoStringUtil(v interface{}, typ string) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("func(v %v) *%v { return &v } ( %#v )", typ, typ, pv) -} func (m *PutResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -322,93 +189,6 @@ func encodeVarintUtil(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func NewPopulatedPutResponse(r randyUtil, easy bool) *PutResponse { - this := &PutResponse{} - this.Hash = string(randStringUtil(r)) - if !easy && r.Intn(10) != 0 { - } - return this -} - -func NewPopulatedEmpty(r randyUtil, easy bool) *Empty { - this := &Empty{} - if !easy && r.Intn(10) != 0 { - } - return this -} - -type randyUtil interface { - Float32() float32 - Float64() float64 - Int63() int64 - Int31() int32 - Uint32() uint32 - Intn(n int) int -} - -func randUTF8RuneUtil(r randyUtil) rune { - ru := r.Intn(62) - if ru < 10 { - return rune(ru + 48) - } else if ru < 36 { - return rune(ru + 55) - } - return rune(ru + 61) -} -func randStringUtil(r randyUtil) string { - v1 := r.Intn(100) - tmps := make([]rune, v1) - for i := 0; i < v1; i++ { - tmps[i] = randUTF8RuneUtil(r) - } - return string(tmps) -} -func randUnrecognizedUtil(r randyUtil, maxFieldNumber int) (dAtA []byte) { - l := r.Intn(5) - for i := 0; i < l; i++ { - wire := r.Intn(4) - if wire == 3 { - wire = 5 - } - fieldNumber := maxFieldNumber + r.Intn(100) - dAtA = randFieldUtil(dAtA, r, fieldNumber, wire) - } - return dAtA -} -func randFieldUtil(dAtA []byte, r randyUtil, fieldNumber int, wire int) []byte { - key := uint32(fieldNumber)<<3 | uint32(wire) - switch wire { - case 0: - dAtA = encodeVarintPopulateUtil(dAtA, uint64(key)) - v2 := r.Int63() - if r.Intn(2) == 0 { - v2 *= -1 - } - dAtA = encodeVarintPopulateUtil(dAtA, uint64(v2)) - case 1: - dAtA = encodeVarintPopulateUtil(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - case 2: - dAtA = encodeVarintPopulateUtil(dAtA, uint64(key)) - ll := r.Intn(100) - dAtA = encodeVarintPopulateUtil(dAtA, uint64(ll)) - for j := 0; j < ll; j++ { - dAtA = append(dAtA, byte(r.Intn(256))) - } - default: - dAtA = encodeVarintPopulateUtil(dAtA, uint64(key)) - dAtA = append(dAtA, byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256)), byte(r.Intn(256))) - } - return dAtA -} -func encodeVarintPopulateUtil(dAtA []byte, v uint64) []byte { - for v >= 1<<7 { - dAtA = append(dAtA, uint8(uint64(v)&0x7f|0x80)) - v >>= 7 - } - dAtA = append(dAtA, uint8(v)) - return dAtA -} func (m *PutResponse) Size() (n int) { if m == nil { return 0 @@ -437,33 +217,6 @@ func sovUtil(x uint64) (n int) { func sozUtil(x uint64) (n int) { return sovUtil(uint64((x << 1) ^ uint64((int64(x) >> 63)))) } -func (this *PutResponse) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&PutResponse{`, - `Hash:` + fmt.Sprintf("%v", this.Hash) + `,`, - `}`, - }, "") - return s -} -func (this *Empty) String() string { - if this == nil { - return "nil" - } - s := strings.Join([]string{`&Empty{`, - `}`, - }, "") - return s -} -func valueToStringUtil(v interface{}) string { - rv := reflect.ValueOf(v) - if rv.IsNil() { - return "nil" - } - pv := reflect.Indirect(rv).Interface() - return fmt.Sprintf("*%v", pv) -} func (m *PutResponse) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/go/utilpb_test.go b/go/utilpb_test.go deleted file mode 100644 index badaa4f..0000000 --- a/go/utilpb_test.go +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: util.proto - -package pb - -import ( - fmt "fmt" - go_parser "go/parser" - math "math" - math_rand "math/rand" - testing "testing" - time "time" - - _ "github.com/gogo/protobuf/gogoproto" - github_com_gogo_protobuf_jsonpb "github.com/gogo/protobuf/jsonpb" - github_com_gogo_protobuf_proto "github.com/gogo/protobuf/proto" - proto "github.com/gogo/protobuf/proto" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -func TestPutResponseProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestPutResponseMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEmptyProto(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Empty{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - littlefuzz := make([]byte, len(dAtA)) - copy(littlefuzz, dAtA) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } - if len(littlefuzz) > 0 { - fuzzamount := 100 - for i := 0; i < fuzzamount; i++ { - littlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256)) - littlefuzz = append(littlefuzz, byte(popr.Intn(256))) - } - // shouldn't panic - _ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg) - } -} - -func TestEmptyMarshalTo(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, false) - size := p.Size() - dAtA := make([]byte, size) - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - _, err := p.MarshalTo(dAtA) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Empty{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - for i := range dAtA { - dAtA[i] = byte(popr.Intn(256)) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPutResponseJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &PutResponse{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestEmptyJSON(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, true) - marshaler := github_com_gogo_protobuf_jsonpb.Marshaler{} - jsondata, err := marshaler.MarshalToString(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - msg := &Empty{} - err = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Json Equal %#v", seed, msg, p) - } -} -func TestPutResponseProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &PutResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPutResponseProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &PutResponse{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEmptyProtoText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, true) - dAtA := github_com_gogo_protobuf_proto.MarshalTextString(p) - msg := &Empty{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestEmptyProtoCompactText(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, true) - dAtA := github_com_gogo_protobuf_proto.CompactTextString(p) - msg := &Empty{} - if err := github_com_gogo_protobuf_proto.UnmarshalText(dAtA, msg); err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("seed = %d, %#v !VerboseProto %#v, since %v", seed, msg, p, err) - } - if !p.Equal(msg) { - t.Fatalf("seed = %d, %#v !Proto %#v", seed, msg, p) - } -} - -func TestPutResponseVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPutResponse(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &PutResponse{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestEmptyVerboseEqual(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEmpty(popr, false) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - panic(err) - } - msg := &Empty{} - if err := github_com_gogo_protobuf_proto.Unmarshal(dAtA, msg); err != nil { - panic(err) - } - if err := p.VerboseEqual(msg); err != nil { - t.Fatalf("%#v !VerboseEqual %#v, since %v", msg, p, err) - } -} -func TestPutResponseGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPutResponse(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestEmptyGoString(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEmpty(popr, false) - s1 := p.GoString() - s2 := fmt.Sprintf("%#v", p) - if s1 != s2 { - t.Fatalf("GoString want %v got %v", s1, s2) - } - _, err := go_parser.ParseExpr(s1) - if err != nil { - t.Fatal(err) - } -} -func TestPutResponseSize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedPutResponse(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestEmptySize(t *testing.T) { - seed := time.Now().UnixNano() - popr := math_rand.New(math_rand.NewSource(seed)) - p := NewPopulatedEmpty(popr, true) - size2 := github_com_gogo_protobuf_proto.Size(p) - dAtA, err := github_com_gogo_protobuf_proto.Marshal(p) - if err != nil { - t.Fatalf("seed = %d, err = %v", seed, err) - } - size := p.Size() - if len(dAtA) != size { - t.Errorf("seed = %d, size %v != marshalled size %v", seed, size, len(dAtA)) - } - if size2 != size { - t.Errorf("seed = %d, size %v != before marshal proto.Size %v", seed, size, size2) - } - size3 := github_com_gogo_protobuf_proto.Size(p) - if size3 != size { - t.Errorf("seed = %d, size %v != after marshal proto.Size %v", seed, size, size3) - } -} - -func TestPutResponseStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedPutResponse(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} -func TestEmptyStringer(t *testing.T) { - popr := math_rand.New(math_rand.NewSource(time.Now().UnixNano())) - p := NewPopulatedEmpty(popr, false) - s1 := p.String() - s2 := fmt.Sprintf("%v", p) - if s1 != s2 { - t.Fatalf("String want %v got %v", s1, s2) - } -} - -//These tests are generated by github.com/gogo/protobuf/plugin/testgen diff --git a/js/admin_grpc_web_pb.js b/js/admin_grpc_web_pb.js index d2b63de..7b5a815 100644 --- a/js/admin_grpc_web_pb.js +++ b/js/admin_grpc_web_pb.js @@ -11,8 +11,6 @@ const grpc = {}; grpc.web = require('grpc-web'); - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./admin_pb.js'); diff --git a/js/admin_pb.js b/js/admin_pb.js index 041bae0..834841b 100644 --- a/js/admin_pb.js +++ b/js/admin_pb.js @@ -12,8 +12,6 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.BSREQOPTS', null, global); goog.exportSymbol('proto.pb.BSREQTYPE', null, global); goog.exportSymbol('proto.pb.Block', null, global); diff --git a/js/dag_grpc_web_pb.js b/js/dag_grpc_web_pb.js index 1faae81..784a5c2 100644 --- a/js/dag_grpc_web_pb.js +++ b/js/dag_grpc_web_pb.js @@ -11,8 +11,6 @@ const grpc = {}; grpc.web = require('grpc-web'); - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./dag_pb.js'); diff --git a/js/dag_pb.js b/js/dag_pb.js index f16780d..883227e 100644 --- a/js/dag_pb.js +++ b/js/dag_pb.js @@ -12,8 +12,6 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.AddLinksRequest', null, global); goog.exportSymbol('proto.pb.DagGetRequest', null, global); goog.exportSymbol('proto.pb.DagGetResponse', null, global); diff --git a/js/file_grpc_web_pb.js b/js/file_grpc_web_pb.js index 48d3718..029648f 100644 --- a/js/file_grpc_web_pb.js +++ b/js/file_grpc_web_pb.js @@ -13,8 +13,6 @@ grpc.web = require('grpc-web'); var util_pb = require('./util_pb.js') - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./file_pb.js'); diff --git a/js/file_pb.js b/js/file_pb.js index d50b652..6214ae3 100644 --- a/js/file_pb.js +++ b/js/file_pb.js @@ -14,8 +14,6 @@ var global = Function('return this')(); var util_pb = require('./util_pb.js'); goog.object.extend(proto, util_pb); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.Blob', null, global); goog.exportSymbol('proto.pb.DownloadRequest', null, global); goog.exportSymbol('proto.pb.DownloadResponse', null, global); diff --git a/js/keystore_grpc_web_pb.js b/js/keystore_grpc_web_pb.js index 4df0855..93c03e6 100644 --- a/js/keystore_grpc_web_pb.js +++ b/js/keystore_grpc_web_pb.js @@ -11,8 +11,6 @@ const grpc = {}; grpc.web = require('grpc-web'); - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./keystore_pb.js'); diff --git a/js/keystore_pb.js b/js/keystore_pb.js index 1a310cb..9aa8a21 100644 --- a/js/keystore_pb.js +++ b/js/keystore_pb.js @@ -12,8 +12,6 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.KeystoreRequest', null, global); goog.exportSymbol('proto.pb.KeystoreResponse', null, global); /** diff --git a/js/namesys_grpc_web_pb.js b/js/namesys_grpc_web_pb.js index 31d6cdc..b4e331b 100644 --- a/js/namesys_grpc_web_pb.js +++ b/js/namesys_grpc_web_pb.js @@ -13,8 +13,6 @@ grpc.web = require('grpc-web'); var util_pb = require('./util_pb.js') - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./namesys_pb.js'); diff --git a/js/namesys_pb.js b/js/namesys_pb.js index c2aeac2..6cdca67 100644 --- a/js/namesys_pb.js +++ b/js/namesys_pb.js @@ -14,8 +14,6 @@ var global = Function('return this')(); var util_pb = require('./util_pb.js'); goog.object.extend(proto, util_pb); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.NameSysPublishRequest', null, global); goog.exportSymbol('proto.pb.NameSysResolveRequest', null, global); goog.exportSymbol('proto.pb.NameSysResolveResult', null, global); diff --git a/js/node_grpc_web_pb.js b/js/node_grpc_web_pb.js index 5f3b338..20ff3ec 100644 --- a/js/node_grpc_web_pb.js +++ b/js/node_grpc_web_pb.js @@ -13,8 +13,6 @@ grpc.web = require('grpc-web'); var util_pb = require('./util_pb.js') - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./node_pb.js'); diff --git a/js/node_pb.js b/js/node_pb.js index 9cd1e2c..8a44919 100644 --- a/js/node_pb.js +++ b/js/node_pb.js @@ -14,8 +14,6 @@ var global = Function('return this')(); var util_pb = require('./util_pb.js'); goog.object.extend(proto, util_pb); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.ConnectRequest', null, global); goog.exportSymbol('proto.pb.DisableExtrasRequest', null, global); goog.exportSymbol('proto.pb.DisconnectRequest', null, global); diff --git a/js/pubsub_grpc_web_pb.js b/js/pubsub_grpc_web_pb.js index 71c697d..3de093e 100644 --- a/js/pubsub_grpc_web_pb.js +++ b/js/pubsub_grpc_web_pb.js @@ -13,8 +13,6 @@ grpc.web = require('grpc-web'); var util_pb = require('./util_pb.js') - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./pubsub_pb.js'); diff --git a/js/pubsub_pb.js b/js/pubsub_pb.js index c1882e9..1f24cc2 100644 --- a/js/pubsub_pb.js +++ b/js/pubsub_pb.js @@ -14,8 +14,6 @@ var global = Function('return this')(); var util_pb = require('./util_pb.js'); goog.object.extend(proto, util_pb); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.PubSubListPeersRequest', null, global); goog.exportSymbol('proto.pb.PubSubListPeersResponse', null, global); goog.exportSymbol('proto.pb.PubSubListPeersResponse.Peer', null, global); diff --git a/js/status_grpc_web_pb.js b/js/status_grpc_web_pb.js index 5e5e5c7..0bdfc38 100644 --- a/js/status_grpc_web_pb.js +++ b/js/status_grpc_web_pb.js @@ -13,8 +13,6 @@ grpc.web = require('grpc-web'); var util_pb = require('./util_pb.js') - -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js') const proto = {}; proto.pb = require('./status_pb.js'); diff --git a/js/status_pb.js b/js/status_pb.js index 59f5a4d..7da4767 100644 --- a/js/status_pb.js +++ b/js/status_pb.js @@ -14,8 +14,6 @@ var global = Function('return this')(); var util_pb = require('./util_pb.js'); goog.object.extend(proto, util_pb); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.APISTATUS', null, global); goog.exportSymbol('proto.pb.StatusResponse', null, global); goog.exportSymbol('proto.pb.VersionResponse', null, global); diff --git a/js/util_pb.js b/js/util_pb.js index 51f9b40..beb7fb0 100644 --- a/js/util_pb.js +++ b/js/util_pb.js @@ -12,8 +12,6 @@ var jspb = require('google-protobuf'); var goog = jspb; var global = Function('return this')(); -var github_com_gogo_protobuf_gogoproto_gogo_pb = require('./github.com/gogo/protobuf/gogoproto/gogo_pb.js'); -goog.object.extend(proto, github_com_gogo_protobuf_gogoproto_gogo_pb); goog.exportSymbol('proto.pb.Empty', null, global); goog.exportSymbol('proto.pb.PutResponse', null, global); /** diff --git a/pb/admin.proto b/pb/admin.proto index b967486..e4ec01b 100644 --- a/pb/admin.proto +++ b/pb/admin.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -13,7 +13,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; - +*/ // AdminAPI facilitates administrative management of TemporalX via a localhost gRPC API service AdminAPI { // ManageGC is used to manage TemporalX's garbage collection process diff --git a/pb/dag.proto b/pb/dag.proto index 8a52ef3..5dbdd73 100644 --- a/pb/dag.proto +++ b/pb/dag.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -13,6 +13,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +*/ // provides protocol buffer definitions for interactin with IPLD objects diff --git a/pb/file.proto b/pb/file.proto index bcea396..2ca4811 100644 --- a/pb/file.proto +++ b/pb/file.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package pb; import "util.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -14,6 +14,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +*/ // provides protocol buffer definitions for uploading files and creating UnixFS types diff --git a/pb/keystore.proto b/pb/keystore.proto index 5382f24..3649ce3 100644 --- a/pb/keystore.proto +++ b/pb/keystore.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -13,7 +13,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; - +*/ // KeystoreAPI provides a keystore management API service KeystoreAPI { diff --git a/pb/namesys.proto b/pb/namesys.proto index a00209b..8a71eac 100644 --- a/pb/namesys.proto +++ b/pb/namesys.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package pb; import "util.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -14,6 +14,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +*/ // NameSysAPI provides a generic name resolution API diff --git a/pb/node.proto b/pb/node.proto index b5d16f8..eb3f77e 100644 --- a/pb/node.proto +++ b/pb/node.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package pb; import "util.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -14,7 +14,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; - +*/ // NodeAPI provide an API to control the underlying custom ipfs node service NodeAPI { diff --git a/pb/pubsub.proto b/pb/pubsub.proto index ed3de55..37b1b0e 100644 --- a/pb/pubsub.proto +++ b/pb/pubsub.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package pb; import "util.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -14,6 +14,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +*/ // PubSubAPI provides a gRPC API for a libp2p pubsub instance diff --git a/pb/status.proto b/pb/status.proto index 8ad4113..c9d4950 100644 --- a/pb/status.proto +++ b/pb/status.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package pb; import "util.proto"; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -14,6 +14,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; +*/ // provides utilities to retrieve api status information from service StatusAPI { diff --git a/pb/util.proto b/pb/util.proto index cafb251..9dbf07c 100644 --- a/pb/util.proto +++ b/pb/util.proto @@ -1,6 +1,6 @@ syntax = "proto3"; package pb; -import "github.com/gogo/protobuf/gogoproto/gogo.proto"; +/*import "github.com/gogo/protobuf/gogoproto/gogo.proto"; option (gogoproto.gostring_all) = true; option (gogoproto.equal_all) = true; option (gogoproto.verbose_equal_all) = true; @@ -13,7 +13,7 @@ option (gogoproto.testgen_all) = true; option (gogoproto.marshaler_all) = true; option (gogoproto.sizer_all) = true; option (gogoproto.unmarshaler_all) = true; - +*/ // provides protocol buffer definitions that are general purpose and re-usable across multiple types // PutResponse is a response to any data storage (put) requests diff --git a/py/admin_pb2.py b/py/admin_pb2.py index 150128c..dfcb088 100644 --- a/py/admin_pb2.py +++ b/py/admin_pb2.py @@ -14,17 +14,15 @@ _sym_db = _symbol_database.Default() -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='admin.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\x0b\x61\x64min.proto\x12\x02pb\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"a\n\x11\x42lockstoreRequest\x12\x0c\n\x04\x63ids\x18\x01 \x03(\t\x12\x1e\n\x07reqType\x18\x02 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x1e\n\x07reqOpts\x18\x03 \x01(\x0e\x32\r.pb.BSREQOPTS\"/\n\x12\x42lockstoreResponse\x12\x19\n\x06\x62locks\x18\x01 \x03(\x0b\x32\t.pb.Block\"\"\n\x05\x42lock\x12\x0b\n\x03\x63id\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\".\n\x0fManageGCRequest\x12\x1b\n\x04type\x18\x01 \x01(\x0e\x32\r.pb.GCREQTYPE\"\"\n\x10ManageGCResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\".\n\x0fRefCountRequest\x12\x0c\n\x04\x63ids\x18\x01 \x03(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\"m\n\x10RefCountResponse\x12,\n\x04\x63ids\x18\x01 \x03(\x0b\x32\x1e.pb.RefCountResponse.CidsEntry\x1a+\n\tCidsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01*T\n\tBSREQTYPE\x12\r\n\tBS_DELETE\x10\x00\x12\n\n\x06\x42S_PUT\x10\x01\x12\x0f\n\x0b\x42S_PUT_MANY\x10\x02\x12\n\n\x06\x42S_GET\x10\x03\x12\x0f\n\x0b\x42S_GET_MANY\x10\x04*&\n\tBSREQOPTS\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08\x42S_FORCE\x10\x01*5\n\tGCREQTYPE\x12\x0c\n\x08GC_START\x10\x00\x12\x0b\n\x07GC_STOP\x10\x01\x12\r\n\tGC_STATUS\x10\x02*/\n\nREFREQTYPE\x12\x11\n\rREF_GET_COUNT\x10\x00\x12\x0e\n\nREF_DELETE\x10\x01*\x1b\n\nREFREQOPTS\x12\r\n\tREF_FORCE\x10\x00\x32\xbb\x01\n\x08\x41\x64minAPI\x12\x37\n\x08ManageGC\x12\x13.pb.ManageGCRequest\x1a\x14.pb.ManageGCResponse\"\x00\x12\x37\n\x08RefCount\x12\x13.pb.RefCountRequest\x1a\x14.pb.RefCountResponse\"\x00\x12=\n\nBlockstore\x12\x15.pb.BlockstoreRequest\x1a\x16.pb.BlockstoreResponse\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') - , - dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + serialized_options=None, + serialized_pb=_b('\n\x0b\x61\x64min.proto\x12\x02pb\"a\n\x11\x42lockstoreRequest\x12\x0c\n\x04\x63ids\x18\x01 \x03(\t\x12\x1e\n\x07reqType\x18\x02 \x01(\x0e\x32\r.pb.BSREQTYPE\x12\x1e\n\x07reqOpts\x18\x03 \x01(\x0e\x32\r.pb.BSREQOPTS\"/\n\x12\x42lockstoreResponse\x12\x19\n\x06\x62locks\x18\x01 \x03(\x0b\x32\t.pb.Block\"\"\n\x05\x42lock\x12\x0b\n\x03\x63id\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\".\n\x0fManageGCRequest\x12\x1b\n\x04type\x18\x01 \x01(\x0e\x32\r.pb.GCREQTYPE\"\"\n\x10ManageGCResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\".\n\x0fRefCountRequest\x12\x0c\n\x04\x63ids\x18\x01 \x03(\t\x12\r\n\x05limit\x18\x02 \x01(\x03\"m\n\x10RefCountResponse\x12,\n\x04\x63ids\x18\x01 \x03(\x0b\x32\x1e.pb.RefCountResponse.CidsEntry\x1a+\n\tCidsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x03:\x02\x38\x01*T\n\tBSREQTYPE\x12\r\n\tBS_DELETE\x10\x00\x12\n\n\x06\x42S_PUT\x10\x01\x12\x0f\n\x0b\x42S_PUT_MANY\x10\x02\x12\n\n\x06\x42S_GET\x10\x03\x12\x0f\n\x0b\x42S_GET_MANY\x10\x04*&\n\tBSREQOPTS\x12\x0b\n\x07\x44\x45\x46\x41ULT\x10\x00\x12\x0c\n\x08\x42S_FORCE\x10\x01*5\n\tGCREQTYPE\x12\x0c\n\x08GC_START\x10\x00\x12\x0b\n\x07GC_STOP\x10\x01\x12\r\n\tGC_STATUS\x10\x02*/\n\nREFREQTYPE\x12\x11\n\rREF_GET_COUNT\x10\x00\x12\x0e\n\nREF_DELETE\x10\x01*\x1b\n\nREFREQOPTS\x12\r\n\tREF_FORCE\x10\x00\x32\xbb\x01\n\x08\x41\x64minAPI\x12\x37\n\x08ManageGC\x12\x13.pb.ManageGCRequest\x1a\x14.pb.ManageGCResponse\"\x00\x12\x37\n\x08RefCount\x12\x13.pb.RefCountRequest\x1a\x14.pb.RefCountResponse\"\x00\x12=\n\nBlockstore\x12\x15.pb.BlockstoreRequest\x1a\x16.pb.BlockstoreResponse\"\x00\x62\x06proto3') +) _BSREQTYPE = _descriptor.EnumDescriptor( name='BSREQTYPE', @@ -55,8 +53,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=493, - serialized_end=577, + serialized_start=446, + serialized_end=530, ) _sym_db.RegisterEnumDescriptor(_BSREQTYPE) @@ -78,8 +76,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=579, - serialized_end=617, + serialized_start=532, + serialized_end=570, ) _sym_db.RegisterEnumDescriptor(_BSREQOPTS) @@ -105,8 +103,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=619, - serialized_end=672, + serialized_start=572, + serialized_end=625, ) _sym_db.RegisterEnumDescriptor(_GCREQTYPE) @@ -128,8 +126,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=674, - serialized_end=721, + serialized_start=627, + serialized_end=674, ) _sym_db.RegisterEnumDescriptor(_REFREQTYPE) @@ -147,8 +145,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=723, - serialized_end=750, + serialized_start=676, + serialized_end=703, ) _sym_db.RegisterEnumDescriptor(_REFREQOPTS) @@ -209,8 +207,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=66, - serialized_end=163, + serialized_start=19, + serialized_end=116, ) @@ -240,8 +238,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=165, - serialized_end=212, + serialized_start=118, + serialized_end=165, ) @@ -278,8 +276,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=214, - serialized_end=248, + serialized_start=167, + serialized_end=201, ) @@ -309,8 +307,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=250, - serialized_end=296, + serialized_start=203, + serialized_end=249, ) @@ -340,8 +338,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=298, - serialized_end=332, + serialized_start=251, + serialized_end=285, ) @@ -378,8 +376,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=334, - serialized_end=380, + serialized_start=287, + serialized_end=333, ) @@ -416,8 +414,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=448, - serialized_end=491, + serialized_start=401, + serialized_end=444, ) _REFCOUNTRESPONSE = _descriptor.Descriptor( @@ -446,8 +444,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=382, - serialized_end=491, + serialized_start=335, + serialized_end=444, ) _BLOCKSTOREREQUEST.fields_by_name['reqType'].enum_type = _BSREQTYPE @@ -528,7 +526,6 @@ _sym_db.RegisterMessage(RefCountResponse.CidsEntry) -DESCRIPTOR._options = None _REFCOUNTRESPONSE_CIDSENTRY._options = None _ADMINAPI = _descriptor.ServiceDescriptor( @@ -537,8 +534,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=753, - serialized_end=940, + serialized_start=706, + serialized_end=893, methods=[ _descriptor.MethodDescriptor( name='ManageGC', diff --git a/py/dag_pb2.py b/py/dag_pb2.py index 8d250cd..9f0c81f 100644 --- a/py/dag_pb2.py +++ b/py/dag_pb2.py @@ -13,17 +13,15 @@ _sym_db = _symbol_database.Default() -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='dag.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\tdag.proto\x12\x02pb\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\" \n\x0e\x44\x61gPutResponse\x12\x0e\n\x06hashes\x18\x01 \x03(\t\"x\n\rDagPutRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x16\n\x0eobjectEncoding\x18\x02 \x01(\t\x12\x1b\n\x13serializationFormat\x18\x03 \x01(\t\x12\x10\n\x08hashFunc\x18\x04 \x01(\t\x12\x12\n\ncidVersion\x18\x05 \x01(\x03\"\x1d\n\rDagGetRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\"!\n\x0e\x44\x61gGetResponse\x12\x0f\n\x07rawData\x18\x01 \x01(\x0c\"\x94\x01\n\x12NewIPLDNodeRequest\x12\x30\n\x05links\x18\x01 \x03(\x0b\x32!.pb.NewIPLDNodeRequest.LinksEntry\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x10\n\x08hashFunc\x18\x03 \x01(\t\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8e\x01\n\x0f\x41\x64\x64LinksRequest\x12-\n\x05links\x18\x01 \x03(\x0b\x32\x1e.pb.AddLinksRequest.LinksEntry\x12\x0c\n\x04hash\x18\x02 \x01(\t\x12\x10\n\x08hashFunc\x18\x03 \x01(\t\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1f\n\x0fGetLinksRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\"/\n\x10GetLinksResponse\x12\x1b\n\x05links\x18\x01 \x03(\x0b\x32\x0c.pb.IPLDLink\"4\n\x08IPLDLink\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\"5\n\x08IPLDNode\x12\x1b\n\x05links\x18\x02 \x03(\x0b\x32\x0c.pb.IPLDLink\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x32\xa1\x02\n\x06\x44\x61gAPI\x12\x31\n\x06\x44\x61gPut\x12\x11.pb.DagPutRequest\x1a\x12.pb.DagPutResponse\"\x00\x12\x31\n\x06\x44\x61gGet\x12\x11.pb.DagGetRequest\x1a\x12.pb.DagGetResponse\"\x00\x12;\n\x0bNewIPLDNode\x12\x16.pb.NewIPLDNodeRequest\x1a\x12.pb.DagPutResponse\"\x00\x12;\n\x0e\x41\x64\x64LinksToNode\x12\x13.pb.AddLinksRequest\x1a\x12.pb.DagPutResponse\"\x00\x12\x37\n\x08GetLinks\x12\x13.pb.GetLinksRequest\x1a\x14.pb.GetLinksResponse\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') - , - dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + serialized_options=None, + serialized_pb=_b('\n\tdag.proto\x12\x02pb\" \n\x0e\x44\x61gPutResponse\x12\x0e\n\x06hashes\x18\x01 \x03(\t\"x\n\rDagPutRequest\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x16\n\x0eobjectEncoding\x18\x02 \x01(\t\x12\x1b\n\x13serializationFormat\x18\x03 \x01(\t\x12\x10\n\x08hashFunc\x18\x04 \x01(\t\x12\x12\n\ncidVersion\x18\x05 \x01(\x03\"\x1d\n\rDagGetRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\"!\n\x0e\x44\x61gGetResponse\x12\x0f\n\x07rawData\x18\x01 \x01(\x0c\"\x94\x01\n\x12NewIPLDNodeRequest\x12\x30\n\x05links\x18\x01 \x03(\x0b\x32!.pb.NewIPLDNodeRequest.LinksEntry\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x10\n\x08hashFunc\x18\x03 \x01(\t\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x8e\x01\n\x0f\x41\x64\x64LinksRequest\x12-\n\x05links\x18\x01 \x03(\x0b\x32\x1e.pb.AddLinksRequest.LinksEntry\x12\x0c\n\x04hash\x18\x02 \x01(\t\x12\x10\n\x08hashFunc\x18\x03 \x01(\t\x1a,\n\nLinksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x1f\n\x0fGetLinksRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\"/\n\x10GetLinksResponse\x12\x1b\n\x05links\x18\x01 \x03(\x0b\x32\x0c.pb.IPLDLink\"4\n\x08IPLDLink\x12\x0c\n\x04hash\x18\x01 \x01(\x0c\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\x0c\n\x04size\x18\x03 \x01(\x04\"5\n\x08IPLDNode\x12\x1b\n\x05links\x18\x02 \x03(\x0b\x32\x0c.pb.IPLDLink\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x32\xa1\x02\n\x06\x44\x61gAPI\x12\x31\n\x06\x44\x61gPut\x12\x11.pb.DagPutRequest\x1a\x12.pb.DagPutResponse\"\x00\x12\x31\n\x06\x44\x61gGet\x12\x11.pb.DagGetRequest\x1a\x12.pb.DagGetResponse\"\x00\x12;\n\x0bNewIPLDNode\x12\x16.pb.NewIPLDNodeRequest\x1a\x12.pb.DagPutResponse\"\x00\x12;\n\x0e\x41\x64\x64LinksToNode\x12\x13.pb.AddLinksRequest\x1a\x12.pb.DagPutResponse\"\x00\x12\x37\n\x08GetLinks\x12\x13.pb.GetLinksRequest\x1a\x14.pb.GetLinksResponse\"\x00\x62\x06proto3') +) @@ -54,8 +52,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=64, - serialized_end=96, + serialized_start=17, + serialized_end=49, ) @@ -113,8 +111,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=98, - serialized_end=218, + serialized_start=51, + serialized_end=171, ) @@ -144,8 +142,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=220, - serialized_end=249, + serialized_start=173, + serialized_end=202, ) @@ -175,8 +173,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=251, - serialized_end=284, + serialized_start=204, + serialized_end=237, ) @@ -213,8 +211,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=391, - serialized_end=435, + serialized_start=344, + serialized_end=388, ) _NEWIPLDNODEREQUEST = _descriptor.Descriptor( @@ -257,8 +255,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=287, - serialized_end=435, + serialized_start=240, + serialized_end=388, ) @@ -295,8 +293,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=391, - serialized_end=435, + serialized_start=344, + serialized_end=388, ) _ADDLINKSREQUEST = _descriptor.Descriptor( @@ -339,8 +337,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=438, - serialized_end=580, + serialized_start=391, + serialized_end=533, ) @@ -370,8 +368,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=582, - serialized_end=613, + serialized_start=535, + serialized_end=566, ) @@ -401,8 +399,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=615, - serialized_end=662, + serialized_start=568, + serialized_end=615, ) @@ -446,8 +444,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=664, - serialized_end=716, + serialized_start=617, + serialized_end=669, ) @@ -484,8 +482,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=718, - serialized_end=771, + serialized_start=671, + serialized_end=724, ) _NEWIPLDNODEREQUEST_LINKSENTRY.containing_type = _NEWIPLDNODEREQUEST @@ -593,7 +591,6 @@ _sym_db.RegisterMessage(IPLDNode) -DESCRIPTOR._options = None _NEWIPLDNODEREQUEST_LINKSENTRY._options = None _ADDLINKSREQUEST_LINKSENTRY._options = None @@ -603,8 +600,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=774, - serialized_end=1063, + serialized_start=727, + serialized_end=1016, methods=[ _descriptor.MethodDescriptor( name='DagPut', diff --git a/py/file_pb2.py b/py/file_pb2.py index b4a8cb5..05d90ed 100644 --- a/py/file_pb2.py +++ b/py/file_pb2.py @@ -14,17 +14,16 @@ import util_pb2 as util__pb2 -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='file.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\nfile.proto\x12\x02pb\x1a\nutil.proto\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"K\n\rUploadRequest\x12\x16\n\x04\x62lob\x18\x01 \x01(\x0b\x32\x08.pb.Blob\x12\"\n\x07options\x18\x02 \x01(\x0b\x32\x11.pb.UploadOptions\"C\n\rUploadOptions\x12\x11\n\tmultiHash\x18\x01 \x01(\t\x12\x0e\n\x06layout\x18\x02 \x01(\t\x12\x0f\n\x07\x63hunker\x18\x03 \x01(\t\"2\n\x0f\x44ownloadRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x11\n\tchunkSize\x18\x02 \x01(\x05\"*\n\x10\x44ownloadResponse\x12\x16\n\x04\x62lob\x18\x01 \x01(\x0b\x32\x08.pb.Blob\"\x17\n\x04\x42lob\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x32~\n\x07\x46ileAPI\x12\x34\n\nUploadFile\x12\x11.pb.UploadRequest\x1a\x0f.pb.PutResponse\"\x00(\x01\x12=\n\x0c\x44ownloadFile\x12\x13.pb.DownloadRequest\x1a\x14.pb.DownloadResponse\"\x00\x30\x01\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') + serialized_options=None, + serialized_pb=_b('\n\nfile.proto\x12\x02pb\x1a\nutil.proto\"K\n\rUploadRequest\x12\x16\n\x04\x62lob\x18\x01 \x01(\x0b\x32\x08.pb.Blob\x12\"\n\x07options\x18\x02 \x01(\x0b\x32\x11.pb.UploadOptions\"C\n\rUploadOptions\x12\x11\n\tmultiHash\x18\x01 \x01(\t\x12\x0e\n\x06layout\x18\x02 \x01(\t\x12\x0f\n\x07\x63hunker\x18\x03 \x01(\t\"2\n\x0f\x44ownloadRequest\x12\x0c\n\x04hash\x18\x01 \x01(\t\x12\x11\n\tchunkSize\x18\x02 \x01(\x05\"*\n\x10\x44ownloadResponse\x12\x16\n\x04\x62lob\x18\x01 \x01(\x0b\x32\x08.pb.Blob\"\x17\n\x04\x42lob\x12\x0f\n\x07\x63ontent\x18\x01 \x01(\x0c\x32~\n\x07\x46ileAPI\x12\x34\n\nUploadFile\x12\x11.pb.UploadRequest\x1a\x0f.pb.PutResponse\"\x00(\x01\x12=\n\x0c\x44ownloadFile\x12\x13.pb.DownloadRequest\x1a\x14.pb.DownloadResponse\"\x00\x30\x01\x62\x06proto3') , - dependencies=[util__pb2.DESCRIPTOR,github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + dependencies=[util__pb2.DESCRIPTOR,]) @@ -62,8 +61,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=77, - serialized_end=152, + serialized_start=30, + serialized_end=105, ) @@ -107,8 +106,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=154, - serialized_end=221, + serialized_start=107, + serialized_end=174, ) @@ -145,8 +144,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=223, - serialized_end=273, + serialized_start=176, + serialized_end=226, ) @@ -176,8 +175,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=275, - serialized_end=317, + serialized_start=228, + serialized_end=270, ) @@ -207,8 +206,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=319, - serialized_end=342, + serialized_start=272, + serialized_end=295, ) _UPLOADREQUEST.fields_by_name['blob'].message_type = _BLOB @@ -257,7 +256,6 @@ _sym_db.RegisterMessage(Blob) -DESCRIPTOR._options = None _FILEAPI = _descriptor.ServiceDescriptor( name='FileAPI', @@ -265,8 +263,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=344, - serialized_end=470, + serialized_start=297, + serialized_end=423, methods=[ _descriptor.MethodDescriptor( name='UploadFile', diff --git a/py/keystore_pb2.py b/py/keystore_pb2.py index 42c1969..30bd22d 100644 --- a/py/keystore_pb2.py +++ b/py/keystore_pb2.py @@ -13,17 +13,15 @@ _sym_db = _symbol_database.Default() -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='keystore.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\x0ekeystore.proto\x12\x02pb\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"3\n\x0fKeystoreRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\"H\n\x10KeystoreResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\x12\x10\n\x08keyNames\x18\x03 \x03(\t2\xbd\x02\n\x0bKeystoreAPI\x12:\n\x0bKeystoreHas\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12:\n\x0bKeystoreGet\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12:\n\x0bKeystorePut\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12=\n\x0eKeystoreDelete\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12;\n\x0cKeystoreList\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') - , - dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + serialized_options=None, + serialized_pb=_b('\n\x0ekeystore.proto\x12\x02pb\"3\n\x0fKeystoreRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\"H\n\x10KeystoreResponse\x12\x0e\n\x06status\x18\x01 \x01(\t\x12\x12\n\nprivateKey\x18\x02 \x01(\x0c\x12\x10\n\x08keyNames\x18\x03 \x03(\t2\xbd\x02\n\x0bKeystoreAPI\x12:\n\x0bKeystoreHas\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12:\n\x0bKeystoreGet\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12:\n\x0bKeystorePut\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12=\n\x0eKeystoreDelete\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x12;\n\x0cKeystoreList\x12\x13.pb.KeystoreRequest\x1a\x14.pb.KeystoreResponse\"\x00\x62\x06proto3') +) @@ -61,8 +59,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=69, - serialized_end=120, + serialized_start=22, + serialized_end=73, ) @@ -106,8 +104,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=122, - serialized_end=194, + serialized_start=75, + serialized_end=147, ) DESCRIPTOR.message_types_by_name['KeystoreRequest'] = _KEYSTOREREQUEST @@ -129,7 +127,6 @@ _sym_db.RegisterMessage(KeystoreResponse) -DESCRIPTOR._options = None _KEYSTOREAPI = _descriptor.ServiceDescriptor( name='KeystoreAPI', @@ -137,8 +134,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=197, - serialized_end=514, + serialized_start=150, + serialized_end=467, methods=[ _descriptor.MethodDescriptor( name='KeystoreHas', diff --git a/py/namesys_pb2.py b/py/namesys_pb2.py index a5369e6..42bcfc6 100644 --- a/py/namesys_pb2.py +++ b/py/namesys_pb2.py @@ -14,17 +14,16 @@ import util_pb2 as util__pb2 -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='namesys.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\rnamesys.proto\x12\x02pb\x1a\nutil.proto\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"`\n\x15NameSysResolveRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x16\n\x0e\x64htRecordCount\x18\x03 \x01(\r\x12\x12\n\ndhtTimeout\x18\x04 \x01(\x05\"3\n\x14NameSysResolveResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"T\n\x15NameSysPublishRequest\x12\x12\n\nprivateKey\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0b\n\x03\x65ol\x18\x03 \x01(\x05\x12\x0b\n\x03ttl\x18\x04 \x01(\x05\x32\xdf\x01\n\nNameSysAPI\x12G\n\x0eNameSysResolve\x12\x19.pb.NameSysResolveRequest\x1a\x18.pb.NameSysResolveResult\"\x00\x12N\n\x13NameSysResolveAsync\x12\x19.pb.NameSysResolveRequest\x1a\x18.pb.NameSysResolveResult\"\x00\x30\x01\x12\x38\n\x0eNameSysPublish\x12\x19.pb.NameSysPublishRequest\x1a\t.pb.Empty\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') + serialized_options=None, + serialized_pb=_b('\n\rnamesys.proto\x12\x02pb\x1a\nutil.proto\"`\n\x15NameSysResolveRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x16\n\x0e\x64htRecordCount\x18\x03 \x01(\r\x12\x12\n\ndhtTimeout\x18\x04 \x01(\x05\"3\n\x14NameSysResolveResult\x12\x0c\n\x04path\x18\x01 \x01(\t\x12\r\n\x05\x65rror\x18\x02 \x01(\t\"T\n\x15NameSysPublishRequest\x12\x12\n\nprivateKey\x18\x01 \x01(\x0c\x12\r\n\x05value\x18\x02 \x01(\t\x12\x0b\n\x03\x65ol\x18\x03 \x01(\x05\x12\x0b\n\x03ttl\x18\x04 \x01(\x05\x32\xdf\x01\n\nNameSysAPI\x12G\n\x0eNameSysResolve\x12\x19.pb.NameSysResolveRequest\x1a\x18.pb.NameSysResolveResult\"\x00\x12N\n\x13NameSysResolveAsync\x12\x19.pb.NameSysResolveRequest\x1a\x18.pb.NameSysResolveResult\"\x00\x30\x01\x12\x38\n\x0eNameSysPublish\x12\x19.pb.NameSysPublishRequest\x1a\t.pb.Empty\"\x00\x62\x06proto3') , - dependencies=[util__pb2.DESCRIPTOR,github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + dependencies=[util__pb2.DESCRIPTOR,]) @@ -76,8 +75,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=80, - serialized_end=176, + serialized_start=33, + serialized_end=129, ) @@ -114,8 +113,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=178, - serialized_end=229, + serialized_start=131, + serialized_end=182, ) @@ -166,8 +165,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=231, - serialized_end=315, + serialized_start=184, + serialized_end=268, ) DESCRIPTOR.message_types_by_name['NameSysResolveRequest'] = _NAMESYSRESOLVEREQUEST @@ -197,7 +196,6 @@ _sym_db.RegisterMessage(NameSysPublishRequest) -DESCRIPTOR._options = None _NAMESYSAPI = _descriptor.ServiceDescriptor( name='NameSysAPI', @@ -205,8 +203,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=318, - serialized_end=541, + serialized_start=271, + serialized_end=494, methods=[ _descriptor.MethodDescriptor( name='NameSysResolve', diff --git a/py/node_pb2.py b/py/node_pb2.py index ece6aaf..c3e10d9 100644 --- a/py/node_pb2.py +++ b/py/node_pb2.py @@ -15,17 +15,16 @@ import util_pb2 as util__pb2 -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='node.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\nnode.proto\x12\x02pb\x1a\nutil.proto\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"\xde\x01\n\nP2PRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\x0b\n\x03\x61ll\x18\x02 \x01(\x08\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\x12\x14\n\x0cprotocolName\x18\x04 \x01(\t\x12\x15\n\rlistenAddress\x18\x05 \x01(\t\x12\x15\n\rtargetAddress\x18\x06 \x01(\t\x12\x15\n\rremoteAddress\x18\x07 \x01(\t\x12\x1c\n\x14\x61llowCustomProtocols\x18\x08 \x01(\x08\x12\x14\n\x0creportPeerID\x18\t \x01(\x08\"z\n\x0bP2PResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\r\n\x05names\x18\x02 \x03(\t\x12\x13\n\x0b\x63onnsClosed\x18\x03 \x01(\x05\x12\"\n\x0bstreamInfos\x18\x04 \x03(\x0b\x32\r.pb.P2PLsInfo\"^\n\tP2PLsInfo\x12\x14\n\x0cprotocolName\x18\x01 \x01(\t\x12\x15\n\rlistenAddress\x18\x02 \x01(\t\x12\x15\n\rtargetAddress\x18\x03 \x01(\t\x12\r\n\x05local\x18\x04 \x01(\x08\"#\n\x10GetPeersResponse\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"$\n\x0e\x43onnectRequest\x12\x12\n\nmultiAddrs\x18\x01 \x03(\t\"%\n\x12IsConnectedRequest\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"\x82\x01\n\x13IsConnectedResponse\x12\x39\n\tconnected\x18\x01 \x03(\x0b\x32&.pb.IsConnectedResponse.ConnectedEntry\x1a\x30\n\x0e\x43onnectedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"$\n\x11\x44isconnectRequest\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"\xd4\x01\n\x12\x44isconnectResponse\x12\x32\n\x06status\x18\x01 \x03(\x0b\x32\".pb.DisconnectResponse.StatusEntry\x1aS\n\x0bStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.pb.DisconnectResponse.StatusMessage:\x02\x38\x01\x1a\x35\n\rStatusMessage\x12\x14\n\x0c\x64isconnected\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\"<\n\x13\x45nableExtrasRequest\x12%\n\rextrasFeature\x18\x01 \x01(\x0e\x32\x0e.pb.EXTRASTYPE\"=\n\x14\x44isableExtrasRequest\x12%\n\rextrasFeature\x18\x01 \x01(\x0e\x32\x0e.pb.EXTRASTYPE*8\n\nP2PREQTYPE\x12\t\n\x05\x43LOSE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\n\n\x06LISTEN\x10\x02\x12\x06\n\x02LS\x10\x03*5\n\nEXTRASTYPE\x12\x0c\n\x08IDENTIFY\x10\x00\x12\n\n\x06PUBSUB\x10\x01\x12\r\n\tDISCOVERY\x10\x02\x32\xfd\x02\n\x07NodeAPI\x12-\n\x08GetPeers\x12\t.pb.Empty\x1a\x14.pb.GetPeersResponse\"\x00\x12*\n\x07\x43onnect\x12\x12.pb.ConnectRequest\x1a\t.pb.Empty\"\x00\x12=\n\nDisconnect\x12\x15.pb.DisconnectRequest\x1a\x16.pb.DisconnectResponse\"\x00\x12@\n\x0bIsConnected\x12\x16.pb.IsConnectedRequest\x1a\x17.pb.IsConnectedResponse\"\x00\x12\x34\n\x0c\x45nableExtras\x12\x17.pb.EnableExtrasRequest\x1a\t.pb.Empty\"\x00\x12\x36\n\rDisableExtras\x12\x18.pb.DisableExtrasRequest\x1a\t.pb.Empty\"\x00\x12(\n\x03P2P\x12\x0e.pb.P2PRequest\x1a\x0f.pb.P2PResponse\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') + serialized_options=None, + serialized_pb=_b('\n\nnode.proto\x12\x02pb\x1a\nutil.proto\"\xde\x01\n\nP2PRequest\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\x0b\n\x03\x61ll\x18\x02 \x01(\x08\x12\x0f\n\x07verbose\x18\x03 \x01(\x08\x12\x14\n\x0cprotocolName\x18\x04 \x01(\t\x12\x15\n\rlistenAddress\x18\x05 \x01(\t\x12\x15\n\rtargetAddress\x18\x06 \x01(\t\x12\x15\n\rremoteAddress\x18\x07 \x01(\t\x12\x1c\n\x14\x61llowCustomProtocols\x18\x08 \x01(\x08\x12\x14\n\x0creportPeerID\x18\t \x01(\x08\"z\n\x0bP2PResponse\x12#\n\x0brequestType\x18\x01 \x01(\x0e\x32\x0e.pb.P2PREQTYPE\x12\r\n\x05names\x18\x02 \x03(\t\x12\x13\n\x0b\x63onnsClosed\x18\x03 \x01(\x05\x12\"\n\x0bstreamInfos\x18\x04 \x03(\x0b\x32\r.pb.P2PLsInfo\"^\n\tP2PLsInfo\x12\x14\n\x0cprotocolName\x18\x01 \x01(\t\x12\x15\n\rlistenAddress\x18\x02 \x01(\t\x12\x15\n\rtargetAddress\x18\x03 \x01(\t\x12\r\n\x05local\x18\x04 \x01(\x08\"#\n\x10GetPeersResponse\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"$\n\x0e\x43onnectRequest\x12\x12\n\nmultiAddrs\x18\x01 \x03(\t\"%\n\x12IsConnectedRequest\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"\x82\x01\n\x13IsConnectedResponse\x12\x39\n\tconnected\x18\x01 \x03(\x0b\x32&.pb.IsConnectedResponse.ConnectedEntry\x1a\x30\n\x0e\x43onnectedEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"$\n\x11\x44isconnectRequest\x12\x0f\n\x07peerIDs\x18\x01 \x03(\t\"\xd4\x01\n\x12\x44isconnectResponse\x12\x32\n\x06status\x18\x01 \x03(\x0b\x32\".pb.DisconnectResponse.StatusEntry\x1aS\n\x0bStatusEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x33\n\x05value\x18\x02 \x01(\x0b\x32$.pb.DisconnectResponse.StatusMessage:\x02\x38\x01\x1a\x35\n\rStatusMessage\x12\x14\n\x0c\x64isconnected\x18\x01 \x01(\x08\x12\x0e\n\x06reason\x18\x02 \x01(\t\"<\n\x13\x45nableExtrasRequest\x12%\n\rextrasFeature\x18\x01 \x01(\x0e\x32\x0e.pb.EXTRASTYPE\"=\n\x14\x44isableExtrasRequest\x12%\n\rextrasFeature\x18\x01 \x01(\x0e\x32\x0e.pb.EXTRASTYPE*8\n\nP2PREQTYPE\x12\t\n\x05\x43LOSE\x10\x00\x12\x0b\n\x07\x46ORWARD\x10\x01\x12\n\n\x06LISTEN\x10\x02\x12\x06\n\x02LS\x10\x03*5\n\nEXTRASTYPE\x12\x0c\n\x08IDENTIFY\x10\x00\x12\n\n\x06PUBSUB\x10\x01\x12\r\n\tDISCOVERY\x10\x02\x32\xfd\x02\n\x07NodeAPI\x12-\n\x08GetPeers\x12\t.pb.Empty\x1a\x14.pb.GetPeersResponse\"\x00\x12*\n\x07\x43onnect\x12\x12.pb.ConnectRequest\x1a\t.pb.Empty\"\x00\x12=\n\nDisconnect\x12\x15.pb.DisconnectRequest\x1a\x16.pb.DisconnectResponse\"\x00\x12@\n\x0bIsConnected\x12\x16.pb.IsConnectedRequest\x1a\x17.pb.IsConnectedResponse\"\x00\x12\x34\n\x0c\x45nableExtras\x12\x17.pb.EnableExtrasRequest\x1a\t.pb.Empty\"\x00\x12\x36\n\rDisableExtras\x12\x18.pb.DisableExtrasRequest\x1a\t.pb.Empty\"\x00\x12(\n\x03P2P\x12\x0e.pb.P2PRequest\x1a\x0f.pb.P2PResponse\"\x00\x62\x06proto3') , - dependencies=[util__pb2.DESCRIPTOR,github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + dependencies=[util__pb2.DESCRIPTOR,]) _P2PREQTYPE = _descriptor.EnumDescriptor( name='P2PREQTYPE', @@ -52,8 +51,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1147, - serialized_end=1203, + serialized_start=1100, + serialized_end=1156, ) _sym_db.RegisterEnumDescriptor(_P2PREQTYPE) @@ -79,8 +78,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=1205, - serialized_end=1258, + serialized_start=1158, + serialized_end=1211, ) _sym_db.RegisterEnumDescriptor(_EXTRASTYPE) @@ -177,8 +176,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=78, - serialized_end=300, + serialized_start=31, + serialized_end=253, ) @@ -229,8 +228,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=302, - serialized_end=424, + serialized_start=255, + serialized_end=377, ) @@ -281,8 +280,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=426, - serialized_end=520, + serialized_start=379, + serialized_end=473, ) @@ -312,8 +311,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=522, - serialized_end=557, + serialized_start=475, + serialized_end=510, ) @@ -343,8 +342,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=559, - serialized_end=595, + serialized_start=512, + serialized_end=548, ) @@ -374,8 +373,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=597, - serialized_end=634, + serialized_start=550, + serialized_end=587, ) @@ -412,8 +411,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=719, - serialized_end=767, + serialized_start=672, + serialized_end=720, ) _ISCONNECTEDRESPONSE = _descriptor.Descriptor( @@ -442,8 +441,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=637, - serialized_end=767, + serialized_start=590, + serialized_end=720, ) @@ -473,8 +472,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=769, - serialized_end=805, + serialized_start=722, + serialized_end=758, ) @@ -511,8 +510,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=882, - serialized_end=965, + serialized_start=835, + serialized_end=918, ) _DISCONNECTRESPONSE_STATUSMESSAGE = _descriptor.Descriptor( @@ -548,8 +547,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=967, - serialized_end=1020, + serialized_start=920, + serialized_end=973, ) _DISCONNECTRESPONSE = _descriptor.Descriptor( @@ -578,8 +577,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=808, - serialized_end=1020, + serialized_start=761, + serialized_end=973, ) @@ -609,8 +608,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1022, - serialized_end=1082, + serialized_start=975, + serialized_end=1035, ) @@ -640,8 +639,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1084, - serialized_end=1145, + serialized_start=1037, + serialized_end=1098, ) _P2PREQUEST.fields_by_name['requestType'].enum_type = _P2PREQTYPE @@ -772,7 +771,6 @@ _sym_db.RegisterMessage(DisableExtrasRequest) -DESCRIPTOR._options = None _ISCONNECTEDRESPONSE_CONNECTEDENTRY._options = None _DISCONNECTRESPONSE_STATUSENTRY._options = None @@ -782,8 +780,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=1261, - serialized_end=1642, + serialized_start=1214, + serialized_end=1595, methods=[ _descriptor.MethodDescriptor( name='GetPeers', diff --git a/py/pubsub_pb2.py b/py/pubsub_pb2.py index 6165380..7e261a7 100644 --- a/py/pubsub_pb2.py +++ b/py/pubsub_pb2.py @@ -14,17 +14,16 @@ import util_pb2 as util__pb2 -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='pubsub.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\x0cpubsub.proto\x12\x02pb\x1a\nutil.proto\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"(\n\x16PubSubListPeersRequest\x12\x0e\n\x06topics\x18\x01 \x03(\t\"q\n\x17PubSubListPeersResponse\x12/\n\x05peers\x18\x01 \x03(\x0b\x32 .pb.PubSubListPeersResponse.Peer\x1a%\n\x04Peer\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0e\n\x06peerID\x18\x02 \x01(\t\"F\n\x14PubSubPublishRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x11\n\tadvertise\x18\x03 \x01(\x08\"9\n\x16PubSubSubscribeRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x10\n\x08\x64iscover\x18\x02 \x01(\x08\"%\n\x14PubSubTopicsResponse\x12\r\n\x05names\x18\x01 \x03(\t\"t\n\x15PubSubMessageResponse\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c\x32\x9b\x02\n\tPubSubAPI\x12\x38\n\x0fPubSubGetTopics\x12\t.pb.Empty\x1a\x18.pb.PubSubTopicsResponse\"\x00\x12L\n\x0fPubSubListPeers\x12\x1a.pb.PubSubListPeersRequest\x1a\x1b.pb.PubSubListPeersResponse\"\x00\x12L\n\x0fPubSubSubscribe\x12\x1a.pb.PubSubSubscribeRequest\x1a\x19.pb.PubSubMessageResponse\"\x00\x30\x01\x12\x38\n\rPubSubPublish\x12\x18.pb.PubSubPublishRequest\x1a\t.pb.Empty\"\x00(\x01\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') + serialized_options=None, + serialized_pb=_b('\n\x0cpubsub.proto\x12\x02pb\x1a\nutil.proto\"(\n\x16PubSubListPeersRequest\x12\x0e\n\x06topics\x18\x01 \x03(\t\"q\n\x17PubSubListPeersResponse\x12/\n\x05peers\x18\x01 \x03(\x0b\x32 .pb.PubSubListPeersResponse.Peer\x1a%\n\x04Peer\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0e\n\x06peerID\x18\x02 \x01(\t\"F\n\x14PubSubPublishRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\x11\n\tadvertise\x18\x03 \x01(\x08\"9\n\x16PubSubSubscribeRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x10\n\x08\x64iscover\x18\x02 \x01(\x08\"%\n\x14PubSubTopicsResponse\x12\r\n\x05names\x18\x01 \x03(\t\"t\n\x15PubSubMessageResponse\x12\x0c\n\x04\x66rom\x18\x01 \x01(\x0c\x12\x0c\n\x04\x64\x61ta\x18\x02 \x01(\x0c\x12\r\n\x05seqno\x18\x03 \x01(\x0c\x12\x10\n\x08topicIDs\x18\x04 \x03(\t\x12\x11\n\tsignature\x18\x05 \x01(\x0c\x12\x0b\n\x03key\x18\x06 \x01(\x0c\x32\x9b\x02\n\tPubSubAPI\x12\x38\n\x0fPubSubGetTopics\x12\t.pb.Empty\x1a\x18.pb.PubSubTopicsResponse\"\x00\x12L\n\x0fPubSubListPeers\x12\x1a.pb.PubSubListPeersRequest\x1a\x1b.pb.PubSubListPeersResponse\"\x00\x12L\n\x0fPubSubSubscribe\x12\x1a.pb.PubSubSubscribeRequest\x1a\x19.pb.PubSubMessageResponse\"\x00\x30\x01\x12\x38\n\rPubSubPublish\x12\x18.pb.PubSubPublishRequest\x1a\t.pb.Empty\"\x00(\x01\x62\x06proto3') , - dependencies=[util__pb2.DESCRIPTOR,github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + dependencies=[util__pb2.DESCRIPTOR,]) @@ -55,8 +54,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=79, - serialized_end=119, + serialized_start=32, + serialized_end=72, ) @@ -93,8 +92,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=197, - serialized_end=234, + serialized_start=150, + serialized_end=187, ) _PUBSUBLISTPEERSRESPONSE = _descriptor.Descriptor( @@ -123,8 +122,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=121, - serialized_end=234, + serialized_start=74, + serialized_end=187, ) @@ -168,8 +167,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=236, - serialized_end=306, + serialized_start=189, + serialized_end=259, ) @@ -206,8 +205,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=308, - serialized_end=365, + serialized_start=261, + serialized_end=318, ) @@ -237,8 +236,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=367, - serialized_end=404, + serialized_start=320, + serialized_end=357, ) @@ -303,8 +302,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=406, - serialized_end=522, + serialized_start=359, + serialized_end=475, ) _PUBSUBLISTPEERSRESPONSE_PEER.containing_type = _PUBSUBLISTPEERSRESPONSE @@ -368,7 +367,6 @@ _sym_db.RegisterMessage(PubSubMessageResponse) -DESCRIPTOR._options = None _PUBSUBAPI = _descriptor.ServiceDescriptor( name='PubSubAPI', @@ -376,8 +374,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=525, - serialized_end=808, + serialized_start=478, + serialized_end=761, methods=[ _descriptor.MethodDescriptor( name='PubSubGetTopics', diff --git a/py/status_pb2.py b/py/status_pb2.py index 55bf43e..74cdbf5 100644 --- a/py/status_pb2.py +++ b/py/status_pb2.py @@ -15,17 +15,16 @@ import util_pb2 as util__pb2 -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='status.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\x0cstatus.proto\x12\x02pb\x1a\nutil.proto\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"\"\n\x0fVersionResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\"=\n\x0eStatusResponse\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x1d\n\x06status\x18\x02 \x01(\x0e\x32\r.pb.APISTATUS*I\n\tAPISTATUS\x12\n\n\x06ONLINE\x10\x00\x12\x0b\n\x07PURGING\x10\x01\x12\x18\n\x14\x44\x45GRADED_PERFORMANCE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\x63\n\tStatusAPI\x12+\n\x07Version\x12\t.pb.Empty\x1a\x13.pb.VersionResponse\"\x00\x12)\n\x06Status\x12\t.pb.Empty\x1a\x12.pb.StatusResponse\"\x00\x42(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') + serialized_options=None, + serialized_pb=_b('\n\x0cstatus.proto\x12\x02pb\x1a\nutil.proto\"\"\n\x0fVersionResponse\x12\x0f\n\x07version\x18\x01 \x01(\t\"=\n\x0eStatusResponse\x12\x0c\n\x04host\x18\x01 \x01(\t\x12\x1d\n\x06status\x18\x02 \x01(\x0e\x32\r.pb.APISTATUS*I\n\tAPISTATUS\x12\n\n\x06ONLINE\x10\x00\x12\x0b\n\x07PURGING\x10\x01\x12\x18\n\x14\x44\x45GRADED_PERFORMANCE\x10\x02\x12\t\n\x05\x45RROR\x10\x03\x32\x63\n\tStatusAPI\x12+\n\x07Version\x12\t.pb.Empty\x1a\x13.pb.VersionResponse\"\x00\x12)\n\x06Status\x12\t.pb.Empty\x1a\x12.pb.StatusResponse\"\x00\x62\x06proto3') , - dependencies=[util__pb2.DESCRIPTOR,github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + dependencies=[util__pb2.DESCRIPTOR,]) _APISTATUS = _descriptor.EnumDescriptor( name='APISTATUS', @@ -52,8 +51,8 @@ ], containing_type=None, serialized_options=None, - serialized_start=178, - serialized_end=251, + serialized_start=131, + serialized_end=204, ) _sym_db.RegisterEnumDescriptor(_APISTATUS) @@ -91,8 +90,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=79, - serialized_end=113, + serialized_start=32, + serialized_end=66, ) @@ -129,8 +128,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=115, - serialized_end=176, + serialized_start=68, + serialized_end=129, ) _STATUSRESPONSE.fields_by_name['status'].enum_type = _APISTATUS @@ -154,7 +153,6 @@ _sym_db.RegisterMessage(StatusResponse) -DESCRIPTOR._options = None _STATUSAPI = _descriptor.ServiceDescriptor( name='StatusAPI', @@ -162,8 +160,8 @@ file=DESCRIPTOR, index=0, serialized_options=None, - serialized_start=253, - serialized_end=352, + serialized_start=206, + serialized_end=305, methods=[ _descriptor.MethodDescriptor( name='Version', diff --git a/py/util_pb2.py b/py/util_pb2.py index f4151ec..5188b1d 100644 --- a/py/util_pb2.py +++ b/py/util_pb2.py @@ -13,17 +13,15 @@ _sym_db = _symbol_database.Default() -from github.com.gogo.protobuf.gogoproto import gogo_pb2 as github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2 DESCRIPTOR = _descriptor.FileDescriptor( name='util.proto', package='pb', syntax='proto3', - serialized_options=_b('\360\341\036\001\250\342\036\001\340\341\036\001\330\341\036\000\200\342\036\001\370\341\036\001\270\342\036\001\310\342\036\001\340\342\036\001\320\342\036\001'), - serialized_pb=_b('\n\nutil.proto\x12\x02pb\x1a-github.com/gogo/protobuf/gogoproto/gogo.proto\"\x1b\n\x0bPutResponse\x12\x0c\n\x04hash\x18\x01 \x01(\t\"\x07\n\x05\x45mptyB(\xf0\xe1\x1e\x01\xa8\xe2\x1e\x01\xe0\xe1\x1e\x01\xd8\xe1\x1e\x00\x80\xe2\x1e\x01\xf8\xe1\x1e\x01\xb8\xe2\x1e\x01\xc8\xe2\x1e\x01\xe0\xe2\x1e\x01\xd0\xe2\x1e\x01\x62\x06proto3') - , - dependencies=[github_dot_com_dot_gogo_dot_protobuf_dot_gogoproto_dot_gogo__pb2.DESCRIPTOR,]) + serialized_options=None, + serialized_pb=_b('\n\nutil.proto\x12\x02pb\"\x1b\n\x0bPutResponse\x12\x0c\n\x04hash\x18\x01 \x01(\t\"\x07\n\x05\x45mptyb\x06proto3') +) @@ -54,8 +52,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=65, - serialized_end=92, + serialized_start=18, + serialized_end=45, ) @@ -78,8 +76,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=94, - serialized_end=101, + serialized_start=47, + serialized_end=54, ) DESCRIPTOR.message_types_by_name['PutResponse'] = _PUTRESPONSE @@ -101,5 +99,4 @@ _sym_db.RegisterMessage(Empty) -DESCRIPTOR._options = None # @@protoc_insertion_point(module_scope) diff --git a/ts/admin_pb.d.ts b/ts/admin_pb.d.ts index 5cdbf5d..883987a 100644 --- a/ts/admin_pb.d.ts +++ b/ts/admin_pb.d.ts @@ -2,7 +2,6 @@ // file: admin.proto import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class BlockstoreRequest extends jspb.Message { clearCidsList(): void; diff --git a/ts/dag_pb.d.ts b/ts/dag_pb.d.ts index da1adf5..c88ff0c 100644 --- a/ts/dag_pb.d.ts +++ b/ts/dag_pb.d.ts @@ -2,7 +2,6 @@ // file: dag.proto import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class DagPutResponse extends jspb.Message { clearHashesList(): void; diff --git a/ts/file_pb.d.ts b/ts/file_pb.d.ts index 7fb5d99..fb149b1 100644 --- a/ts/file_pb.d.ts +++ b/ts/file_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as util_pb from "./util_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class UploadRequest extends jspb.Message { hasBlob(): boolean; diff --git a/ts/keystore_pb.d.ts b/ts/keystore_pb.d.ts index f68cfe8..5aa0480 100644 --- a/ts/keystore_pb.d.ts +++ b/ts/keystore_pb.d.ts @@ -2,7 +2,6 @@ // file: keystore.proto import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class KeystoreRequest extends jspb.Message { getName(): string; diff --git a/ts/namesys_pb.d.ts b/ts/namesys_pb.d.ts index cb3e144..8ba3d30 100644 --- a/ts/namesys_pb.d.ts +++ b/ts/namesys_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as util_pb from "./util_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class NameSysResolveRequest extends jspb.Message { getName(): string; diff --git a/ts/node_pb.d.ts b/ts/node_pb.d.ts index f1ddd50..7f8a93a 100644 --- a/ts/node_pb.d.ts +++ b/ts/node_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as util_pb from "./util_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class P2PRequest extends jspb.Message { getRequesttype(): P2PREQTYPEMap[keyof P2PREQTYPEMap]; diff --git a/ts/pubsub_pb.d.ts b/ts/pubsub_pb.d.ts index 2c14500..1c0f467 100644 --- a/ts/pubsub_pb.d.ts +++ b/ts/pubsub_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as util_pb from "./util_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class PubSubListPeersRequest extends jspb.Message { clearTopicsList(): void; diff --git a/ts/status_pb.d.ts b/ts/status_pb.d.ts index 72879df..e091db1 100644 --- a/ts/status_pb.d.ts +++ b/ts/status_pb.d.ts @@ -3,7 +3,6 @@ import * as jspb from "google-protobuf"; import * as util_pb from "./util_pb"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class VersionResponse extends jspb.Message { getVersion(): string; diff --git a/ts/util_pb.d.ts b/ts/util_pb.d.ts index 1e24622..a8287d8 100644 --- a/ts/util_pb.d.ts +++ b/ts/util_pb.d.ts @@ -2,7 +2,6 @@ // file: util.proto import * as jspb from "google-protobuf"; -import * as github_com_gogo_protobuf_gogoproto_gogo_pb from "./github.com/gogo/protobuf/gogoproto/gogo_pb"; export class PutResponse extends jspb.Message { getHash(): string;