Documentation ¶
Index ¶
- func RegisterAccountServer(s *grpc.Server, srv AccountServer)
- func RegisterUserServer(s *grpc.Server, srv UserServer)
- type AccountClient
- type AccountServer
- type GetAccountReq
- func (*GetAccountReq) Descriptor() ([]byte, []int)
- func (m *GetAccountReq) GetHeader() *RequestHeader
- func (m *GetAccountReq) GetSid() string
- func (*GetAccountReq) ProtoMessage()
- func (m *GetAccountReq) Reset()
- func (m *GetAccountReq) String() string
- func (m *GetAccountReq) XXX_DiscardUnknown()
- func (m *GetAccountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetAccountReq) XXX_Merge(src proto.Message)
- func (m *GetAccountReq) XXX_Size() int
- func (m *GetAccountReq) XXX_Unmarshal(b []byte) error
- type GetAccountRes
- func (*GetAccountRes) Descriptor() ([]byte, []int)
- func (m *GetAccountRes) GetBalance() int64
- func (m *GetAccountRes) GetHeader() *ResponseHeader
- func (*GetAccountRes) ProtoMessage()
- func (m *GetAccountRes) Reset()
- func (m *GetAccountRes) String() string
- func (m *GetAccountRes) XXX_DiscardUnknown()
- func (m *GetAccountRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *GetAccountRes) XXX_Merge(src proto.Message)
- func (m *GetAccountRes) XXX_Size() int
- func (m *GetAccountRes) XXX_Unmarshal(b []byte) error
- type LoginReq
- func (*LoginReq) Descriptor() ([]byte, []int)
- func (m *LoginReq) GetHeader() *RequestHeader
- func (m *LoginReq) GetPwd() string
- func (m *LoginReq) GetUsername() string
- func (*LoginReq) ProtoMessage()
- func (m *LoginReq) Reset()
- func (m *LoginReq) String() string
- func (m *LoginReq) XXX_DiscardUnknown()
- func (m *LoginReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *LoginReq) XXX_Merge(src proto.Message)
- func (m *LoginReq) XXX_Size() int
- func (m *LoginReq) XXX_Unmarshal(b []byte) error
- type LoginRes
- func (*LoginRes) Descriptor() ([]byte, []int)
- func (m *LoginRes) GetHeader() *ResponseHeader
- func (m *LoginRes) GetSid() string
- func (m *LoginRes) GetUserid() string
- func (*LoginRes) ProtoMessage()
- func (m *LoginRes) Reset()
- func (m *LoginRes) String() string
- func (m *LoginRes) XXX_DiscardUnknown()
- func (m *LoginRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *LoginRes) XXX_Merge(src proto.Message)
- func (m *LoginRes) XXX_Size() int
- func (m *LoginRes) XXX_Unmarshal(b []byte) error
- type RequestHeader
- func (*RequestHeader) Descriptor() ([]byte, []int)
- func (m *RequestHeader) GetMsgid() string
- func (*RequestHeader) ProtoMessage()
- func (m *RequestHeader) Reset()
- func (m *RequestHeader) String() string
- func (m *RequestHeader) XXX_DiscardUnknown()
- func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *RequestHeader) XXX_Merge(src proto.Message)
- func (m *RequestHeader) XXX_Size() int
- func (m *RequestHeader) XXX_Unmarshal(b []byte) error
- type ResponseHeader
- func (*ResponseHeader) Descriptor() ([]byte, []int)
- func (m *ResponseHeader) GetCode() int64
- func (m *ResponseHeader) GetMsg() string
- func (*ResponseHeader) ProtoMessage()
- func (m *ResponseHeader) Reset()
- func (m *ResponseHeader) String() string
- func (m *ResponseHeader) XXX_DiscardUnknown()
- func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *ResponseHeader) XXX_Merge(src proto.Message)
- func (m *ResponseHeader) XXX_Size() int
- func (m *ResponseHeader) XXX_Unmarshal(b []byte) error
- type UserClient
- type UserServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterAccountServer ¶
func RegisterAccountServer(s *grpc.Server, srv AccountServer)
func RegisterUserServer ¶
func RegisterUserServer(s *grpc.Server, srv UserServer)
Types ¶
type AccountClient ¶
type AccountClient interface {
GetAccount(ctx context.Context, in *GetAccountReq, opts ...grpc.CallOption) (*GetAccountRes, error)
}
AccountClient is the client API for Account service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAccountClient ¶
func NewAccountClient(cc *grpc.ClientConn) AccountClient
type AccountServer ¶
type AccountServer interface {
GetAccount(context.Context, *GetAccountReq) (*GetAccountRes, error)
}
AccountServer is the server API for Account service.
type GetAccountReq ¶
type GetAccountReq struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Sid string `protobuf:"bytes,2,opt,name=sid,proto3" json:"sid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetAccountReq) Descriptor ¶
func (*GetAccountReq) Descriptor() ([]byte, []int)
func (*GetAccountReq) GetHeader ¶
func (m *GetAccountReq) GetHeader() *RequestHeader
func (*GetAccountReq) GetSid ¶
func (m *GetAccountReq) GetSid() string
func (*GetAccountReq) ProtoMessage ¶
func (*GetAccountReq) ProtoMessage()
func (*GetAccountReq) Reset ¶
func (m *GetAccountReq) Reset()
func (*GetAccountReq) String ¶
func (m *GetAccountReq) String() string
func (*GetAccountReq) XXX_DiscardUnknown ¶
func (m *GetAccountReq) XXX_DiscardUnknown()
func (*GetAccountReq) XXX_Marshal ¶
func (m *GetAccountReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetAccountReq) XXX_Merge ¶
func (dst *GetAccountReq) XXX_Merge(src proto.Message)
func (*GetAccountReq) XXX_Size ¶
func (m *GetAccountReq) XXX_Size() int
func (*GetAccountReq) XXX_Unmarshal ¶
func (m *GetAccountReq) XXX_Unmarshal(b []byte) error
type GetAccountRes ¶
type GetAccountRes struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Balance int64 `protobuf:"varint,2,opt,name=balance,proto3" json:"balance,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*GetAccountRes) Descriptor ¶
func (*GetAccountRes) Descriptor() ([]byte, []int)
func (*GetAccountRes) GetBalance ¶
func (m *GetAccountRes) GetBalance() int64
func (*GetAccountRes) GetHeader ¶
func (m *GetAccountRes) GetHeader() *ResponseHeader
func (*GetAccountRes) ProtoMessage ¶
func (*GetAccountRes) ProtoMessage()
func (*GetAccountRes) Reset ¶
func (m *GetAccountRes) Reset()
func (*GetAccountRes) String ¶
func (m *GetAccountRes) String() string
func (*GetAccountRes) XXX_DiscardUnknown ¶
func (m *GetAccountRes) XXX_DiscardUnknown()
func (*GetAccountRes) XXX_Marshal ¶
func (m *GetAccountRes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetAccountRes) XXX_Merge ¶
func (dst *GetAccountRes) XXX_Merge(src proto.Message)
func (*GetAccountRes) XXX_Size ¶
func (m *GetAccountRes) XXX_Size() int
func (*GetAccountRes) XXX_Unmarshal ¶
func (m *GetAccountRes) XXX_Unmarshal(b []byte) error
type LoginReq ¶
type LoginReq struct { Header *RequestHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginReq) Descriptor ¶
func (*LoginReq) GetHeader ¶
func (m *LoginReq) GetHeader() *RequestHeader
func (*LoginReq) GetUsername ¶
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) XXX_DiscardUnknown ¶
func (m *LoginReq) XXX_DiscardUnknown()
func (*LoginReq) XXX_Marshal ¶
func (*LoginReq) XXX_Unmarshal ¶
type LoginRes ¶
type LoginRes struct { Header *ResponseHeader `protobuf:"bytes,1,opt,name=header,proto3" json:"header,omitempty"` Userid string `protobuf:"bytes,2,opt,name=userid,proto3" json:"userid,omitempty"` Sid string `protobuf:"bytes,3,opt,name=sid,proto3" json:"sid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*LoginRes) Descriptor ¶
func (*LoginRes) GetHeader ¶
func (m *LoginRes) GetHeader() *ResponseHeader
func (*LoginRes) ProtoMessage ¶
func (*LoginRes) ProtoMessage()
func (*LoginRes) XXX_DiscardUnknown ¶
func (m *LoginRes) XXX_DiscardUnknown()
func (*LoginRes) XXX_Marshal ¶
func (*LoginRes) XXX_Unmarshal ¶
type RequestHeader ¶
type RequestHeader struct { Msgid string `protobuf:"bytes,1,opt,name=msgid,proto3" json:"msgid,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*RequestHeader) Descriptor ¶
func (*RequestHeader) Descriptor() ([]byte, []int)
func (*RequestHeader) GetMsgid ¶
func (m *RequestHeader) GetMsgid() string
func (*RequestHeader) ProtoMessage ¶
func (*RequestHeader) ProtoMessage()
func (*RequestHeader) Reset ¶
func (m *RequestHeader) Reset()
func (*RequestHeader) String ¶
func (m *RequestHeader) String() string
func (*RequestHeader) XXX_DiscardUnknown ¶
func (m *RequestHeader) XXX_DiscardUnknown()
func (*RequestHeader) XXX_Marshal ¶
func (m *RequestHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*RequestHeader) XXX_Merge ¶
func (dst *RequestHeader) XXX_Merge(src proto.Message)
func (*RequestHeader) XXX_Size ¶
func (m *RequestHeader) XXX_Size() int
func (*RequestHeader) XXX_Unmarshal ¶
func (m *RequestHeader) XXX_Unmarshal(b []byte) error
type ResponseHeader ¶
type ResponseHeader struct { Code int64 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Msg string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*ResponseHeader) Descriptor ¶
func (*ResponseHeader) Descriptor() ([]byte, []int)
func (*ResponseHeader) GetCode ¶
func (m *ResponseHeader) GetCode() int64
func (*ResponseHeader) GetMsg ¶
func (m *ResponseHeader) GetMsg() string
func (*ResponseHeader) ProtoMessage ¶
func (*ResponseHeader) ProtoMessage()
func (*ResponseHeader) Reset ¶
func (m *ResponseHeader) Reset()
func (*ResponseHeader) String ¶
func (m *ResponseHeader) String() string
func (*ResponseHeader) XXX_DiscardUnknown ¶
func (m *ResponseHeader) XXX_DiscardUnknown()
func (*ResponseHeader) XXX_Marshal ¶
func (m *ResponseHeader) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*ResponseHeader) XXX_Merge ¶
func (dst *ResponseHeader) XXX_Merge(src proto.Message)
func (*ResponseHeader) XXX_Size ¶
func (m *ResponseHeader) XXX_Size() int
func (*ResponseHeader) XXX_Unmarshal ¶
func (m *ResponseHeader) XXX_Unmarshal(b []byte) error
type UserClient ¶
type UserClient interface {
Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error)
}
UserClient is the client API for User service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewUserClient ¶
func NewUserClient(cc *grpc.ClientConn) UserClient
Click to show internal directories.
Click to hide internal directories.