go_micro_service_dbproxy

package
v0.0.0-...-5447790 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterDBProxyServiceHandler

func RegisterDBProxyServiceHandler(s server.Server, hdlr DBProxyServiceHandler, opts ...server.HandlerOption) error

Types

type DBProxyService

type DBProxyService interface {
	// 请求执行sql动作
	ExecuteAction(ctx context.Context, in *ReqExec, opts ...client.CallOption) (*RespExec, error)
}

func NewDBProxyService

func NewDBProxyService(name string, c client.Client) DBProxyService

type DBProxyServiceHandler

type DBProxyServiceHandler interface {
	// 请求执行sql动作
	ExecuteAction(context.Context, *ReqExec, *RespExec) error
}

type ReqExec

type ReqExec struct {
	Sequence             bool            `protobuf:"varint,1,opt,name=sequence,proto3" json:"sequence,omitempty"`
	Transaction          bool            `protobuf:"varint,2,opt,name=transaction,proto3" json:"transaction,omitempty"`
	ResultType           int32           `protobuf:"varint,3,opt,name=resultType,proto3" json:"resultType,omitempty"`
	Action               []*SingleAction `protobuf:"bytes,4,rep,name=action,proto3" json:"action,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*ReqExec) Descriptor

func (*ReqExec) Descriptor() ([]byte, []int)

func (*ReqExec) GetAction

func (m *ReqExec) GetAction() []*SingleAction

func (*ReqExec) GetResultType

func (m *ReqExec) GetResultType() int32

func (*ReqExec) GetSequence

func (m *ReqExec) GetSequence() bool

func (*ReqExec) GetTransaction

func (m *ReqExec) GetTransaction() bool

func (*ReqExec) ProtoMessage

func (*ReqExec) ProtoMessage()

func (*ReqExec) Reset

func (m *ReqExec) Reset()

func (*ReqExec) String

func (m *ReqExec) String() string

func (*ReqExec) XXX_DiscardUnknown

func (m *ReqExec) XXX_DiscardUnknown()

func (*ReqExec) XXX_Marshal

func (m *ReqExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*ReqExec) XXX_Merge

func (m *ReqExec) XXX_Merge(src proto.Message)

func (*ReqExec) XXX_Size

func (m *ReqExec) XXX_Size() int

func (*ReqExec) XXX_Unmarshal

func (m *ReqExec) XXX_Unmarshal(b []byte) error

type RespExec

type RespExec struct {
	Code                 int32    `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
	Msg                  string   `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`
	Data                 []byte   `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*RespExec) Descriptor

func (*RespExec) Descriptor() ([]byte, []int)

func (*RespExec) GetCode

func (m *RespExec) GetCode() int32

func (*RespExec) GetData

func (m *RespExec) GetData() []byte

func (*RespExec) GetMsg

func (m *RespExec) GetMsg() string

func (*RespExec) ProtoMessage

func (*RespExec) ProtoMessage()

func (*RespExec) Reset

func (m *RespExec) Reset()

func (*RespExec) String

func (m *RespExec) String() string

func (*RespExec) XXX_DiscardUnknown

func (m *RespExec) XXX_DiscardUnknown()

func (*RespExec) XXX_Marshal

func (m *RespExec) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*RespExec) XXX_Merge

func (m *RespExec) XXX_Merge(src proto.Message)

func (*RespExec) XXX_Size

func (m *RespExec) XXX_Size() int

func (*RespExec) XXX_Unmarshal

func (m *RespExec) XXX_Unmarshal(b []byte) error

type SingleAction

type SingleAction struct {
	Name                 string   `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Params               []byte   `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*SingleAction) Descriptor

func (*SingleAction) Descriptor() ([]byte, []int)

func (*SingleAction) GetName

func (m *SingleAction) GetName() string

func (*SingleAction) GetParams

func (m *SingleAction) GetParams() []byte

func (*SingleAction) ProtoMessage

func (*SingleAction) ProtoMessage()

func (*SingleAction) Reset

func (m *SingleAction) Reset()

func (*SingleAction) String

func (m *SingleAction) String() string

func (*SingleAction) XXX_DiscardUnknown

func (m *SingleAction) XXX_DiscardUnknown()

func (*SingleAction) XXX_Marshal

func (m *SingleAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*SingleAction) XXX_Merge

func (m *SingleAction) XXX_Merge(src proto.Message)

func (*SingleAction) XXX_Size

func (m *SingleAction) XXX_Size() int

func (*SingleAction) XXX_Unmarshal

func (m *SingleAction) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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