proto

package
v0.0.0-...-c9d2d86 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2018 License: ISC Imports: 3 Imported by: 0

Documentation

Overview

Package proto is a generated protocol buffer package.

It is generated from these files:

message.proto

It has these top-level messages:

Header
Message
HandShake

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandShake

type HandShake struct {
	Name      string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
	Version   string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"`
	Id        []byte `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
	Address   string `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"`
	Type      uint32 `protobuf:"varint,5,opt,name=type" json:"type,omitempty"`
	Signature []byte `protobuf:"bytes,6,opt,name=signature,proto3" json:"signature,omitempty"`
	Cert      []byte `protobuf:"bytes,7,opt,name=cert,proto3" json:"cert,omitempty"`
}

func (*HandShake) Descriptor

func (*HandShake) Descriptor() ([]byte, []int)

func (*HandShake) GetAddress

func (m *HandShake) GetAddress() string

func (*HandShake) GetCert

func (m *HandShake) GetCert() []byte

func (*HandShake) GetId

func (m *HandShake) GetId() []byte

func (*HandShake) GetName

func (m *HandShake) GetName() string

func (*HandShake) GetSignature

func (m *HandShake) GetSignature() []byte

func (*HandShake) GetType

func (m *HandShake) GetType() uint32

func (*HandShake) GetVersion

func (m *HandShake) GetVersion() string

func (*HandShake) MarshalMsg

func (handshake *HandShake) MarshalMsg() ([]byte, error)

func (*HandShake) ProtoMessage

func (*HandShake) ProtoMessage()

func (*HandShake) Reset

func (m *HandShake) Reset()

func (*HandShake) String

func (m *HandShake) String() string

func (*HandShake) UnmarshalMsg

func (handshake *HandShake) UnmarshalMsg(data []byte) error
type Header struct {
	Magic   uint32 `protobuf:"varint,1,opt,name=magic" json:"magic,omitempty"`
	SeqNum  uint32 `protobuf:"varint,2,opt,name=seqNum" json:"seqNum,omitempty"`
	ProtoID uint32 `protobuf:"varint,3,opt,name=protoID" json:"protoID,omitempty"`
	MsgID   uint32 `protobuf:"varint,4,opt,name=msgID" json:"msgID,omitempty"`
}

func (*Header) Descriptor

func (*Header) Descriptor() ([]byte, []int)

func (*Header) GetMagic

func (m *Header) GetMagic() uint32

func (*Header) GetMsgID

func (m *Header) GetMsgID() uint32

func (*Header) GetProtoID

func (m *Header) GetProtoID() uint32

func (*Header) GetSeqNum

func (m *Header) GetSeqNum() uint32

func (*Header) ProtoMessage

func (*Header) ProtoMessage()

func (*Header) Reset

func (m *Header) Reset()

func (*Header) String

func (m *Header) String() string

type Message

type Message struct {
	Header  *Header `protobuf:"bytes,1,opt,name=header" json:"header,omitempty"`
	Payload []byte  `protobuf:"bytes,2,opt,name=payload,proto3" json:"payload,omitempty"`
}

func NewMessage

func NewMessage(header *Header, payload []byte) *Message

func (*Message) Descriptor

func (*Message) Descriptor() ([]byte, []int)

func (*Message) GetHeader

func (m *Message) GetHeader() *Header

func (*Message) GetPayload

func (m *Message) GetPayload() []byte

func (*Message) MarshalMsg

func (msg *Message) MarshalMsg() ([]byte, error)

func (*Message) ProtoMessage

func (*Message) ProtoMessage()

func (*Message) Reset

func (m *Message) Reset()

func (*Message) String

func (m *Message) String() string

func (*Message) UnmarshalMsg

func (msg *Message) UnmarshalMsg(data []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL