Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthenticateServiceServer(s grpc.ServiceRegistrar, srv AuthenticateServiceServer)
- type ActionReply
- type AuthenticateServiceClient
- type AuthenticateServiceServer
- type LoginReply
- type UnimplementedAuthenticateServiceServer
- type UnsafeAuthenticateServiceServer
- 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 ¶
const ( AuthenticateService_PreLogin_FullMethodName = "/core.v1.AuthenticateService/preLogin" AuthenticateService_Login_FullMethodName = "/core.v1.AuthenticateService/login" AuthenticateService_Logout_FullMethodName = "/core.v1.AuthenticateService/logout" )
Variables ¶
var AuthenticateService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "core.v1.AuthenticateService", HandlerType: (*AuthenticateServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "preLogin", Handler: _AuthenticateService_PreLogin_Handler, }, { MethodName: "login", Handler: _AuthenticateService_Login_Handler, }, { MethodName: "logout", Handler: _AuthenticateService_Logout_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "core/v1/auth.proto", }
AuthenticateService_ServiceDesc is the grpc.ServiceDesc for AuthenticateService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_core_v1_auth_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthenticateServiceServer ¶
func RegisterAuthenticateServiceServer(s grpc.ServiceRegistrar, srv AuthenticateServiceServer)
Types ¶
type ActionReply ¶
type ActionReply struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,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 AuthenticateServiceClient ¶
type AuthenticateServiceClient 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) }
AuthenticateServiceClient is the client API for AuthenticateService 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 NewAuthenticateServiceClient ¶
func NewAuthenticateServiceClient(cc grpc.ClientConnInterface) AuthenticateServiceClient
type AuthenticateServiceServer ¶
type AuthenticateServiceServer interface { PreLogin(context.Context, *User) (*ActionReply, error) Login(context.Context, *User) (*LoginReply, error) Logout(context.Context, *User) (*ActionReply, error) // contains filtered or unexported methods }
AuthenticateServiceServer is the server API for AuthenticateService service. All implementations must embed UnimplementedAuthenticateServiceServer for forward compatibility
type LoginReply ¶
type LoginReply struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,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) GetStatusCode ¶
func (x *LoginReply) GetStatusCode() 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 UnimplementedAuthenticateServiceServer ¶
type UnimplementedAuthenticateServiceServer struct { }
UnimplementedAuthenticateServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthenticateServiceServer) Login ¶
func (UnimplementedAuthenticateServiceServer) Login(context.Context, *User) (*LoginReply, error)
func (UnimplementedAuthenticateServiceServer) Logout ¶
func (UnimplementedAuthenticateServiceServer) Logout(context.Context, *User) (*ActionReply, error)
func (UnimplementedAuthenticateServiceServer) PreLogin ¶
func (UnimplementedAuthenticateServiceServer) PreLogin(context.Context, *User) (*ActionReply, error)
type UnsafeAuthenticateServiceServer ¶
type UnsafeAuthenticateServiceServer interface {
// contains filtered or unexported methods
}
UnsafeAuthenticateServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthenticateServiceServer will result in compilation errors.
type User ¶
type User struct { PhoneNum string `protobuf:"bytes,1,opt,name=phone_num,json=phoneNum,proto3" json:"phone_num,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=phone_num,json=phoneNum,proto3" json:"phone_num,omitempty"` VerificationCode string `protobuf:"bytes,2,opt,name=verification_code,json=verificationCode,proto3" json:"verification_code,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