- // Code generated by protoc-gen-gogo. DO NOT EDIT.
- // source: test.proto
-
- /*
- Package test is a generated protocol buffer package.
-
- It is generated from these files:
- test.proto
-
- It has these top-level messages:
- ResultStatus
- NodeInfo
- ID
- PubKey
- PubKeyEd25519
- */
- package test
-
- import proto "github.com/gogo/protobuf/proto"
- import fmt "fmt"
- import math "math"
-
- import io "io"
-
- // Reference imports to suppress errors if they are not otherwise used.
- var _ = proto.Marshal
- var _ = fmt.Errorf
- var _ = math.Inf
-
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the proto package it is being compiled against.
- // A compilation error at this line likely means your copy of the
- // proto package needs to be updated.
- const _ = proto.GoGoProtoPackageIsVersion2 // please upgrade the proto package
-
- type ResultStatus struct {
- NodeInfo *NodeInfo `protobuf:"bytes,1,opt,name=nodeInfo" json:"nodeInfo,omitempty"`
- PubKey *PubKey `protobuf:"bytes,2,req,name=pubKey" json:"pubKey,omitempty"`
- LatestBlockHash []byte `protobuf:"bytes,3,req,name=latestBlockHash" json:"latestBlockHash,omitempty"`
- LatestBlockHeight *int64 `protobuf:"varint,4,req,name=latestBlockHeight" json:"latestBlockHeight,omitempty"`
- LatestBlocktime *int64 `protobuf:"varint,5,req,name=latestBlocktime" json:"latestBlocktime,omitempty"`
- XXX_unrecognized []byte `json:"-"`
- }
-
- func (m *ResultStatus) Reset() { *m = ResultStatus{} }
- func (m *ResultStatus) String() string { return proto.CompactTextString(m) }
- func (*ResultStatus) ProtoMessage() {}
- func (*ResultStatus) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{0} }
-
- func (m *ResultStatus) GetNodeInfo() *NodeInfo {
- if m != nil {
- return m.NodeInfo
- }
- return nil
- }
-
- func (m *ResultStatus) GetPubKey() *PubKey {
- if m != nil {
- return m.PubKey
- }
- return nil
- }
-
- func (m *ResultStatus) GetLatestBlockHash() []byte {
- if m != nil {
- return m.LatestBlockHash
- }
- return nil
- }
-
- func (m *ResultStatus) GetLatestBlockHeight() int64 {
- if m != nil && m.LatestBlockHeight != nil {
- return *m.LatestBlockHeight
- }
- return 0
- }
-
- func (m *ResultStatus) GetLatestBlocktime() int64 {
- if m != nil && m.LatestBlocktime != nil {
- return *m.LatestBlocktime
- }
- return 0
- }
-
- type NodeInfo struct {
- Id *ID `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
- Moniker *string `protobuf:"bytes,2,req,name=moniker" json:"moniker,omitempty"`
- Network *string `protobuf:"bytes,3,req,name=network" json:"network,omitempty"`
- RemoteAddr *string `protobuf:"bytes,4,req,name=remoteAddr" json:"remoteAddr,omitempty"`
- ListenAddr *string `protobuf:"bytes,5,req,name=listenAddr" json:"listenAddr,omitempty"`
- Version *string `protobuf:"bytes,6,req,name=version" json:"version,omitempty"`
- Other []string `protobuf:"bytes,7,rep,name=other" json:"other,omitempty"`
- XXX_unrecognized []byte `json:"-"`
- }
-
- func (m *NodeInfo) Reset() { *m = NodeInfo{} }
- func (m *NodeInfo) String() string { return proto.CompactTextString(m) }
- func (*NodeInfo) ProtoMessage() {}
- func (*NodeInfo) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{1} }
-
- func (m *NodeInfo) GetId() *ID {
- if m != nil {
- return m.Id
- }
- return nil
- }
-
- func (m *NodeInfo) GetMoniker() string {
- if m != nil && m.Moniker != nil {
- return *m.Moniker
- }
- return ""
- }
-
- func (m *NodeInfo) GetNetwork() string {
- if m != nil && m.Network != nil {
- return *m.Network
- }
- return ""
- }
-
- func (m *NodeInfo) GetRemoteAddr() string {
- if m != nil && m.RemoteAddr != nil {
- return *m.RemoteAddr
- }
- return ""
- }
-
- func (m *NodeInfo) GetListenAddr() string {
- if m != nil && m.ListenAddr != nil {
- return *m.ListenAddr
- }
- return ""
- }
-
- func (m *NodeInfo) GetVersion() string {
- if m != nil && m.Version != nil {
- return *m.Version
- }
- return ""
- }
-
- func (m *NodeInfo) GetOther() []string {
- if m != nil {
- return m.Other
- }
- return nil
- }
-
- type ID struct {
- Id *string `protobuf:"bytes,1,req,name=id" json:"id,omitempty"`
- XXX_unrecognized []byte `json:"-"`
- }
-
- func (m *ID) Reset() { *m = ID{} }
- func (m *ID) String() string { return proto.CompactTextString(m) }
- func (*ID) ProtoMessage() {}
- func (*ID) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{2} }
-
- func (m *ID) GetId() string {
- if m != nil && m.Id != nil {
- return *m.Id
- }
- return ""
- }
-
- type PubKey struct {
- Ed25519 *PubKeyEd25519 `protobuf:"bytes,1,opt,name=ed25519" json:"ed25519,omitempty"`
- XXX_unrecognized []byte `json:"-"`
- }
-
- func (m *PubKey) Reset() { *m = PubKey{} }
- func (m *PubKey) String() string { return proto.CompactTextString(m) }
- func (*PubKey) ProtoMessage() {}
- func (*PubKey) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{3} }
-
- func (m *PubKey) GetEd25519() *PubKeyEd25519 {
- if m != nil {
- return m.Ed25519
- }
- return nil
- }
-
- type PubKeyEd25519 struct {
- Bytes []byte `protobuf:"bytes,1,req,name=bytes" json:"bytes,omitempty"`
- XXX_unrecognized []byte `json:"-"`
- }
-
- func (m *PubKeyEd25519) Reset() { *m = PubKeyEd25519{} }
- func (m *PubKeyEd25519) String() string { return proto.CompactTextString(m) }
- func (*PubKeyEd25519) ProtoMessage() {}
- func (*PubKeyEd25519) Descriptor() ([]byte, []int) { return fileDescriptorTest, []int{4} }
-
- func (m *PubKeyEd25519) GetBytes() []byte {
- if m != nil {
- return m.Bytes
- }
- return nil
- }
-
- func init() {
- proto.RegisterType((*ResultStatus)(nil), "ResultStatus")
- proto.RegisterType((*NodeInfo)(nil), "NodeInfo")
- proto.RegisterType((*ID)(nil), "ID")
- proto.RegisterType((*PubKey)(nil), "PubKey")
- proto.RegisterType((*PubKeyEd25519)(nil), "PubKeyEd25519")
- }
- func (m *ResultStatus) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
-
- func (m *ResultStatus) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.NodeInfo != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintTest(dAtA, i, uint64(m.NodeInfo.Size()))
- n1, err := m.NodeInfo.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n1
- }
- if m.PubKey == nil {
- return 0, proto.NewRequiredNotSetError("pubKey")
- } else {
- dAtA[i] = 0x12
- i++
- i = encodeVarintTest(dAtA, i, uint64(m.PubKey.Size()))
- n2, err := m.PubKey.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n2
- }
- if m.LatestBlockHash == nil {
- return 0, proto.NewRequiredNotSetError("latestBlockHash")
- } else {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(m.LatestBlockHash)))
- i += copy(dAtA[i:], m.LatestBlockHash)
- }
- if m.LatestBlockHeight == nil {
- return 0, proto.NewRequiredNotSetError("latestBlockHeight")
- } else {
- dAtA[i] = 0x20
- i++
- i = encodeVarintTest(dAtA, i, uint64(*m.LatestBlockHeight))
- }
- if m.LatestBlocktime == nil {
- return 0, proto.NewRequiredNotSetError("latestBlocktime")
- } else {
- dAtA[i] = 0x28
- i++
- i = encodeVarintTest(dAtA, i, uint64(*m.LatestBlocktime))
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
-
- func (m *NodeInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
-
- func (m *NodeInfo) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Id == nil {
- return 0, proto.NewRequiredNotSetError("id")
- } else {
- dAtA[i] = 0xa
- i++
- i = encodeVarintTest(dAtA, i, uint64(m.Id.Size()))
- n3, err := m.Id.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n3
- }
- if m.Moniker == nil {
- return 0, proto.NewRequiredNotSetError("moniker")
- } else {
- dAtA[i] = 0x12
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.Moniker)))
- i += copy(dAtA[i:], *m.Moniker)
- }
- if m.Network == nil {
- return 0, proto.NewRequiredNotSetError("network")
- } else {
- dAtA[i] = 0x1a
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.Network)))
- i += copy(dAtA[i:], *m.Network)
- }
- if m.RemoteAddr == nil {
- return 0, proto.NewRequiredNotSetError("remoteAddr")
- } else {
- dAtA[i] = 0x22
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.RemoteAddr)))
- i += copy(dAtA[i:], *m.RemoteAddr)
- }
- if m.ListenAddr == nil {
- return 0, proto.NewRequiredNotSetError("listenAddr")
- } else {
- dAtA[i] = 0x2a
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.ListenAddr)))
- i += copy(dAtA[i:], *m.ListenAddr)
- }
- if m.Version == nil {
- return 0, proto.NewRequiredNotSetError("version")
- } else {
- dAtA[i] = 0x32
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.Version)))
- i += copy(dAtA[i:], *m.Version)
- }
- if len(m.Other) > 0 {
- for _, s := range m.Other {
- dAtA[i] = 0x3a
- i++
- l = len(s)
- for l >= 1<<7 {
- dAtA[i] = uint8(uint64(l)&0x7f | 0x80)
- l >>= 7
- i++
- }
- dAtA[i] = uint8(l)
- i++
- i += copy(dAtA[i:], s)
- }
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
-
- func (m *ID) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
-
- func (m *ID) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Id == nil {
- return 0, proto.NewRequiredNotSetError("id")
- } else {
- dAtA[i] = 0xa
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(*m.Id)))
- i += copy(dAtA[i:], *m.Id)
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
-
- func (m *PubKey) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
-
- func (m *PubKey) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Ed25519 != nil {
- dAtA[i] = 0xa
- i++
- i = encodeVarintTest(dAtA, i, uint64(m.Ed25519.Size()))
- n4, err := m.Ed25519.MarshalTo(dAtA[i:])
- if err != nil {
- return 0, err
- }
- i += n4
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
-
- func (m *PubKeyEd25519) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalTo(dAtA)
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
- }
-
- func (m *PubKeyEd25519) MarshalTo(dAtA []byte) (int, error) {
- var i int
- _ = i
- var l int
- _ = l
- if m.Bytes == nil {
- return 0, proto.NewRequiredNotSetError("bytes")
- } else {
- dAtA[i] = 0xa
- i++
- i = encodeVarintTest(dAtA, i, uint64(len(m.Bytes)))
- i += copy(dAtA[i:], m.Bytes)
- }
- if m.XXX_unrecognized != nil {
- i += copy(dAtA[i:], m.XXX_unrecognized)
- }
- return i, nil
- }
-
- func encodeVarintTest(dAtA []byte, offset int, v uint64) int {
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return offset + 1
- }
- func (m *ResultStatus) Size() (n int) {
- var l int
- _ = l
- if m.NodeInfo != nil {
- l = m.NodeInfo.Size()
- n += 1 + l + sovTest(uint64(l))
- }
- if m.PubKey != nil {
- l = m.PubKey.Size()
- n += 1 + l + sovTest(uint64(l))
- }
- if m.LatestBlockHash != nil {
- l = len(m.LatestBlockHash)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.LatestBlockHeight != nil {
- n += 1 + sovTest(uint64(*m.LatestBlockHeight))
- }
- if m.LatestBlocktime != nil {
- n += 1 + sovTest(uint64(*m.LatestBlocktime))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
-
- func (m *NodeInfo) Size() (n int) {
- var l int
- _ = l
- if m.Id != nil {
- l = m.Id.Size()
- n += 1 + l + sovTest(uint64(l))
- }
- if m.Moniker != nil {
- l = len(*m.Moniker)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.Network != nil {
- l = len(*m.Network)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.RemoteAddr != nil {
- l = len(*m.RemoteAddr)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.ListenAddr != nil {
- l = len(*m.ListenAddr)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.Version != nil {
- l = len(*m.Version)
- n += 1 + l + sovTest(uint64(l))
- }
- if len(m.Other) > 0 {
- for _, s := range m.Other {
- l = len(s)
- n += 1 + l + sovTest(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
-
- func (m *ID) Size() (n int) {
- var l int
- _ = l
- if m.Id != nil {
- l = len(*m.Id)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
-
- func (m *PubKey) Size() (n int) {
- var l int
- _ = l
- if m.Ed25519 != nil {
- l = m.Ed25519.Size()
- n += 1 + l + sovTest(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
-
- func (m *PubKeyEd25519) Size() (n int) {
- var l int
- _ = l
- if m.Bytes != nil {
- l = len(m.Bytes)
- n += 1 + l + sovTest(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
- }
-
- func sovTest(x uint64) (n int) {
- for {
- n++
- x >>= 7
- if x == 0 {
- break
- }
- }
- return n
- }
-
- func (m *ResultStatus) Unmarshal(dAtA []byte) error {
- var hasFields [1]uint64
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ResultStatus: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ResultStatus: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field NodeInfo", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.NodeInfo == nil {
- m.NodeInfo = &NodeInfo{}
- }
- if err := m.NodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.PubKey == nil {
- m.PubKey = &PubKey{}
- }
- if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000001)
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHash", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + byteLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.LatestBlockHash = append(m.LatestBlockHash[:0], dAtA[iNdEx:postIndex]...)
- if m.LatestBlockHash == nil {
- m.LatestBlockHash = []byte{}
- }
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000002)
- case 4:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field LatestBlockHeight", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.LatestBlockHeight = &v
- hasFields[0] |= uint64(0x00000004)
- case 5:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field LatestBlocktime", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= (int64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.LatestBlocktime = &v
- hasFields[0] |= uint64(0x00000008)
- default:
- iNdEx = preIndex
- skippy, err := skipTest(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthTest
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
- if hasFields[0]&uint64(0x00000001) == 0 {
- return proto.NewRequiredNotSetError("pubKey")
- }
- if hasFields[0]&uint64(0x00000002) == 0 {
- return proto.NewRequiredNotSetError("latestBlockHash")
- }
- if hasFields[0]&uint64(0x00000004) == 0 {
- return proto.NewRequiredNotSetError("latestBlockHeight")
- }
- if hasFields[0]&uint64(0x00000008) == 0 {
- return proto.NewRequiredNotSetError("latestBlocktime")
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *NodeInfo) Unmarshal(dAtA []byte) error {
- var hasFields [1]uint64
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: NodeInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: NodeInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Id == nil {
- m.Id = &ID{}
- }
- if err := m.Id.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000001)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Moniker", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Moniker = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000002)
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Network", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Network = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000004)
- case 4:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field RemoteAddr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.RemoteAddr = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000008)
- case 5:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field ListenAddr", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.ListenAddr = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000010)
- case 6:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Version = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000020)
- case 7:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Other", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Other = append(m.Other, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipTest(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthTest
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
- if hasFields[0]&uint64(0x00000001) == 0 {
- return proto.NewRequiredNotSetError("id")
- }
- if hasFields[0]&uint64(0x00000002) == 0 {
- return proto.NewRequiredNotSetError("moniker")
- }
- if hasFields[0]&uint64(0x00000004) == 0 {
- return proto.NewRequiredNotSetError("network")
- }
- if hasFields[0]&uint64(0x00000008) == 0 {
- return proto.NewRequiredNotSetError("remoteAddr")
- }
- if hasFields[0]&uint64(0x00000010) == 0 {
- return proto.NewRequiredNotSetError("listenAddr")
- }
- if hasFields[0]&uint64(0x00000020) == 0 {
- return proto.NewRequiredNotSetError("version")
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *ID) Unmarshal(dAtA []byte) error {
- var hasFields [1]uint64
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: ID: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: ID: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + intStringLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- s := string(dAtA[iNdEx:postIndex])
- m.Id = &s
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000001)
- default:
- iNdEx = preIndex
- skippy, err := skipTest(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthTest
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
- if hasFields[0]&uint64(0x00000001) == 0 {
- return proto.NewRequiredNotSetError("id")
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *PubKey) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PubKey: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PubKey: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ed25519", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + msglen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Ed25519 == nil {
- m.Ed25519 = &PubKeyEd25519{}
- }
- if err := m.Ed25519.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipTest(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthTest
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func (m *PubKeyEd25519) Unmarshal(dAtA []byte) error {
- var hasFields [1]uint64
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PubKeyEd25519: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PubKeyEd25519: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Bytes", wireType)
- }
- var byteLen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowTest
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- byteLen |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if byteLen < 0 {
- return ErrInvalidLengthTest
- }
- postIndex := iNdEx + byteLen
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Bytes = append(m.Bytes[:0], dAtA[iNdEx:postIndex]...)
- if m.Bytes == nil {
- m.Bytes = []byte{}
- }
- iNdEx = postIndex
- hasFields[0] |= uint64(0x00000001)
- default:
- iNdEx = preIndex
- skippy, err := skipTest(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if skippy < 0 {
- return ErrInvalidLengthTest
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
- if hasFields[0]&uint64(0x00000001) == 0 {
- return proto.NewRequiredNotSetError("bytes")
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
- }
- func skipTest(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowTest
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowTest
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- return iNdEx, nil
- case 1:
- iNdEx += 8
- return iNdEx, nil
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowTest
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- iNdEx += length
- if length < 0 {
- return 0, ErrInvalidLengthTest
- }
- return iNdEx, nil
- case 3:
- for {
- var innerWire uint64
- var start int = iNdEx
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowTest
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- innerWire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- innerWireType := int(innerWire & 0x7)
- if innerWireType == 4 {
- break
- }
- next, err := skipTest(dAtA[start:])
- if err != nil {
- return 0, err
- }
- iNdEx = start + next
- }
- return iNdEx, nil
- case 4:
- return iNdEx, nil
- case 5:
- iNdEx += 4
- return iNdEx, nil
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- }
- panic("unreachable")
- }
-
- var (
- ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowTest = fmt.Errorf("proto: integer overflow")
- )
-
- func init() { proto.RegisterFile("test.proto", fileDescriptorTest) }
-
- var fileDescriptorTest = []byte{
- // 342 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x91, 0x41, 0x4b, 0xf3, 0x30,
- 0x1c, 0xc6, 0x49, 0xfb, 0x6e, 0x5d, 0xff, 0xeb, 0x3b, 0x31, 0xee, 0x90, 0x53, 0x2d, 0x85, 0x41,
- 0x0f, 0x52, 0xb0, 0xb0, 0x83, 0x47, 0xc7, 0x04, 0x87, 0x20, 0x23, 0x7e, 0x82, 0xcd, 0xfe, 0x75,
- 0x65, 0x5d, 0x33, 0x92, 0x4c, 0xd9, 0xe7, 0xf3, 0xe2, 0xd1, 0xa3, 0x47, 0xd9, 0x27, 0x91, 0xa6,
- 0xed, 0x9c, 0xf3, 0xf8, 0xfc, 0x7e, 0xe5, 0xc9, 0xd3, 0x04, 0x40, 0xa3, 0xd2, 0xf1, 0x5a, 0x0a,
- 0x2d, 0xc2, 0x4f, 0x02, 0x1e, 0x47, 0xb5, 0xc9, 0xf5, 0x83, 0x9e, 0xe9, 0x8d, 0xa2, 0x03, 0xe8,
- 0x14, 0x22, 0xc5, 0x49, 0xf1, 0x24, 0x18, 0x09, 0x48, 0xd4, 0x4d, 0xdc, 0xf8, 0xbe, 0x06, 0x7c,
- 0xaf, 0xe8, 0x39, 0xb4, 0xd7, 0x9b, 0xf9, 0x1d, 0x6e, 0x99, 0x15, 0x58, 0x51, 0x37, 0x71, 0xe2,
- 0xa9, 0x89, 0xbc, 0xc6, 0x34, 0x82, 0x93, 0x7c, 0x56, 0x1e, 0x34, 0xca, 0xc5, 0xe3, 0xf2, 0x76,
- 0xa6, 0x16, 0xcc, 0x0e, 0xac, 0xc8, 0xe3, 0xc7, 0x98, 0x5e, 0xc0, 0xe9, 0x21, 0xc2, 0xec, 0x79,
- 0xa1, 0xd9, 0xbf, 0xc0, 0x8a, 0x6c, 0xfe, 0x57, 0x1c, 0xf5, 0xea, 0x6c, 0x85, 0xac, 0x65, 0xbe,
- 0x3d, 0xc6, 0xe1, 0x1b, 0x81, 0x4e, 0xb3, 0x9c, 0x9e, 0x81, 0x95, 0xa5, 0x8c, 0x98, 0xad, 0x76,
- 0x3c, 0x19, 0x73, 0x2b, 0x4b, 0x29, 0x03, 0x67, 0x25, 0x8a, 0x6c, 0x89, 0xd2, 0xfc, 0x85, 0xcb,
- 0x9b, 0x58, 0x9a, 0x02, 0xf5, 0xab, 0x90, 0x4b, 0xb3, 0xda, 0xe5, 0x4d, 0xa4, 0x3e, 0x80, 0xc4,
- 0x95, 0xd0, 0x78, 0x9d, 0xa6, 0xd2, 0xcc, 0x74, 0xf9, 0x01, 0x29, 0x7d, 0x9e, 0x29, 0x8d, 0x85,
- 0xf1, 0xad, 0xca, 0xff, 0x90, 0xb2, 0xf9, 0x05, 0xa5, 0xca, 0x44, 0xc1, 0xda, 0x55, 0x73, 0x1d,
- 0x69, 0x1f, 0x5a, 0x42, 0x2f, 0x50, 0x32, 0x27, 0xb0, 0x23, 0x97, 0x57, 0x21, 0xec, 0x83, 0x35,
- 0x19, 0xd3, 0xde, 0x7e, 0xbe, 0x5b, 0x2e, 0x0f, 0x13, 0x68, 0x4f, 0x9b, 0x7b, 0x76, 0x30, 0x4d,
- 0x86, 0xc3, 0xcb, 0xab, 0xfa, 0xb9, 0x7a, 0xf5, 0x4b, 0xdc, 0x54, 0x94, 0x37, 0x3a, 0x1c, 0xc0,
- 0xff, 0x5f, 0xa6, 0x3c, 0x70, 0xbe, 0xd5, 0xa8, 0x4c, 0xaf, 0xc7, 0xab, 0x30, 0xf2, 0xde, 0x77,
- 0x3e, 0xf9, 0xd8, 0xf9, 0xe4, 0x6b, 0xe7, 0x93, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb1, 0xee,
- 0x6b, 0xdd, 0x2c, 0x02, 0x00, 0x00,
- }
|