Documentation ¶
Overview ¶
Package test is a generated protocol buffer package.
It is generated from these files:
test.proto
It has these top-level messages:
Person
Index ¶
- Variables
- type Codec
- type CodecType
- type Person
- func (*Person) Descriptor() ([]byte, []int)
- func (m *Person) GetId() int32
- func (m *Person) GetName() string
- func (m *Person) Marshal() (dAtA []byte, err error)
- func (m *Person) MarshalTo(dAtA []byte) (int, error)
- func (*Person) ProtoMessage()
- func (m *Person) Reset()
- func (m *Person) Size() (n int)
- func (m *Person) String() string
- func (m *Person) Unmarshal(dAtA []byte) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidLengthTest = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowTest = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type Codec ¶
type Codec interface { Marshal(interface{}) (net.MessageBody, error) Unmarshal(net.MessageBody, interface{}) error Type() int }
数据传输协议,即包体格式
type Person ¶
type Person struct { Id int32 `protobuf:"varint,1,req,name=id" json:"id"` Name string `protobuf:"bytes,2,opt,name=name" json:"name"` }
func (*Person) Descriptor ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.