Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ID_name = map[int32]string{ 0: "_", 1: "FooReqID", 2: "FooRespID", } ID_value = map[string]int32{ "_": 0, "FooReqID": 1, "FooRespID": 2, } )
Enum value maps for ID.
View Source
var File_message_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CustomPacker ¶
type CustomPacker struct{}
CustomPacker treats packet as:
totalSize(4)|id(4)|data(n)
| segment | type | size | remark | | ----------- | ------ | ------- | --------------------- | | `totalSize` | uint32 | 4 | the whole packet size | | `id` | uint32 | 4 | | | `data` | []byte | dynamic | |
type FooReq ¶
type FooReq struct { Bar string `protobuf:"bytes,1,opt,name=Bar,proto3" json:"Bar,omitempty"` Buz int32 `protobuf:"varint,2,opt,name=Buz,proto3" json:"Buz,omitempty"` // contains filtered or unexported fields }
func (*FooReq) Descriptor
deprecated
func (*FooReq) ProtoMessage ¶
func (*FooReq) ProtoMessage()
func (*FooReq) ProtoReflect ¶
func (x *FooReq) ProtoReflect() protoreflect.Message
type FooResp ¶
type FooResp struct { Code int32 `protobuf:"varint,1,opt,name=Code,proto3" json:"Code,omitempty"` Message string `protobuf:"bytes,2,opt,name=Message,proto3" json:"Message,omitempty"` // contains filtered or unexported fields }
func (*FooResp) Descriptor
deprecated
func (*FooResp) GetMessage ¶
func (*FooResp) ProtoMessage ¶
func (*FooResp) ProtoMessage()
func (*FooResp) ProtoReflect ¶
func (x *FooResp) ProtoReflect() protoreflect.Message
type ID ¶
type ID int32
func (ID) Descriptor ¶
func (ID) Descriptor() protoreflect.EnumDescriptor
func (ID) EnumDescriptor
deprecated
func (ID) Number ¶
func (x ID) Number() protoreflect.EnumNumber
func (ID) Type ¶
func (ID) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.