Documentation ¶
Overview ¶
Package protobuf is a generated protocol buffer package.
It is generated from these files:
internal/protobuf/stream.proto
It has these top-level messages:
ID Message Ping Pong LookupNodeRequest LookupNodeResponse Bytes
Index ¶
- Variables
- type Bytes
- func (*Bytes) Descriptor() ([]byte, []int)
- func (this *Bytes) Equal(that interface{}) bool
- func (m *Bytes) GetData() []byte
- func (this *Bytes) GoString() string
- func (m *Bytes) Marshal() (dAtA []byte, err error)
- func (m *Bytes) MarshalTo(dAtA []byte) (int, error)
- func (*Bytes) ProtoMessage()
- func (m *Bytes) Reset()
- func (m *Bytes) Size() (n int)
- func (this *Bytes) String() string
- func (m *Bytes) Unmarshal(dAtA []byte) error
- func (this *Bytes) VerboseEqual(that interface{}) error
- type ID
- func (*ID) Descriptor() ([]byte, []int)
- func (this *ID) Equal(that interface{}) bool
- func (m *ID) GetAddress() string
- func (m *ID) GetId() []byte
- func (m *ID) GetPublicKey() []byte
- func (this *ID) GoString() string
- func (m *ID) Marshal() (dAtA []byte, err error)
- func (m *ID) MarshalTo(dAtA []byte) (int, error)
- func (*ID) ProtoMessage()
- func (m *ID) Reset()
- func (m *ID) Size() (n int)
- func (this *ID) String() string
- func (m *ID) Unmarshal(dAtA []byte) error
- func (this *ID) VerboseEqual(that interface{}) error
- type LookupNodeRequest
- func (*LookupNodeRequest) Descriptor() ([]byte, []int)
- func (this *LookupNodeRequest) Equal(that interface{}) bool
- func (m *LookupNodeRequest) GetTarget() *ID
- func (this *LookupNodeRequest) GoString() string
- func (m *LookupNodeRequest) Marshal() (dAtA []byte, err error)
- func (m *LookupNodeRequest) MarshalTo(dAtA []byte) (int, error)
- func (*LookupNodeRequest) ProtoMessage()
- func (m *LookupNodeRequest) Reset()
- func (m *LookupNodeRequest) Size() (n int)
- func (this *LookupNodeRequest) String() string
- func (m *LookupNodeRequest) Unmarshal(dAtA []byte) error
- func (this *LookupNodeRequest) VerboseEqual(that interface{}) error
- type LookupNodeResponse
- func (*LookupNodeResponse) Descriptor() ([]byte, []int)
- func (this *LookupNodeResponse) Equal(that interface{}) bool
- func (m *LookupNodeResponse) GetPeers() []*ID
- func (this *LookupNodeResponse) GoString() string
- func (m *LookupNodeResponse) Marshal() (dAtA []byte, err error)
- func (m *LookupNodeResponse) MarshalTo(dAtA []byte) (int, error)
- func (*LookupNodeResponse) ProtoMessage()
- func (m *LookupNodeResponse) Reset()
- func (m *LookupNodeResponse) Size() (n int)
- func (this *LookupNodeResponse) String() string
- func (m *LookupNodeResponse) Unmarshal(dAtA []byte) error
- func (this *LookupNodeResponse) VerboseEqual(that interface{}) error
- type Message
- func (*Message) Descriptor() ([]byte, []int)
- func (this *Message) Equal(that interface{}) bool
- func (m *Message) GetMessage() []byte
- func (m *Message) GetMessageNonce() uint64
- func (m *Message) GetOpcode() uint32
- func (m *Message) GetReplyFlag() bool
- func (m *Message) GetRequestNonce() uint64
- func (m *Message) GetSender() *ID
- func (m *Message) GetSignature() []byte
- func (this *Message) GoString() string
- func (m *Message) Marshal() (dAtA []byte, err error)
- func (m *Message) MarshalTo(dAtA []byte) (int, error)
- func (*Message) ProtoMessage()
- func (m *Message) Reset()
- func (m *Message) Size() (n int)
- func (this *Message) String() string
- func (m *Message) Unmarshal(dAtA []byte) error
- func (this *Message) VerboseEqual(that interface{}) error
- type Ping
- func (*Ping) Descriptor() ([]byte, []int)
- func (this *Ping) Equal(that interface{}) bool
- func (this *Ping) GoString() string
- func (m *Ping) Marshal() (dAtA []byte, err error)
- func (m *Ping) MarshalTo(dAtA []byte) (int, error)
- func (*Ping) ProtoMessage()
- func (m *Ping) Reset()
- func (m *Ping) Size() (n int)
- func (this *Ping) String() string
- func (m *Ping) Unmarshal(dAtA []byte) error
- func (this *Ping) VerboseEqual(that interface{}) error
- type Pong
- func (*Pong) Descriptor() ([]byte, []int)
- func (this *Pong) Equal(that interface{}) bool
- func (this *Pong) GoString() string
- func (m *Pong) Marshal() (dAtA []byte, err error)
- func (m *Pong) MarshalTo(dAtA []byte) (int, error)
- func (*Pong) ProtoMessage()
- func (m *Pong) Reset()
- func (m *Pong) Size() (n int)
- func (this *Pong) String() string
- func (m *Pong) Unmarshal(dAtA []byte) error
- func (this *Pong) VerboseEqual(that interface{}) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthStream = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowStream = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type Bytes ¶
type Bytes struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (*Bytes) Descriptor ¶
func (*Bytes) ProtoMessage ¶
func (*Bytes) ProtoMessage()
func (*Bytes) VerboseEqual ¶
type ID ¶
type ID struct { // public_key of the peer (we no longer use the public key as the peer ID, but use it to verify messages) PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` // address is the network address of the peer Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` // id is the computed hash of the public key Id []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"` }
func (*ID) Descriptor ¶
func (*ID) GetAddress ¶
func (*ID) GetPublicKey ¶
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
func (*ID) VerboseEqual ¶
type LookupNodeRequest ¶
type LookupNodeRequest struct {
Target *ID `protobuf:"bytes,1,opt,name=target" json:"target,omitempty"`
}
func (*LookupNodeRequest) Descriptor ¶
func (*LookupNodeRequest) Descriptor() ([]byte, []int)
func (*LookupNodeRequest) Equal ¶
func (this *LookupNodeRequest) Equal(that interface{}) bool
func (*LookupNodeRequest) GetTarget ¶
func (m *LookupNodeRequest) GetTarget() *ID
func (*LookupNodeRequest) GoString ¶
func (this *LookupNodeRequest) GoString() string
func (*LookupNodeRequest) Marshal ¶
func (m *LookupNodeRequest) Marshal() (dAtA []byte, err error)
func (*LookupNodeRequest) MarshalTo ¶
func (m *LookupNodeRequest) MarshalTo(dAtA []byte) (int, error)
func (*LookupNodeRequest) ProtoMessage ¶
func (*LookupNodeRequest) ProtoMessage()
func (*LookupNodeRequest) Reset ¶
func (m *LookupNodeRequest) Reset()
func (*LookupNodeRequest) Size ¶
func (m *LookupNodeRequest) Size() (n int)
func (*LookupNodeRequest) String ¶
func (this *LookupNodeRequest) String() string
func (*LookupNodeRequest) Unmarshal ¶
func (m *LookupNodeRequest) Unmarshal(dAtA []byte) error
func (*LookupNodeRequest) VerboseEqual ¶
func (this *LookupNodeRequest) VerboseEqual(that interface{}) error
type LookupNodeResponse ¶
type LookupNodeResponse struct {
Peers []*ID `protobuf:"bytes,1,rep,name=peers" json:"peers,omitempty"`
}
func (*LookupNodeResponse) Descriptor ¶
func (*LookupNodeResponse) Descriptor() ([]byte, []int)
func (*LookupNodeResponse) Equal ¶
func (this *LookupNodeResponse) Equal(that interface{}) bool
func (*LookupNodeResponse) GetPeers ¶
func (m *LookupNodeResponse) GetPeers() []*ID
func (*LookupNodeResponse) GoString ¶
func (this *LookupNodeResponse) GoString() string
func (*LookupNodeResponse) Marshal ¶
func (m *LookupNodeResponse) Marshal() (dAtA []byte, err error)
func (*LookupNodeResponse) MarshalTo ¶
func (m *LookupNodeResponse) MarshalTo(dAtA []byte) (int, error)
func (*LookupNodeResponse) ProtoMessage ¶
func (*LookupNodeResponse) ProtoMessage()
func (*LookupNodeResponse) Reset ¶
func (m *LookupNodeResponse) Reset()
func (*LookupNodeResponse) Size ¶
func (m *LookupNodeResponse) Size() (n int)
func (*LookupNodeResponse) String ¶
func (this *LookupNodeResponse) String() string
func (*LookupNodeResponse) Unmarshal ¶
func (m *LookupNodeResponse) Unmarshal(dAtA []byte) error
func (*LookupNodeResponse) VerboseEqual ¶
func (this *LookupNodeResponse) VerboseEqual(that interface{}) error
type Message ¶
type Message struct { Message []byte `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // Sender's address and public key. Sender *ID `protobuf:"bytes,2,opt,name=sender" json:"sender,omitempty"` // Sender's signature of message. Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` // request_nonce is the request/response ID. Null if ID associated to a message is not a request/response. RequestNonce uint64 `protobuf:"varint,4,opt,name=request_nonce,json=requestNonce,proto3" json:"request_nonce,omitempty"` // message_nonce is the sequence ID. MessageNonce uint64 `protobuf:"varint,5,opt,name=message_nonce,json=messageNonce,proto3" json:"message_nonce,omitempty"` // reply_flag indicates this is a reply to a request ReplyFlag bool `protobuf:"varint,6,opt,name=reply_flag,json=replyFlag,proto3" json:"reply_flag,omitempty"` // opcode specifies the message type Opcode uint32 `protobuf:"varint,7,opt,name=opcode,proto3" json:"opcode,omitempty"` }
func (*Message) Descriptor ¶
func (*Message) GetMessage ¶
func (*Message) GetMessageNonce ¶
func (*Message) GetReplyFlag ¶
func (*Message) GetRequestNonce ¶
func (*Message) GetSignature ¶
func (*Message) ProtoMessage ¶
func (*Message) ProtoMessage()
func (*Message) VerboseEqual ¶
type Ping ¶
type Ping struct { }
func (*Ping) Descriptor ¶
func (*Ping) ProtoMessage ¶
func (*Ping) ProtoMessage()
func (*Ping) VerboseEqual ¶
type Pong ¶
type Pong struct { }
func (*Pong) Descriptor ¶
func (*Pong) ProtoMessage ¶
func (*Pong) ProtoMessage()
func (*Pong) VerboseEqual ¶
Click to show internal directories.
Click to hide internal directories.