Documentation ¶
Index ¶
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- type Error
- func (*Error) Descriptor() ([]byte, []int)
- func (m *Error) GetCode() int32
- func (m *Error) GetDetail() string
- func (*Error) ProtoMessage()
- func (m *Error) Reset()
- func (m *Error) String() string
- func (m *Error) XXX_DiscardUnknown()
- func (m *Error) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Error) XXX_Merge(src proto.Message)
- func (m *Error) XXX_Size() int
- func (m *Error) XXX_Unmarshal(b []byte) error
- type Request
- func (*Request) Descriptor() ([]byte, []int)
- func (m *Request) GetUserID() string
- func (m *Request) GetUserName() string
- func (m *Request) GetUserPwd() string
- func (*Request) ProtoMessage()
- func (m *Request) Reset()
- func (m *Request) String() string
- func (m *Request) XXX_DiscardUnknown()
- func (m *Request) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Request) XXX_Merge(src proto.Message)
- func (m *Request) XXX_Size() int
- func (m *Request) XXX_Unmarshal(b []byte) error
- type Response
- func (*Response) Descriptor() ([]byte, []int)
- func (m *Response) GetError() *Error
- func (m *Response) GetSuccess() bool
- func (m *Response) GetUser() *User
- func (*Response) ProtoMessage()
- func (m *Response) Reset()
- func (m *Response) String() string
- func (m *Response) XXX_DiscardUnknown()
- func (m *Response) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Response) XXX_Merge(src proto.Message)
- func (m *Response) XXX_Size() int
- func (m *Response) XXX_Unmarshal(b []byte) error
- type User
- func (*User) Descriptor() ([]byte, []int)
- func (m *User) GetCreatedTime() uint64
- func (m *User) GetId() int64
- func (m *User) GetName() string
- func (m *User) GetPwd() string
- func (m *User) GetUpdatedTime() uint64
- func (*User) ProtoMessage()
- func (m *User) Reset()
- func (m *User) String() string
- func (m *User) XXX_DiscardUnknown()
- func (m *User) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *User) XXX_Merge(src proto.Message)
- func (m *User) XXX_Size() int
- func (m *User) XXX_Unmarshal(b []byte) error
- type UserHandler
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
Types ¶
type Error ¶
type Error struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Detail string `protobuf:"bytes,2,opt,name=detail,proto3" json:"detail,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Error) Descriptor ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) XXX_DiscardUnknown ¶
func (m *Error) XXX_DiscardUnknown()
func (*Error) XXX_Marshal ¶
func (*Error) XXX_Unmarshal ¶
type Request ¶
type Request struct { UserID string `protobuf:"bytes,1,opt,name=userID,proto3" json:"userID,omitempty"` UserName string `protobuf:"bytes,2,opt,name=userName,proto3" json:"userName,omitempty"` UserPwd string `protobuf:"bytes,3,opt,name=userPwd,proto3" json:"userPwd,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Request) Descriptor ¶
func (*Request) GetUserName ¶
func (*Request) GetUserPwd ¶
func (*Request) ProtoMessage ¶
func (*Request) ProtoMessage()
func (*Request) XXX_DiscardUnknown ¶
func (m *Request) XXX_DiscardUnknown()
func (*Request) XXX_Marshal ¶
func (*Request) XXX_Unmarshal ¶
type Response ¶
type Response struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` Error *Error `protobuf:"bytes,2,opt,name=error,proto3" json:"error,omitempty"` User *User `protobuf:"bytes,3,opt,name=user,proto3" json:"user,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Response) Descriptor ¶
func (*Response) GetSuccess ¶
func (*Response) ProtoMessage ¶
func (*Response) ProtoMessage()
func (*Response) XXX_DiscardUnknown ¶
func (m *Response) XXX_DiscardUnknown()
func (*Response) XXX_Marshal ¶
func (*Response) XXX_Unmarshal ¶
type User ¶
type User struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Pwd string `protobuf:"bytes,3,opt,name=pwd,proto3" json:"pwd,omitempty"` CreatedTime uint64 `protobuf:"varint,4,opt,name=createdTime,proto3" json:"createdTime,omitempty"` UpdatedTime uint64 `protobuf:"varint,5,opt,name=updatedTime,proto3" json:"updatedTime,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*User) Descriptor ¶
func (*User) GetCreatedTime ¶
func (*User) GetUpdatedTime ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) XXX_DiscardUnknown ¶
func (m *User) XXX_DiscardUnknown()
func (*User) XXX_Unmarshal ¶
type UserHandler ¶
type UserService ¶
type UserService interface {
QueryUserByName(ctx context.Context, in *Request, opts ...client.CallOption) (*Response, error)
}
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
Click to show internal directories.
Click to hide internal directories.