Documentation
¶
Index ¶
- Variables
- func NewUserEndpoints() []*api.Endpoint
- func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
- type RequestLogin
- func (*RequestLogin) Descriptor() ([]byte, []int)deprecated
- func (x *RequestLogin) GetName() string
- func (x *RequestLogin) GetPassword() string
- func (*RequestLogin) ProtoMessage()
- func (x *RequestLogin) ProtoReflect() protoreflect.Message
- func (x *RequestLogin) Reset()
- func (x *RequestLogin) String() string
- type ResponseLogin
- func (*ResponseLogin) Descriptor() ([]byte, []int)deprecated
- func (x *ResponseLogin) GetCode() int32
- func (x *ResponseLogin) GetMessage() string
- func (x *ResponseLogin) GetUserId() int64
- func (*ResponseLogin) ProtoMessage()
- func (x *ResponseLogin) ProtoReflect() protoreflect.Message
- func (x *ResponseLogin) Reset()
- func (x *ResponseLogin) String() string
- type UserHandler
- type UserService
Constants ¶
This section is empty.
Variables ¶
View Source
var File_proto_user_proto protoreflect.FileDescriptor
Functions ¶
func NewUserEndpoints ¶
func RegisterUserHandler ¶
func RegisterUserHandler(s server.Server, hdlr UserHandler, opts ...server.HandlerOption) error
Types ¶
type RequestLogin ¶
type RequestLogin struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*RequestLogin) Descriptor
deprecated
func (*RequestLogin) Descriptor() ([]byte, []int)
Deprecated: Use RequestLogin.ProtoReflect.Descriptor instead.
func (*RequestLogin) GetName ¶
func (x *RequestLogin) GetName() string
func (*RequestLogin) GetPassword ¶
func (x *RequestLogin) GetPassword() string
func (*RequestLogin) ProtoMessage ¶
func (*RequestLogin) ProtoMessage()
func (*RequestLogin) ProtoReflect ¶
func (x *RequestLogin) ProtoReflect() protoreflect.Message
func (*RequestLogin) Reset ¶
func (x *RequestLogin) Reset()
func (*RequestLogin) String ¶
func (x *RequestLogin) String() string
type ResponseLogin ¶
type ResponseLogin struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*ResponseLogin) Descriptor
deprecated
func (*ResponseLogin) Descriptor() ([]byte, []int)
Deprecated: Use ResponseLogin.ProtoReflect.Descriptor instead.
func (*ResponseLogin) GetCode ¶
func (x *ResponseLogin) GetCode() int32
func (*ResponseLogin) GetMessage ¶
func (x *ResponseLogin) GetMessage() string
func (*ResponseLogin) GetUserId ¶
func (x *ResponseLogin) GetUserId() int64
func (*ResponseLogin) ProtoMessage ¶
func (*ResponseLogin) ProtoMessage()
func (*ResponseLogin) ProtoReflect ¶
func (x *ResponseLogin) ProtoReflect() protoreflect.Message
func (*ResponseLogin) Reset ¶
func (x *ResponseLogin) Reset()
func (*ResponseLogin) String ¶
func (x *ResponseLogin) String() string
type UserHandler ¶
type UserHandler interface { Login(context.Context, *RequestLogin, *ResponseLogin) error SignUp(context.Context, *RequestLogin, *ResponseLogin) error }
type UserService ¶
type UserService interface { Login(ctx context.Context, in *RequestLogin, opts ...client.CallOption) (*ResponseLogin, error) SignUp(ctx context.Context, in *RequestLogin, opts ...client.CallOption) (*ResponseLogin, error) }
func NewUserService ¶
func NewUserService(name string, c client.Client) UserService
Click to show internal directories.
Click to hide internal directories.