Documentation ¶
Index ¶
- Variables
- func NewGeneralGodbEndpoints() []*api.Endpoint
- func RegisterGeneralGodbHandler(s server.Server, hdlr GeneralGodbHandler, opts ...server.HandlerOption) error
- type DbReply
- func (*DbReply) Descriptor() ([]byte, []int)deprecated
- func (x *DbReply) GetCode() uint32
- func (x *DbReply) GetCurrent() uint32
- func (x *DbReply) GetData() string
- func (x *DbReply) GetMsg() string
- func (x *DbReply) GetPageSize() uint32
- func (x *DbReply) GetTotal() uint32
- func (*DbReply) ProtoMessage()
- func (x *DbReply) ProtoReflect() protoreflect.Message
- func (x *DbReply) Reset()
- func (x *DbReply) String() string
- type DbRequest
- func (*DbRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DbRequest) GetCmdType() uint32
- func (x *DbRequest) GetData() string
- func (x *DbRequest) GetDbConnName() string
- func (x *DbRequest) GetDbName() string
- func (x *DbRequest) GetMsgType() uint32
- func (*DbRequest) ProtoMessage()
- func (x *DbRequest) ProtoReflect() protoreflect.Message
- func (x *DbRequest) Reset()
- func (x *DbRequest) String() string
- type GeneralGodbHandler
- type GeneralGodbService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_general_godb_proto protoreflect.FileDescriptor
Functions ¶
func NewGeneralGodbEndpoints ¶
func RegisterGeneralGodbHandler ¶
func RegisterGeneralGodbHandler(s server.Server, hdlr GeneralGodbHandler, opts ...server.HandlerOption) error
Types ¶
type DbReply ¶
type DbReply struct { Code uint32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // 第一个参数类型是string Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` Total uint32 `protobuf:"varint,3,opt,name=total,proto3" json:"total,omitempty"` PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` Current uint32 `protobuf:"varint,5,opt,name=current,proto3" json:"current,omitempty"` Data string `protobuf:"bytes,6,opt,name=Data,proto3" json:"Data,omitempty"` // contains filtered or unexported fields }
func (*DbReply) Descriptor
deprecated
func (*DbReply) GetCurrent ¶
func (*DbReply) GetPageSize ¶
func (*DbReply) ProtoMessage ¶
func (*DbReply) ProtoMessage()
func (*DbReply) ProtoReflect ¶
func (x *DbReply) ProtoReflect() protoreflect.Message
type DbRequest ¶
type DbRequest struct { MsgType uint32 `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"` //db es nats CmdType uint32 `protobuf:"varint,2,opt,name=cmdType,proto3" json:"cmdType,omitempty"` DbName string `protobuf:"bytes,3,opt,name=dbName,proto3" json:"dbName,omitempty"` DbConnName string `protobuf:"bytes,4,opt,name=dbConnName,proto3" json:"dbConnName,omitempty"` // 第一个参数类型是string Data string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"` // 第二个参数类型是int32 // contains filtered or unexported fields }
对于消息的定义 在nodejs里面,消息所定义的参数是存在一个数组里面的 所以定义的时候,需要给出参数的位置是比较科学的 注意:目前只针对于nodejs是这样存参数的,至于其他平台语言,不一定是这样的
func (*DbRequest) Descriptor
deprecated
func (*DbRequest) GetCmdType ¶
func (*DbRequest) GetDbConnName ¶
func (*DbRequest) GetMsgType ¶
func (*DbRequest) ProtoMessage ¶
func (*DbRequest) ProtoMessage()
func (*DbRequest) ProtoReflect ¶
func (x *DbRequest) ProtoReflect() protoreflect.Message
type GeneralGodbHandler ¶
type GeneralGodbService ¶
type GeneralGodbService interface {
Execute(ctx context.Context, in *DbRequest, opts ...client.CallOption) (*DbReply, error)
}
func NewGeneralGodbService ¶
func NewGeneralGodbService(name string, c client.Client) GeneralGodbService
Click to show internal directories.
Click to hide internal directories.