Documentation
¶
Index ¶
- Variables
- func RegisterUserService(s server.Service, svr UserService)
- func UserService_GetAccountByUserName_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
- type GetAccountByUserNameRequest
- func (*GetAccountByUserNameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountByUserNameRequest) GetMetadata() *common.Metadata
- func (x *GetAccountByUserNameRequest) GetUsername() string
- func (*GetAccountByUserNameRequest) ProtoMessage()
- func (x *GetAccountByUserNameRequest) ProtoReflect() protoreflect.Message
- func (x *GetAccountByUserNameRequest) Reset()
- func (x *GetAccountByUserNameRequest) String() string
- type GetAccountByUserNameResponse
- func (*GetAccountByUserNameResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountByUserNameResponse) GetData() *GetAccountByUserNameResponse_Data
- func (x *GetAccountByUserNameResponse) GetErrCode() int32
- func (x *GetAccountByUserNameResponse) GetErrMsg() string
- func (*GetAccountByUserNameResponse) ProtoMessage()
- func (x *GetAccountByUserNameResponse) ProtoReflect() protoreflect.Message
- func (x *GetAccountByUserNameResponse) Reset()
- func (x *GetAccountByUserNameResponse) String() string
- type GetAccountByUserNameResponse_Data
- func (*GetAccountByUserNameResponse_Data) Descriptor() ([]byte, []int)deprecated
- func (x *GetAccountByUserNameResponse_Data) GetUserInfo() *UserInfo
- func (*GetAccountByUserNameResponse_Data) ProtoMessage()
- func (x *GetAccountByUserNameResponse_Data) ProtoReflect() protoreflect.Message
- func (x *GetAccountByUserNameResponse_Data) Reset()
- func (x *GetAccountByUserNameResponse_Data) String() string
- type UnimplementedUser
- type UserClientProxy
- type UserClientProxyImpl
- type UserInfo
- func (*UserInfo) Descriptor() ([]byte, []int)deprecated
- func (x *UserInfo) GetCreateTsSec() int64
- func (x *UserInfo) GetNickname() string
- func (x *UserInfo) GetPasswordHash() string
- func (x *UserInfo) GetUserId() string
- func (x *UserInfo) GetUsername() string
- func (*UserInfo) ProtoMessage()
- func (x *UserInfo) ProtoReflect() protoreflect.Message
- func (x *UserInfo) Reset()
- func (x *UserInfo) String() string
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_user_proto protoreflect.FileDescriptor
View Source
var NewUserClientProxy = func(opts ...client.Option) UserClientProxy { return &UserClientProxyImpl{client: client.DefaultClient, opts: opts} }
View Source
var UserServer_ServiceDesc = server.ServiceDesc{ ServiceName: "trpc.demo.account.User", HandlerType: ((*UserService)(nil)), Methods: []server.Method{ { Name: "/trpc.demo.account.User/GetAccountByUserName", Func: UserService_GetAccountByUserName_Handler, }, }, }
UserServer_ServiceDesc descriptor for server.RegisterService.
Functions ¶
func RegisterUserService ¶
func RegisterUserService(s server.Service, svr UserService)
RegisterUserService registers service.
func UserService_GetAccountByUserName_Handler ¶
func UserService_GetAccountByUserName_Handler(svr interface{}, ctx context.Context, f server.FilterFunc) (interface{}, error)
Types ¶
type GetAccountByUserNameRequest ¶
type GetAccountByUserNameRequest struct {
Metadata *common.Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
// contains filtered or unexported fields
}
func (*GetAccountByUserNameRequest) Descriptor
deprecated
func (*GetAccountByUserNameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountByUserNameRequest.ProtoReflect.Descriptor instead.
func (*GetAccountByUserNameRequest) GetMetadata ¶
func (x *GetAccountByUserNameRequest) GetMetadata() *common.Metadata
func (*GetAccountByUserNameRequest) GetUsername ¶
func (x *GetAccountByUserNameRequest) GetUsername() string
func (*GetAccountByUserNameRequest) ProtoMessage ¶
func (*GetAccountByUserNameRequest) ProtoMessage()
func (*GetAccountByUserNameRequest) ProtoReflect ¶
func (x *GetAccountByUserNameRequest) ProtoReflect() protoreflect.Message
func (*GetAccountByUserNameRequest) Reset ¶
func (x *GetAccountByUserNameRequest) Reset()
func (*GetAccountByUserNameRequest) String ¶
func (x *GetAccountByUserNameRequest) String() string
type GetAccountByUserNameResponse ¶
type GetAccountByUserNameResponse struct {
ErrCode int32 `protobuf:"varint,1,opt,name=err_code,json=errCode,proto3" json:"err_code"`
ErrMsg string `protobuf:"bytes,2,opt,name=err_msg,json=errMsg,proto3" json:"err_msg,omitempty"`
Data *GetAccountByUserNameResponse_Data `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`
// contains filtered or unexported fields
}
func (*GetAccountByUserNameResponse) Descriptor
deprecated
func (*GetAccountByUserNameResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountByUserNameResponse.ProtoReflect.Descriptor instead.
func (*GetAccountByUserNameResponse) GetData ¶
func (x *GetAccountByUserNameResponse) GetData() *GetAccountByUserNameResponse_Data
func (*GetAccountByUserNameResponse) GetErrCode ¶
func (x *GetAccountByUserNameResponse) GetErrCode() int32
func (*GetAccountByUserNameResponse) GetErrMsg ¶
func (x *GetAccountByUserNameResponse) GetErrMsg() string
func (*GetAccountByUserNameResponse) ProtoMessage ¶
func (*GetAccountByUserNameResponse) ProtoMessage()
func (*GetAccountByUserNameResponse) ProtoReflect ¶
func (x *GetAccountByUserNameResponse) ProtoReflect() protoreflect.Message
func (*GetAccountByUserNameResponse) Reset ¶
func (x *GetAccountByUserNameResponse) Reset()
func (*GetAccountByUserNameResponse) String ¶
func (x *GetAccountByUserNameResponse) String() string
type GetAccountByUserNameResponse_Data ¶
type GetAccountByUserNameResponse_Data struct {
UserInfo *UserInfo `protobuf:"bytes,1,opt,name=user_info,json=userInfo,proto3" json:"user_info,omitempty"`
// contains filtered or unexported fields
}
func (*GetAccountByUserNameResponse_Data) Descriptor
deprecated
func (*GetAccountByUserNameResponse_Data) Descriptor() ([]byte, []int)
Deprecated: Use GetAccountByUserNameResponse_Data.ProtoReflect.Descriptor instead.
func (*GetAccountByUserNameResponse_Data) GetUserInfo ¶
func (x *GetAccountByUserNameResponse_Data) GetUserInfo() *UserInfo
func (*GetAccountByUserNameResponse_Data) ProtoMessage ¶
func (*GetAccountByUserNameResponse_Data) ProtoMessage()
func (*GetAccountByUserNameResponse_Data) ProtoReflect ¶
func (x *GetAccountByUserNameResponse_Data) ProtoReflect() protoreflect.Message
func (*GetAccountByUserNameResponse_Data) Reset ¶
func (x *GetAccountByUserNameResponse_Data) Reset()
func (*GetAccountByUserNameResponse_Data) String ¶
func (x *GetAccountByUserNameResponse_Data) String() string
type UnimplementedUser ¶
type UnimplementedUser struct{}
func (*UnimplementedUser) GetAccountByUserName ¶
func (s *UnimplementedUser) GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest) (*GetAccountByUserNameResponse, error)
type UserClientProxy ¶
type UserClientProxy interface {
GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest, opts ...client.Option) (rsp *GetAccountByUserNameResponse, err error)
}
UserClientProxy defines service client proxy
type UserClientProxyImpl ¶
type UserClientProxyImpl struct {
// contains filtered or unexported fields
}
func (*UserClientProxyImpl) GetAccountByUserName ¶
func (c *UserClientProxyImpl) GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest, opts ...client.Option) (*GetAccountByUserNameResponse, error)
type UserInfo ¶
type UserInfo struct {
UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
PasswordHash string `protobuf:"bytes,3,opt,name=password_hash,json=passwordHash,proto3" json:"password_hash,omitempty"`
Nickname string `protobuf:"bytes,4,opt,name=nickname,proto3" json:"nickname,omitempty"`
CreateTsSec int64 `protobuf:"varint,5,opt,name=create_ts_sec,json=createTsSec,proto3" json:"create_ts_sec,omitempty"`
// contains filtered or unexported fields
}
func (*UserInfo) Descriptor
deprecated
func (*UserInfo) GetCreateTsSec ¶
func (*UserInfo) GetNickname ¶
func (*UserInfo) GetPasswordHash ¶
func (*UserInfo) GetUsername ¶
func (*UserInfo) ProtoMessage ¶
func (*UserInfo) ProtoMessage()
func (*UserInfo) ProtoReflect ¶
func (x *UserInfo) ProtoReflect() protoreflect.Message
type UserService ¶
type UserService interface {
GetAccountByUserName(ctx context.Context, req *GetAccountByUserNameRequest) (*GetAccountByUserNameResponse, error)
}
UserService defines service.
Click to show internal directories.
Click to hide internal directories.