ichub_icd_general_srv_godb

package
v1.0.1-dev-02 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: MulanPSL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_proto_general_godb_proto protoreflect.FileDescriptor

Functions

func NewGeneralGodbEndpoints

func NewGeneralGodbEndpoints() []*api.Endpoint

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) Descriptor() ([]byte, []int)

Deprecated: Use DbReply.ProtoReflect.Descriptor instead.

func (*DbReply) GetCode

func (x *DbReply) GetCode() uint32

func (*DbReply) GetCurrent

func (x *DbReply) GetCurrent() uint32

func (*DbReply) GetData

func (x *DbReply) GetData() string

func (*DbReply) GetMsg

func (x *DbReply) GetMsg() string

func (*DbReply) GetPageSize

func (x *DbReply) GetPageSize() uint32

func (*DbReply) GetTotal

func (x *DbReply) GetTotal() uint32

func (*DbReply) ProtoMessage

func (*DbReply) ProtoMessage()

func (*DbReply) ProtoReflect

func (x *DbReply) ProtoReflect() protoreflect.Message

func (*DbReply) Reset

func (x *DbReply) Reset()

func (*DbReply) String

func (x *DbReply) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use DbRequest.ProtoReflect.Descriptor instead.

func (*DbRequest) GetCmdType

func (x *DbRequest) GetCmdType() uint32

func (*DbRequest) GetData

func (x *DbRequest) GetData() string

func (*DbRequest) GetDbConnName

func (x *DbRequest) GetDbConnName() string

func (*DbRequest) GetDbName

func (x *DbRequest) GetDbName() string

func (*DbRequest) GetMsgType

func (x *DbRequest) GetMsgType() uint32

func (*DbRequest) ProtoMessage

func (*DbRequest) ProtoMessage()

func (*DbRequest) ProtoReflect

func (x *DbRequest) ProtoReflect() protoreflect.Message

func (*DbRequest) Reset

func (x *DbRequest) Reset()

func (*DbRequest) String

func (x *DbRequest) String() string

type GeneralGodbHandler

type GeneralGodbHandler interface {
	Execute(context.Context, *DbRequest, *DbReply) error
}

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

Jump to

Keyboard shortcuts

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