Documentation ¶
Index ¶
- Variables
- func RegisterAuthenticateServer(s grpc.ServiceRegistrar, srv AuthenticateServer)
- type ActionReply
- type AuthenticateClient
- type AuthenticateServer
- type LoginReply
- type UnimplementedAuthenticateServer
- type UnsafeAuthenticateServer
- type User
- type UserVerify
- func (*UserVerify) Descriptor() ([]byte, []int)deprecated
- func (x *UserVerify) GetPhoneNum() string
- func (x *UserVerify) GetVerificationCode() string
- func (*UserVerify) ProtoMessage()
- func (x *UserVerify) ProtoReflect() protoreflect.Message
- func (x *UserVerify) Reset()
- func (x *UserVerify) String() string
Constants ¶
This section is empty.
Variables ¶
var Authenticate_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Authenticate", HandlerType: (*AuthenticateServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "preLogin", Handler: _Authenticate_PreLogin_Handler, }, { MethodName: "login", Handler: _Authenticate_Login_Handler, }, { MethodName: "logout", Handler: _Authenticate_Logout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/auth.proto", }
Authenticate_ServiceDesc is the grpc.ServiceDesc for Authenticate service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthenticateServer ¶
func RegisterAuthenticateServer(s grpc.ServiceRegistrar, srv AuthenticateServer)
Types ¶
type ActionReply ¶
type ActionReply struct { StatusCode int32 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` // contains filtered or unexported fields }
func (*ActionReply) Descriptor
deprecated
func (*ActionReply) Descriptor() ([]byte, []int)
Deprecated: Use ActionReply.ProtoReflect.Descriptor instead.
func (*ActionReply) GetStatusCode ¶
func (x *ActionReply) GetStatusCode() int32
func (*ActionReply) ProtoMessage ¶
func (*ActionReply) ProtoMessage()
func (*ActionReply) ProtoReflect ¶
func (x *ActionReply) ProtoReflect() protoreflect.Message
func (*ActionReply) Reset ¶
func (x *ActionReply) Reset()
func (*ActionReply) String ¶
func (x *ActionReply) String() string
type AuthenticateClient ¶
type AuthenticateClient interface { PreLogin(ctx context.Context, in *User, opts ...grpc.CallOption) (*ActionReply, error) Login(ctx context.Context, in *User, opts ...grpc.CallOption) (*LoginReply, error) Logout(ctx context.Context, in *User, opts ...grpc.CallOption) (*ActionReply, error) }
AuthenticateClient is the client API for Authenticate 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 NewAuthenticateClient ¶
func NewAuthenticateClient(cc grpc.ClientConnInterface) AuthenticateClient
type AuthenticateServer ¶
type AuthenticateServer interface { PreLogin(context.Context, *User) (*ActionReply, error) Login(context.Context, *User) (*LoginReply, error) Logout(context.Context, *User) (*ActionReply, error) // contains filtered or unexported methods }
AuthenticateServer is the server API for Authenticate service. All implementations must embed UnimplementedAuthenticateServer for forward compatibility
type LoginReply ¶
type LoginReply struct { StatuCode int32 `protobuf:"varint,1,opt,name=statuCode,proto3" json:"statuCode,omitempty"` Token string `protobuf:"bytes,2,opt,name=token,proto3" json:"token,omitempty"` // contains filtered or unexported fields }
func (*LoginReply) Descriptor
deprecated
func (*LoginReply) Descriptor() ([]byte, []int)
Deprecated: Use LoginReply.ProtoReflect.Descriptor instead.
func (*LoginReply) GetStatuCode ¶
func (x *LoginReply) GetStatuCode() int32
func (*LoginReply) GetToken ¶
func (x *LoginReply) GetToken() string
func (*LoginReply) ProtoMessage ¶
func (*LoginReply) ProtoMessage()
func (*LoginReply) ProtoReflect ¶
func (x *LoginReply) ProtoReflect() protoreflect.Message
func (*LoginReply) Reset ¶
func (x *LoginReply) Reset()
func (*LoginReply) String ¶
func (x *LoginReply) String() string
type UnimplementedAuthenticateServer ¶
type UnimplementedAuthenticateServer struct { }
UnimplementedAuthenticateServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthenticateServer) Login ¶
func (UnimplementedAuthenticateServer) Login(context.Context, *User) (*LoginReply, error)
func (UnimplementedAuthenticateServer) Logout ¶
func (UnimplementedAuthenticateServer) Logout(context.Context, *User) (*ActionReply, error)
func (UnimplementedAuthenticateServer) PreLogin ¶
func (UnimplementedAuthenticateServer) PreLogin(context.Context, *User) (*ActionReply, error)
type UnsafeAuthenticateServer ¶
type UnsafeAuthenticateServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticateServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticateServer will result in compilation errors.
type User ¶
type User struct { PhoneNum string `protobuf:"bytes,1,opt,name=phoneNum,proto3" json:"phoneNum,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetPhoneNum ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserVerify ¶
type UserVerify struct { PhoneNum string `protobuf:"bytes,1,opt,name=phoneNum,proto3" json:"phoneNum,omitempty"` VerificationCode string `protobuf:"bytes,2,opt,name=VerificationCode,proto3" json:"VerificationCode,omitempty"` // contains filtered or unexported fields }
func (*UserVerify) Descriptor
deprecated
func (*UserVerify) Descriptor() ([]byte, []int)
Deprecated: Use UserVerify.ProtoReflect.Descriptor instead.
func (*UserVerify) GetPhoneNum ¶
func (x *UserVerify) GetPhoneNum() string
func (*UserVerify) GetVerificationCode ¶
func (x *UserVerify) GetVerificationCode() string
func (*UserVerify) ProtoMessage ¶
func (*UserVerify) ProtoMessage()
func (*UserVerify) ProtoReflect ¶
func (x *UserVerify) ProtoReflect() protoreflect.Message
func (*UserVerify) Reset ¶
func (x *UserVerify) Reset()
func (*UserVerify) String ¶
func (x *UserVerify) String() string