Documentation ¶
Index ¶
- Variables
- func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)
- type CheckReq
- type CheckRes
- func (*CheckRes) Descriptor() ([]byte, []int)deprecated
- func (x *CheckRes) GetCode() bool
- func (x *CheckRes) GetNewToken() string
- func (x *CheckRes) GetUserID() string
- func (*CheckRes) ProtoMessage()
- func (x *CheckRes) ProtoReflect() protoreflect.Message
- func (x *CheckRes) Reset()
- func (x *CheckRes) String() string
- type LoginReq
- type LoginRes
- type SignUpReq
- type SignUpRes
- type UnimplementedUserAuthServer
- type UnsafeUserAuthServer
- type UserAuthClient
- type UserAuthServer
Constants ¶
This section is empty.
Variables ¶
var File_auth_proto protoreflect.FileDescriptor
var UserAuth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "handler.UserAuth", HandlerType: (*UserAuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Login", Handler: _UserAuth_Login_Handler, }, { MethodName: "SignUp", Handler: _UserAuth_SignUp_Handler, }, { MethodName: "Check", Handler: _UserAuth_Check_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "auth.proto", }
UserAuth_ServiceDesc is the grpc.ServiceDesc for UserAuth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterUserAuthServer ¶
func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)
Types ¶
type CheckReq ¶
type CheckReq struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*CheckReq) Descriptor
deprecated
func (*CheckReq) ProtoMessage ¶
func (*CheckReq) ProtoMessage()
func (*CheckReq) ProtoReflect ¶
func (x *CheckReq) ProtoReflect() protoreflect.Message
type CheckRes ¶
type CheckRes struct { NewToken string `protobuf:"bytes,1,opt,name=newToken,proto3" json:"newToken,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` Code bool `protobuf:"varint,3,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*CheckRes) Descriptor
deprecated
func (*CheckRes) GetNewToken ¶
func (*CheckRes) ProtoMessage ¶
func (*CheckRes) ProtoMessage()
func (*CheckRes) ProtoReflect ¶
func (x *CheckRes) ProtoReflect() protoreflect.Message
type LoginReq ¶
type LoginReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
func (*LoginReq) Descriptor
deprecated
func (*LoginReq) ProtoMessage ¶
func (*LoginReq) ProtoMessage()
func (*LoginReq) ProtoReflect ¶
func (x *LoginReq) ProtoReflect() protoreflect.Message
type LoginRes ¶
type LoginRes struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*LoginRes) Descriptor
deprecated
func (*LoginRes) ProtoMessage ¶
func (*LoginRes) ProtoMessage()
func (*LoginRes) ProtoReflect ¶
func (x *LoginRes) ProtoReflect() protoreflect.Message
type SignUpReq ¶
type SignUpReq struct { Email string `protobuf:"bytes,1,opt,name=email,proto3" json:"email,omitempty"` Pwd string `protobuf:"bytes,2,opt,name=pwd,proto3" json:"pwd,omitempty"` // contains filtered or unexported fields }
func (*SignUpReq) Descriptor
deprecated
func (*SignUpReq) ProtoMessage ¶
func (*SignUpReq) ProtoMessage()
func (*SignUpReq) ProtoReflect ¶
func (x *SignUpReq) ProtoReflect() protoreflect.Message
type SignUpRes ¶
type SignUpRes struct { Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"` UserID string `protobuf:"bytes,2,opt,name=userID,proto3" json:"userID,omitempty"` // contains filtered or unexported fields }
func (*SignUpRes) Descriptor
deprecated
func (*SignUpRes) ProtoMessage ¶
func (*SignUpRes) ProtoMessage()
func (*SignUpRes) ProtoReflect ¶
func (x *SignUpRes) ProtoReflect() protoreflect.Message
type UnimplementedUserAuthServer ¶
type UnimplementedUserAuthServer struct { }
UnimplementedUserAuthServer must be embedded to have forward compatible implementations.
type UnsafeUserAuthServer ¶
type UnsafeUserAuthServer interface {
// contains filtered or unexported methods
}
UnsafeUserAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserAuthServer will result in compilation errors.
type UserAuthClient ¶
type UserAuthClient interface { Login(ctx context.Context, in *LoginReq, opts ...grpc.CallOption) (*LoginRes, error) SignUp(ctx context.Context, in *SignUpReq, opts ...grpc.CallOption) (*SignUpRes, error) Check(ctx context.Context, in *CheckReq, opts ...grpc.CallOption) (*CheckRes, error) }
UserAuthClient is the client API for UserAuth service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewUserAuthClient ¶
func NewUserAuthClient(cc grpc.ClientConnInterface) UserAuthClient
type UserAuthServer ¶
type UserAuthServer interface { Login(context.Context, *LoginReq) (*LoginRes, error) SignUp(context.Context, *SignUpReq) (*SignUpRes, error) Check(context.Context, *CheckReq) (*CheckRes, error) // contains filtered or unexported methods }
UserAuthServer is the server API for UserAuth service. All implementations must embed UnimplementedUserAuthServer for forward compatibility