Documentation ¶
Index ¶
- Variables
- type CallType
- type CompressType
- func (CompressType) Descriptor() protoreflect.EnumDescriptor
- func (x CompressType) Enum() *CompressType
- func (CompressType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CompressType) Number() protoreflect.EnumNumber
- func (x CompressType) String() string
- func (CompressType) Type() protoreflect.EnumType
- type ContentType
- func (ContentType) Descriptor() protoreflect.EnumDescriptor
- func (x ContentType) Enum() *ContentType
- func (ContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ContentType) Number() protoreflect.EnumNumber
- func (x ContentType) String() string
- func (ContentType) Type() protoreflect.EnumType
- type Field
- type Header
- func (*Header) Descriptor() ([]byte, []int)deprecated
- func (x *Header) GetCallType() CallType
- func (x *Header) GetCompressType() CompressType
- func (x *Header) GetContentType() ContentType
- func (x *Header) GetDstEntity() uint64
- func (x *Header) GetErrCode() int32
- func (x *Header) GetErrMsg() string
- func (x *Header) GetFlags() uint32
- func (x *Header) GetMethod() string
- func (x *Header) GetRequestId() string
- func (x *Header) GetRequestType() RequestType
- func (x *Header) GetServiceType() ServiceType
- func (x *Header) GetSrcEntity() uint64
- func (x *Header) GetTimeout() uint32
- func (x *Header) GetTransInfo() map[string][]byte
- func (x *Header) GetType() string
- func (x *Header) GetVersion() uint32
- func (*Header) ProtoMessage()
- func (x *Header) ProtoReflect() protoreflect.Message
- func (x *Header) Reset()
- func (x *Header) String() string
- type MONGO
- type MySQL
- type RequestType
- func (RequestType) Descriptor() protoreflect.EnumDescriptor
- func (x RequestType) Enum() *RequestType
- func (RequestType) EnumDescriptor() ([]byte, []int)deprecated
- func (x RequestType) Number() protoreflect.EnumNumber
- func (x RequestType) String() string
- func (RequestType) Type() protoreflect.EnumType
- type ServiceType
- func (ServiceType) Descriptor() protoreflect.EnumDescriptor
- func (x ServiceType) Enum() *ServiceType
- func (ServiceType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServiceType) Number() protoreflect.EnumNumber
- func (x ServiceType) String() string
- func (ServiceType) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ContentType_name = map[int32]string{ 0: "Proto", } ContentType_value = map[string]int32{ "Proto": 0, } )
Enum value maps for ContentType.
View Source
var ( CompressType_name = map[int32]string{ 0: "None", 1: "Gzip", } CompressType_value = map[string]int32{ "None": 0, "Gzip": 1, } )
Enum value maps for CompressType.
View Source
var ( RequestType_name = map[int32]string{ 0: "RequestRequest", 1: "RequestRespone", } RequestType_value = map[string]int32{ "RequestRequest": 0, "RequestRespone": 1, } )
Enum value maps for RequestType.
View Source
var ( CallType_name = map[int32]string{ 0: "Unary", 1: "OneWay", } CallType_value = map[string]int32{ "Unary": 0, "OneWay": 1, } )
Enum value maps for CallType.
View Source
var ( ServiceType_name = map[int32]string{ 0: "Entity", 1: "Service", } ServiceType_value = map[string]int32{ "Entity": 0, "Service": 1, } )
Enum value maps for ServiceType.
View Source
var ( MySQL_name = map[int32]string{ 0: "MYSQL_FIELD", 1: "MYSQL_NONE", 2: "MYSQL_PRIMARY_KEY", 3: "MYSQL_UNIQUE", 4: "MYSQL_INDEX", } MySQL_value = map[string]int32{ "MYSQL_FIELD": 0, "MYSQL_NONE": 1, "MYSQL_PRIMARY_KEY": 2, "MYSQL_UNIQUE": 3, "MYSQL_INDEX": 4, } )
Enum value maps for MySQL.
View Source
var ( MONGO_name = map[int32]string{ 0: "MGO_FIELD", 1: "MGO_NONE", 2: "MGO_ID", } MONGO_value = map[string]int32{ "MGO_FIELD": 0, "MGO_NONE": 1, "MGO_ID": 2, } )
Enum value maps for MONGO.
View Source
var ( // FooOptions foo_options = 1234; // // optional bbq.Field field = 1100; E_Field = &file_bbq_proto_extTypes[0] )
Extension fields to descriptor.FieldOptions.
View Source
var (
// optional bbq.ServiceType service_type = 50100;
E_ServiceType = &file_bbq_proto_extTypes[1]
)
Extension fields to descriptor.ServiceOptions.
View Source
var File_bbq_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CallType ¶
type CallType int32
func (CallType) Descriptor ¶
func (CallType) Descriptor() protoreflect.EnumDescriptor
func (CallType) EnumDescriptor
deprecated
func (CallType) Number ¶
func (x CallType) Number() protoreflect.EnumNumber
func (CallType) Type ¶
func (CallType) Type() protoreflect.EnumType
type CompressType ¶
type CompressType int32
const ( CompressType_None CompressType = 0 CompressType_Gzip CompressType = 1 )
func (CompressType) Descriptor ¶
func (CompressType) Descriptor() protoreflect.EnumDescriptor
func (CompressType) Enum ¶
func (x CompressType) Enum() *CompressType
func (CompressType) EnumDescriptor
deprecated
func (CompressType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CompressType.Descriptor instead.
func (CompressType) Number ¶
func (x CompressType) Number() protoreflect.EnumNumber
func (CompressType) String ¶
func (x CompressType) String() string
func (CompressType) Type ¶
func (CompressType) Type() protoreflect.EnumType
type ContentType ¶
type ContentType int32
const (
ContentType_Proto ContentType = 0
)
func (ContentType) Descriptor ¶
func (ContentType) Descriptor() protoreflect.EnumDescriptor
func (ContentType) Enum ¶
func (x ContentType) Enum() *ContentType
func (ContentType) EnumDescriptor
deprecated
func (ContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ContentType.Descriptor instead.
func (ContentType) Number ¶
func (x ContentType) Number() protoreflect.EnumNumber
func (ContentType) String ¶
func (x ContentType) String() string
func (ContentType) Type ¶
func (ContentType) Type() protoreflect.EnumType
type Field ¶
type Field struct { // 自定义tag,可以自己针对不同的tag实现不同的逻辑 Tag string `protobuf:"bytes,1,opt,name=tag,proto3" json:"tag,omitempty"` // mysql Mysql MySQL `protobuf:"varint,2,opt,name=mysql,proto3,enum=bbq.MySQL" json:"mysql,omitempty"` // mongo Mgo MONGO `protobuf:"varint,3,opt,name=mgo,proto3,enum=bbq.MONGO" json:"mgo,omitempty"` // contains filtered or unexported fields }
func (*Field) Descriptor
deprecated
func (*Field) ProtoMessage ¶
func (*Field) ProtoMessage()
func (*Field) ProtoReflect ¶
func (x *Field) ProtoReflect() protoreflect.Message
type Header ¶
type Header struct { // 协议版本 Version uint32 `protobuf:"varint,1,opt,name=Version,proto3" json:"Version,omitempty"` // 请求唯一id RequestId string `protobuf:"bytes,2,opt,name=RequestId,proto3" json:"RequestId,omitempty"` // 请求的超时时间,单位ms Timeout uint32 `protobuf:"varint,3,opt,name=Timeout,proto3" json:"Timeout,omitempty"` // 是请求包,还是返回包 RequestType RequestType `protobuf:"varint,4,opt,name=RequestType,proto3,enum=bbq.RequestType" json:"RequestType,omitempty"` // sverice or entity ServiceType ServiceType `protobuf:"varint,5,opt,name=ServiceType,proto3,enum=bbq.ServiceType" json:"ServiceType,omitempty"` // Unary or OneWay, OneWay no response, just notify CallType CallType `protobuf:"varint,6,opt,name=CallType,proto3,enum=bbq.CallType" json:"CallType,omitempty"` // 调用的原EntityID SrcEntity uint64 `protobuf:"varint,7,opt,name=SrcEntity,proto3" json:"SrcEntity,omitempty"` // 调用的目的EntityID DstEntity uint64 `protobuf:"varint,8,opt,name=DstEntity,proto3" json:"DstEntity,omitempty"` // 规范格式: 类名,服务名 Type string `protobuf:"bytes,9,opt,name=Type,proto3" json:"Type,omitempty"` // 规范格式: 接口名 Method string `protobuf:"bytes,10,opt,name=Method,proto3" json:"Method,omitempty"` // 请求数据的序列化类型 // 比如: proto/jce/json, 默认proto // 具体值与ContentEncodeType对应 ContentType ContentType `protobuf:"varint,11,opt,name=ContentType,proto3,enum=bbq.ContentType" json:"ContentType,omitempty"` // 请求数据使用的压缩方式 // 比如: gzip/snappy/..., 默认不使用 // 具体值与CompressType对应 CompressType CompressType `protobuf:"varint,12,opt,name=CompressType,proto3,enum=bbq.CompressType" json:"CompressType,omitempty"` // 是否检查包是否正确 Flags uint32 `protobuf:"varint,13,opt,name=Flags,proto3" json:"Flags,omitempty"` // 附加信息 TransInfo map[string][]byte `` /* 160-byte string literal not displayed */ // 返回值 ErrCode int32 `protobuf:"varint,15,opt,name=ErrCode,proto3" json:"ErrCode,omitempty"` ErrMsg string `protobuf:"bytes,16,opt,name=ErrMsg,proto3" json:"ErrMsg,omitempty"` // contains filtered or unexported fields }
请求协议头
func (*Header) Descriptor
deprecated
func (*Header) GetCallType ¶
func (*Header) GetCompressType ¶
func (x *Header) GetCompressType() CompressType
func (*Header) GetContentType ¶
func (x *Header) GetContentType() ContentType
func (*Header) GetDstEntity ¶
func (*Header) GetErrCode ¶
func (*Header) GetRequestId ¶
func (*Header) GetRequestType ¶
func (x *Header) GetRequestType() RequestType
func (*Header) GetServiceType ¶
func (x *Header) GetServiceType() ServiceType
func (*Header) GetSrcEntity ¶
func (*Header) GetTimeout ¶
func (*Header) GetTransInfo ¶
func (*Header) GetVersion ¶
func (*Header) ProtoMessage ¶
func (*Header) ProtoMessage()
func (*Header) ProtoReflect ¶
func (x *Header) ProtoReflect() protoreflect.Message
type MONGO ¶
type MONGO int32
mongodb
func (MONGO) Descriptor ¶
func (MONGO) Descriptor() protoreflect.EnumDescriptor
func (MONGO) EnumDescriptor
deprecated
func (MONGO) Number ¶
func (x MONGO) Number() protoreflect.EnumNumber
func (MONGO) Type ¶
func (MONGO) Type() protoreflect.EnumType
type MySQL ¶
type MySQL int32
func (MySQL) Descriptor ¶
func (MySQL) Descriptor() protoreflect.EnumDescriptor
func (MySQL) EnumDescriptor
deprecated
func (MySQL) Number ¶
func (x MySQL) Number() protoreflect.EnumNumber
func (MySQL) Type ¶
func (MySQL) Type() protoreflect.EnumType
type RequestType ¶
type RequestType int32
const ( RequestType_RequestRequest RequestType = 0 RequestType_RequestRespone RequestType = 1 )
func (RequestType) Descriptor ¶
func (RequestType) Descriptor() protoreflect.EnumDescriptor
func (RequestType) Enum ¶
func (x RequestType) Enum() *RequestType
func (RequestType) EnumDescriptor
deprecated
func (RequestType) EnumDescriptor() ([]byte, []int)
Deprecated: Use RequestType.Descriptor instead.
func (RequestType) Number ¶
func (x RequestType) Number() protoreflect.EnumNumber
func (RequestType) String ¶
func (x RequestType) String() string
func (RequestType) Type ¶
func (RequestType) Type() protoreflect.EnumType
type ServiceType ¶
type ServiceType int32
const ( // 请求entity,需要提供entity id, entity是有ID的service, entity可以创建很多 ServiceType_Entity ServiceType = 0 // 请求service,只需要提供完整接口名,service是单例entity,只能有一个 ServiceType_Service ServiceType = 1 )
func (ServiceType) Descriptor ¶
func (ServiceType) Descriptor() protoreflect.EnumDescriptor
func (ServiceType) Enum ¶
func (x ServiceType) Enum() *ServiceType
func (ServiceType) EnumDescriptor
deprecated
func (ServiceType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServiceType.Descriptor instead.
func (ServiceType) Number ¶
func (x ServiceType) Number() protoreflect.EnumNumber
func (ServiceType) String ¶
func (x ServiceType) String() string
func (ServiceType) Type ¶
func (ServiceType) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.