Documentation ¶
Index ¶
- Variables
- func NewUserServiceEndpoints() []*api.Endpoint
- func RegisterUserServiceHandler(s server.Server, hdlr UserServiceHandler, opts ...server.HandlerOption) error
- type UserDetailResponse
- func (*UserDetailResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserDetailResponse) GetCode() uint32
- func (x *UserDetailResponse) GetUserDetail() *UserModel
- func (*UserDetailResponse) ProtoMessage()
- func (x *UserDetailResponse) ProtoReflect() protoreflect.Message
- func (x *UserDetailResponse) Reset()
- func (x *UserDetailResponse) String() string
- type UserModel
- func (*UserModel) Descriptor() ([]byte, []int)deprecated
- func (x *UserModel) GetCreatedAt() int64
- func (x *UserModel) GetDeletedAt() int64
- func (x *UserModel) GetID() uint32
- func (x *UserModel) GetUpdatedAt() int64
- func (x *UserModel) GetUserName() string
- func (*UserModel) ProtoMessage()
- func (x *UserModel) ProtoReflect() protoreflect.Message
- func (x *UserModel) Reset()
- func (x *UserModel) String() string
- type UserRequest
- func (*UserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRequest) GetPassword() string
- func (x *UserRequest) GetPasswordConfirm() string
- func (x *UserRequest) GetUserName() string
- func (*UserRequest) ProtoMessage()
- func (x *UserRequest) ProtoReflect() protoreflect.Message
- func (x *UserRequest) Reset()
- func (x *UserRequest) String() string
- type UserService
- type UserServiceHandler
Constants ¶
This section is empty.
Variables ¶
View Source
var File_userModels_proto protoreflect.FileDescriptor
View Source
var File_userService_proto protoreflect.FileDescriptor
Functions ¶
func NewUserServiceEndpoints ¶
func RegisterUserServiceHandler ¶
func RegisterUserServiceHandler(s server.Server, hdlr UserServiceHandler, opts ...server.HandlerOption) error
Types ¶
type UserDetailResponse ¶
type UserDetailResponse struct { UserDetail *UserModel `protobuf:"bytes,1,opt,name=UserDetail,proto3" json:"UserDetail,omitempty"` Code uint32 `protobuf:"varint,2,opt,name=Code,proto3" json:"Code,omitempty"` // contains filtered or unexported fields }
func (*UserDetailResponse) Descriptor
deprecated
func (*UserDetailResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserDetailResponse.ProtoReflect.Descriptor instead.
func (*UserDetailResponse) GetCode ¶
func (x *UserDetailResponse) GetCode() uint32
func (*UserDetailResponse) GetUserDetail ¶
func (x *UserDetailResponse) GetUserDetail() *UserModel
func (*UserDetailResponse) ProtoMessage ¶
func (*UserDetailResponse) ProtoMessage()
func (*UserDetailResponse) ProtoReflect ¶
func (x *UserDetailResponse) ProtoReflect() protoreflect.Message
func (*UserDetailResponse) Reset ¶
func (x *UserDetailResponse) Reset()
func (*UserDetailResponse) String ¶
func (x *UserDetailResponse) String() string
type UserModel ¶
type UserModel struct { //命名注意一定要大写 // @inject_tag: json:"id" ID uint32 `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"` // @inject_tag: json:"user_name" UserName string `protobuf:"bytes,2,opt,name=UserName,proto3" json:"UserName,omitempty"` // @inject_tag: json:"created_at" CreatedAt int64 `protobuf:"varint,3,opt,name=CreatedAt,proto3" json:"CreatedAt,omitempty"` // @inject_tag: json:"updated_at" UpdatedAt int64 `protobuf:"varint,4,opt,name=UpdatedAt,proto3" json:"UpdatedAt,omitempty"` // @inject_tag: json:"deleted_at" DeletedAt int64 `protobuf:"varint,5,opt,name=DeletedAt,proto3" json:"DeletedAt,omitempty"` // contains filtered or unexported fields }
func (*UserModel) Descriptor
deprecated
func (*UserModel) GetCreatedAt ¶
func (*UserModel) GetDeletedAt ¶
func (*UserModel) GetUpdatedAt ¶
func (*UserModel) GetUserName ¶
func (*UserModel) ProtoMessage ¶
func (*UserModel) ProtoMessage()
func (*UserModel) ProtoReflect ¶
func (x *UserModel) ProtoReflect() protoreflect.Message
type UserRequest ¶
type UserRequest struct { // @inject_tag: json:"user_name" form:"user_name" uri:"user_name" UserName string `protobuf:"bytes,1,opt,name=UserName,proto3" json:"UserName,omitempty"` // @inject_tag: json:"password" form:"password" uri:"password" Password string `protobuf:"bytes,2,opt,name=Password,proto3" json:"Password,omitempty"` // @inject_tag: json:"password_confirm" form:"password_confirm" uri:"password_confirm" PasswordConfirm string `protobuf:"bytes,3,opt,name=PasswordConfirm,proto3" json:"PasswordConfirm,omitempty"` // contains filtered or unexported fields }
func (*UserRequest) Descriptor
deprecated
func (*UserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRequest.ProtoReflect.Descriptor instead.
func (*UserRequest) GetPassword ¶
func (x *UserRequest) GetPassword() string
func (*UserRequest) GetPasswordConfirm ¶
func (x *UserRequest) GetPasswordConfirm() string
func (*UserRequest) GetUserName ¶
func (x *UserRequest) GetUserName() string
func (*UserRequest) ProtoMessage ¶
func (*UserRequest) ProtoMessage()
func (*UserRequest) ProtoReflect ¶
func (x *UserRequest) ProtoReflect() protoreflect.Message
func (*UserRequest) Reset ¶
func (x *UserRequest) Reset()
func (*UserRequest) String ¶
func (x *UserRequest) String() string
type UserService ¶
type UserService interface { UserLogin(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error) UserRegister(ctx context.Context, in *UserRequest, opts ...client.CallOption) (*UserDetailResponse, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
type UserServiceHandler ¶
type UserServiceHandler interface { UserLogin(context.Context, *UserRequest, *UserDetailResponse) error UserRegister(context.Context, *UserRequest, *UserDetailResponse) error }
Click to show internal directories.
Click to hide internal directories.