Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterPassportServer(s grpc.ServiceRegistrar, srv PassportServer)
- type AuthReq
- type AuthReq_Credential
- func (*AuthReq_Credential) Descriptor() ([]byte, []int)deprecated
- func (x *AuthReq_Credential) GetAccount() string
- func (x *AuthReq_Credential) GetKey() string
- func (*AuthReq_Credential) ProtoMessage()
- func (x *AuthReq_Credential) ProtoReflect() protoreflect.Message
- func (x *AuthReq_Credential) Reset()
- func (x *AuthReq_Credential) String() string
- type AuthReq_Method
- func (AuthReq_Method) Descriptor() protoreflect.EnumDescriptor
- func (x AuthReq_Method) Enum() *AuthReq_Method
- func (AuthReq_Method) EnumDescriptor() ([]byte, []int)deprecated
- func (x AuthReq_Method) Number() protoreflect.EnumNumber
- func (x AuthReq_Method) String() string
- func (AuthReq_Method) Type() protoreflect.EnumType
- type BindThirdPartyAccountReq
- func (*BindThirdPartyAccountReq) Descriptor() ([]byte, []int)deprecated
- func (x *BindThirdPartyAccountReq) GetAccount() string
- func (x *BindThirdPartyAccountReq) GetId() string
- func (x *BindThirdPartyAccountReq) GetType() BindThirdPartyAccountReq_Type
- func (*BindThirdPartyAccountReq) ProtoMessage()
- func (x *BindThirdPartyAccountReq) ProtoReflect() protoreflect.Message
- func (x *BindThirdPartyAccountReq) Reset()
- func (x *BindThirdPartyAccountReq) String() string
- type BindThirdPartyAccountReq_Type
- func (BindThirdPartyAccountReq_Type) Descriptor() protoreflect.EnumDescriptor
- func (x BindThirdPartyAccountReq_Type) Enum() *BindThirdPartyAccountReq_Type
- func (BindThirdPartyAccountReq_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x BindThirdPartyAccountReq_Type) Number() protoreflect.EnumNumber
- func (x BindThirdPartyAccountReq_Type) String() string
- func (BindThirdPartyAccountReq_Type) Type() protoreflect.EnumType
- type ConfirmCodeReq
- func (*ConfirmCodeReq) Descriptor() ([]byte, []int)deprecated
- func (x *ConfirmCodeReq) GetBindRequestId() string
- func (x *ConfirmCodeReq) GetCode() string
- func (*ConfirmCodeReq) ProtoMessage()
- func (x *ConfirmCodeReq) ProtoReflect() protoreflect.Message
- func (x *ConfirmCodeReq) Reset()
- func (x *ConfirmCodeReq) String() string
- type CreateVerificationCodeReq
- func (*CreateVerificationCodeReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateVerificationCodeReq) GetAccount() string
- func (x *CreateVerificationCodeReq) GetType() CreateVerificationCodeReq_Type
- func (*CreateVerificationCodeReq) ProtoMessage()
- func (x *CreateVerificationCodeReq) ProtoReflect() protoreflect.Message
- func (x *CreateVerificationCodeReq) Reset()
- func (x *CreateVerificationCodeReq) String() string
- type CreateVerificationCodeReq_Type
- func (CreateVerificationCodeReq_Type) Descriptor() protoreflect.EnumDescriptor
- func (x CreateVerificationCodeReq_Type) Enum() *CreateVerificationCodeReq_Type
- func (CreateVerificationCodeReq_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x CreateVerificationCodeReq_Type) Number() protoreflect.EnumNumber
- func (x CreateVerificationCodeReq_Type) String() string
- func (CreateVerificationCodeReq_Type) Type() protoreflect.EnumType
- type CreateVerificationCodeResp
- func (*CreateVerificationCodeResp) Descriptor() ([]byte, []int)deprecated
- func (x *CreateVerificationCodeResp) GetCode() string
- func (x *CreateVerificationCodeResp) GetExpiresIn() int64
- func (*CreateVerificationCodeResp) ProtoMessage()
- func (x *CreateVerificationCodeResp) ProtoReflect() protoreflect.Message
- func (x *CreateVerificationCodeResp) Reset()
- func (x *CreateVerificationCodeResp) String() string
- type ModifyPasswordReq
- func (*ModifyPasswordReq) Descriptor() ([]byte, []int)deprecated
- func (x *ModifyPasswordReq) GetId() string
- func (x *ModifyPasswordReq) GetPassword() string
- func (*ModifyPasswordReq) ProtoMessage()
- func (x *ModifyPasswordReq) ProtoReflect() protoreflect.Message
- func (x *ModifyPasswordReq) Reset()
- func (x *ModifyPasswordReq) String() string
- type PassportClient
- type PassportServer
- type RegisterReq
- func (*RegisterReq) Descriptor() ([]byte, []int)deprecated
- func (x *RegisterReq) GetAccount() string
- func (x *RegisterReq) GetPassword() string
- func (*RegisterReq) ProtoMessage()
- func (x *RegisterReq) ProtoReflect() protoreflect.Message
- func (x *RegisterReq) Reset()
- func (x *RegisterReq) String() string
- type Token
- func (*Token) Descriptor() ([]byte, []int)deprecated
- func (x *Token) GetAccessToken() string
- func (x *Token) GetExpiresIn() int64
- func (x *Token) GetRefreshToken() string
- func (x *Token) GetTokenType() string
- func (*Token) ProtoMessage()
- func (x *Token) ProtoReflect() protoreflect.Message
- func (x *Token) Reset()
- func (x *Token) String() string
- type UnimplementedPassportServer
- func (UnimplementedPassportServer) Auth(context.Context, *AuthReq) (*Token, error)
- func (UnimplementedPassportServer) BindThirdPartyAccount(context.Context, *BindThirdPartyAccountReq) (*wrapperspb.StringValue, error)
- func (UnimplementedPassportServer) ConfirmCode(context.Context, *ConfirmCodeReq) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) CreateVerificationCode(context.Context, *CreateVerificationCodeReq) (*CreateVerificationCodeResp, error)
- func (UnimplementedPassportServer) Exist(context.Context, *wrapperspb.StringValue) (*wrapperspb.BoolValue, error)
- func (UnimplementedPassportServer) Get(context.Context, *wrapperspb.StringValue) (*User, error)
- func (UnimplementedPassportServer) List(context.Context, *UserReq) (*UserResp, error)
- func (UnimplementedPassportServer) Lock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) ModifyPassword(context.Context, *ModifyPasswordReq) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) Register(context.Context, *RegisterReq) (*wrapperspb.StringValue, error)
- func (UnimplementedPassportServer) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) RenewToken(context.Context, *Token) (*Token, error)
- func (UnimplementedPassportServer) RevokeToken(context.Context, *Token) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) Unlock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
- func (UnimplementedPassportServer) VerifyToken(context.Context, *Token) (*emptypb.Empty, error)
- type UnsafePassportServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAccount() string
- func (x *User) GetCode() string
- func (x *User) GetEmail() string
- func (x *User) GetId() string
- func (x *User) GetPhone() string
- func (x *User) GetRegisterDatetime() int64
- func (x *User) GetStatus() int32
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- type UserReq
- type UserResp
Constants ¶
const ( Passport_BindThirdPartyAccount_FullMethodName = "/auth.Passport/BindThirdPartyAccount" Passport_ConfirmCode_FullMethodName = "/auth.Passport/ConfirmCode" Passport_CreateVerificationCode_FullMethodName = "/auth.Passport/CreateVerificationCode" Passport_Register_FullMethodName = "/auth.Passport/Register" Passport_Auth_FullMethodName = "/auth.Passport/Auth" Passport_RenewToken_FullMethodName = "/auth.Passport/RenewToken" Passport_VerifyToken_FullMethodName = "/auth.Passport/VerifyToken" Passport_RevokeToken_FullMethodName = "/auth.Passport/RevokeToken" Passport_Exist_FullMethodName = "/auth.Passport/Exist" Passport_Lock_FullMethodName = "/auth.Passport/Lock" Passport_Unlock_FullMethodName = "/auth.Passport/Unlock" Passport_List_FullMethodName = "/auth.Passport/List" Passport_Get_FullMethodName = "/auth.Passport/Get" Passport_Remove_FullMethodName = "/auth.Passport/Remove" Passport_ModifyPassword_FullMethodName = "/auth.Passport/ModifyPassword" )
Variables ¶
var ( BindThirdPartyAccountReq_Type_name = map[int32]string{ 0: "EMAIL", 1: "PHONE", } BindThirdPartyAccountReq_Type_value = map[string]int32{ "EMAIL": 0, "PHONE": 1, } )
Enum value maps for BindThirdPartyAccountReq_Type.
var ( AuthReq_Method_name = map[int32]string{ 0: "PASSWORD", 1: "SMS", } AuthReq_Method_value = map[string]int32{ "PASSWORD": 0, "SMS": 1, } )
Enum value maps for AuthReq_Method.
var ( CreateVerificationCodeReq_Type_name = map[int32]string{ 0: "EMAIL", 1: "PHONE", } CreateVerificationCodeReq_Type_value = map[string]int32{ "EMAIL": 0, "PHONE": 1, } )
Enum value maps for CreateVerificationCodeReq_Type.
var File_passport_proto protoreflect.FileDescriptor
var Passport_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Passport", HandlerType: (*PassportServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "BindThirdPartyAccount", Handler: _Passport_BindThirdPartyAccount_Handler, }, { MethodName: "ConfirmCode", Handler: _Passport_ConfirmCode_Handler, }, { MethodName: "CreateVerificationCode", Handler: _Passport_CreateVerificationCode_Handler, }, { MethodName: "Register", Handler: _Passport_Register_Handler, }, { MethodName: "Auth", Handler: _Passport_Auth_Handler, }, { MethodName: "RenewToken", Handler: _Passport_RenewToken_Handler, }, { MethodName: "VerifyToken", Handler: _Passport_VerifyToken_Handler, }, { MethodName: "RevokeToken", Handler: _Passport_RevokeToken_Handler, }, { MethodName: "Exist", Handler: _Passport_Exist_Handler, }, { MethodName: "Lock", Handler: _Passport_Lock_Handler, }, { MethodName: "Unlock", Handler: _Passport_Unlock_Handler, }, { MethodName: "List", Handler: _Passport_List_Handler, }, { MethodName: "Get", Handler: _Passport_Get_Handler, }, { MethodName: "Remove", Handler: _Passport_Remove_Handler, }, { MethodName: "ModifyPassword", Handler: _Passport_ModifyPassword_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "passport.proto", }
Passport_ServiceDesc is the grpc.ServiceDesc for Passport service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterPassportServer ¶
func RegisterPassportServer(s grpc.ServiceRegistrar, srv PassportServer)
Types ¶
type AuthReq ¶
type AuthReq struct { Method AuthReq_Method `protobuf:"varint,1,opt,name=method,proto3,enum=auth.AuthReq_Method" json:"method,omitempty"` Credential *AuthReq_Credential `protobuf:"bytes,2,opt,name=credential,proto3" json:"credential,omitempty"` // contains filtered or unexported fields }
func (*AuthReq) Descriptor
deprecated
func (*AuthReq) GetCredential ¶
func (x *AuthReq) GetCredential() *AuthReq_Credential
func (*AuthReq) GetMethod ¶
func (x *AuthReq) GetMethod() AuthReq_Method
func (*AuthReq) ProtoMessage ¶
func (*AuthReq) ProtoMessage()
func (*AuthReq) ProtoReflect ¶
func (x *AuthReq) ProtoReflect() protoreflect.Message
type AuthReq_Credential ¶
type AuthReq_Credential struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key,omitempty"` // contains filtered or unexported fields }
func (*AuthReq_Credential) Descriptor
deprecated
func (*AuthReq_Credential) Descriptor() ([]byte, []int)
Deprecated: Use AuthReq_Credential.ProtoReflect.Descriptor instead.
func (*AuthReq_Credential) GetAccount ¶
func (x *AuthReq_Credential) GetAccount() string
func (*AuthReq_Credential) GetKey ¶
func (x *AuthReq_Credential) GetKey() string
func (*AuthReq_Credential) ProtoMessage ¶
func (*AuthReq_Credential) ProtoMessage()
func (*AuthReq_Credential) ProtoReflect ¶
func (x *AuthReq_Credential) ProtoReflect() protoreflect.Message
func (*AuthReq_Credential) Reset ¶
func (x *AuthReq_Credential) Reset()
func (*AuthReq_Credential) String ¶
func (x *AuthReq_Credential) String() string
type AuthReq_Method ¶
type AuthReq_Method int32
const ( AuthReq_PASSWORD AuthReq_Method = 0 AuthReq_SMS AuthReq_Method = 1 )
func (AuthReq_Method) Descriptor ¶
func (AuthReq_Method) Descriptor() protoreflect.EnumDescriptor
func (AuthReq_Method) Enum ¶
func (x AuthReq_Method) Enum() *AuthReq_Method
func (AuthReq_Method) EnumDescriptor
deprecated
func (AuthReq_Method) EnumDescriptor() ([]byte, []int)
Deprecated: Use AuthReq_Method.Descriptor instead.
func (AuthReq_Method) Number ¶
func (x AuthReq_Method) Number() protoreflect.EnumNumber
func (AuthReq_Method) String ¶
func (x AuthReq_Method) String() string
func (AuthReq_Method) Type ¶
func (AuthReq_Method) Type() protoreflect.EnumType
type BindThirdPartyAccountReq ¶
type BindThirdPartyAccountReq struct { Type BindThirdPartyAccountReq_Type `protobuf:"varint,1,opt,name=type,proto3,enum=auth.BindThirdPartyAccountReq_Type" json:"type,omitempty"` Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` Account string `protobuf:"bytes,3,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*BindThirdPartyAccountReq) Descriptor
deprecated
func (*BindThirdPartyAccountReq) Descriptor() ([]byte, []int)
Deprecated: Use BindThirdPartyAccountReq.ProtoReflect.Descriptor instead.
func (*BindThirdPartyAccountReq) GetAccount ¶
func (x *BindThirdPartyAccountReq) GetAccount() string
func (*BindThirdPartyAccountReq) GetId ¶
func (x *BindThirdPartyAccountReq) GetId() string
func (*BindThirdPartyAccountReq) GetType ¶
func (x *BindThirdPartyAccountReq) GetType() BindThirdPartyAccountReq_Type
func (*BindThirdPartyAccountReq) ProtoMessage ¶
func (*BindThirdPartyAccountReq) ProtoMessage()
func (*BindThirdPartyAccountReq) ProtoReflect ¶
func (x *BindThirdPartyAccountReq) ProtoReflect() protoreflect.Message
func (*BindThirdPartyAccountReq) Reset ¶
func (x *BindThirdPartyAccountReq) Reset()
func (*BindThirdPartyAccountReq) String ¶
func (x *BindThirdPartyAccountReq) String() string
type BindThirdPartyAccountReq_Type ¶
type BindThirdPartyAccountReq_Type int32
const ( BindThirdPartyAccountReq_EMAIL BindThirdPartyAccountReq_Type = 0 BindThirdPartyAccountReq_PHONE BindThirdPartyAccountReq_Type = 1 )
func (BindThirdPartyAccountReq_Type) Descriptor ¶
func (BindThirdPartyAccountReq_Type) Descriptor() protoreflect.EnumDescriptor
func (BindThirdPartyAccountReq_Type) Enum ¶
func (x BindThirdPartyAccountReq_Type) Enum() *BindThirdPartyAccountReq_Type
func (BindThirdPartyAccountReq_Type) EnumDescriptor
deprecated
func (BindThirdPartyAccountReq_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use BindThirdPartyAccountReq_Type.Descriptor instead.
func (BindThirdPartyAccountReq_Type) Number ¶
func (x BindThirdPartyAccountReq_Type) Number() protoreflect.EnumNumber
func (BindThirdPartyAccountReq_Type) String ¶
func (x BindThirdPartyAccountReq_Type) String() string
func (BindThirdPartyAccountReq_Type) Type ¶
func (BindThirdPartyAccountReq_Type) Type() protoreflect.EnumType
type ConfirmCodeReq ¶
type ConfirmCodeReq struct { BindRequestId string `protobuf:"bytes,1,opt,name=bind_request_id,json=bindRequestId,proto3" json:"bind_request_id,omitempty"` Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // contains filtered or unexported fields }
func (*ConfirmCodeReq) Descriptor
deprecated
func (*ConfirmCodeReq) Descriptor() ([]byte, []int)
Deprecated: Use ConfirmCodeReq.ProtoReflect.Descriptor instead.
func (*ConfirmCodeReq) GetBindRequestId ¶
func (x *ConfirmCodeReq) GetBindRequestId() string
func (*ConfirmCodeReq) GetCode ¶
func (x *ConfirmCodeReq) GetCode() string
func (*ConfirmCodeReq) ProtoMessage ¶
func (*ConfirmCodeReq) ProtoMessage()
func (*ConfirmCodeReq) ProtoReflect ¶
func (x *ConfirmCodeReq) ProtoReflect() protoreflect.Message
func (*ConfirmCodeReq) Reset ¶
func (x *ConfirmCodeReq) Reset()
func (*ConfirmCodeReq) String ¶
func (x *ConfirmCodeReq) String() string
type CreateVerificationCodeReq ¶
type CreateVerificationCodeReq struct { Type CreateVerificationCodeReq_Type `protobuf:"varint,1,opt,name=type,proto3,enum=auth.CreateVerificationCodeReq_Type" json:"type,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` // contains filtered or unexported fields }
func (*CreateVerificationCodeReq) Descriptor
deprecated
func (*CreateVerificationCodeReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateVerificationCodeReq.ProtoReflect.Descriptor instead.
func (*CreateVerificationCodeReq) GetAccount ¶
func (x *CreateVerificationCodeReq) GetAccount() string
func (*CreateVerificationCodeReq) GetType ¶
func (x *CreateVerificationCodeReq) GetType() CreateVerificationCodeReq_Type
func (*CreateVerificationCodeReq) ProtoMessage ¶
func (*CreateVerificationCodeReq) ProtoMessage()
func (*CreateVerificationCodeReq) ProtoReflect ¶
func (x *CreateVerificationCodeReq) ProtoReflect() protoreflect.Message
func (*CreateVerificationCodeReq) Reset ¶
func (x *CreateVerificationCodeReq) Reset()
func (*CreateVerificationCodeReq) String ¶
func (x *CreateVerificationCodeReq) String() string
type CreateVerificationCodeReq_Type ¶
type CreateVerificationCodeReq_Type int32
const ( CreateVerificationCodeReq_EMAIL CreateVerificationCodeReq_Type = 0 CreateVerificationCodeReq_PHONE CreateVerificationCodeReq_Type = 1 )
func (CreateVerificationCodeReq_Type) Descriptor ¶
func (CreateVerificationCodeReq_Type) Descriptor() protoreflect.EnumDescriptor
func (CreateVerificationCodeReq_Type) Enum ¶
func (x CreateVerificationCodeReq_Type) Enum() *CreateVerificationCodeReq_Type
func (CreateVerificationCodeReq_Type) EnumDescriptor
deprecated
func (CreateVerificationCodeReq_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use CreateVerificationCodeReq_Type.Descriptor instead.
func (CreateVerificationCodeReq_Type) Number ¶
func (x CreateVerificationCodeReq_Type) Number() protoreflect.EnumNumber
func (CreateVerificationCodeReq_Type) String ¶
func (x CreateVerificationCodeReq_Type) String() string
func (CreateVerificationCodeReq_Type) Type ¶
func (CreateVerificationCodeReq_Type) Type() protoreflect.EnumType
type CreateVerificationCodeResp ¶
type CreateVerificationCodeResp struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` ExpiresIn int64 `protobuf:"varint,2,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*CreateVerificationCodeResp) Descriptor
deprecated
func (*CreateVerificationCodeResp) Descriptor() ([]byte, []int)
Deprecated: Use CreateVerificationCodeResp.ProtoReflect.Descriptor instead.
func (*CreateVerificationCodeResp) GetCode ¶
func (x *CreateVerificationCodeResp) GetCode() string
func (*CreateVerificationCodeResp) GetExpiresIn ¶
func (x *CreateVerificationCodeResp) GetExpiresIn() int64
func (*CreateVerificationCodeResp) ProtoMessage ¶
func (*CreateVerificationCodeResp) ProtoMessage()
func (*CreateVerificationCodeResp) ProtoReflect ¶
func (x *CreateVerificationCodeResp) ProtoReflect() protoreflect.Message
func (*CreateVerificationCodeResp) Reset ¶
func (x *CreateVerificationCodeResp) Reset()
func (*CreateVerificationCodeResp) String ¶
func (x *CreateVerificationCodeResp) String() string
type ModifyPasswordReq ¶
type ModifyPasswordReq struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*ModifyPasswordReq) Descriptor
deprecated
func (*ModifyPasswordReq) Descriptor() ([]byte, []int)
Deprecated: Use ModifyPasswordReq.ProtoReflect.Descriptor instead.
func (*ModifyPasswordReq) GetId ¶
func (x *ModifyPasswordReq) GetId() string
func (*ModifyPasswordReq) GetPassword ¶
func (x *ModifyPasswordReq) GetPassword() string
func (*ModifyPasswordReq) ProtoMessage ¶
func (*ModifyPasswordReq) ProtoMessage()
func (*ModifyPasswordReq) ProtoReflect ¶
func (x *ModifyPasswordReq) ProtoReflect() protoreflect.Message
func (*ModifyPasswordReq) Reset ¶
func (x *ModifyPasswordReq) Reset()
func (*ModifyPasswordReq) String ¶
func (x *ModifyPasswordReq) String() string
type PassportClient ¶
type PassportClient interface { BindThirdPartyAccount(ctx context.Context, in *BindThirdPartyAccountReq, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) ConfirmCode(ctx context.Context, in *ConfirmCodeReq, opts ...grpc.CallOption) (*emptypb.Empty, error) CreateVerificationCode(ctx context.Context, in *CreateVerificationCodeReq, opts ...grpc.CallOption) (*CreateVerificationCodeResp, error) Register(ctx context.Context, in *RegisterReq, opts ...grpc.CallOption) (*wrapperspb.StringValue, error) Auth(ctx context.Context, in *AuthReq, opts ...grpc.CallOption) (*Token, error) RenewToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*Token, error) VerifyToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*emptypb.Empty, error) RevokeToken(ctx context.Context, in *Token, opts ...grpc.CallOption) (*emptypb.Empty, error) Exist(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) Lock(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) Unlock(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) List(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error) Get(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*User, error) Remove(ctx context.Context, in *wrapperspb.StringValue, opts ...grpc.CallOption) (*emptypb.Empty, error) ModifyPassword(ctx context.Context, in *ModifyPasswordReq, opts ...grpc.CallOption) (*emptypb.Empty, error) }
PassportClient is the client API for Passport 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 NewPassportClient ¶
func NewPassportClient(cc grpc.ClientConnInterface) PassportClient
type PassportServer ¶
type PassportServer interface { BindThirdPartyAccount(context.Context, *BindThirdPartyAccountReq) (*wrapperspb.StringValue, error) ConfirmCode(context.Context, *ConfirmCodeReq) (*emptypb.Empty, error) CreateVerificationCode(context.Context, *CreateVerificationCodeReq) (*CreateVerificationCodeResp, error) Register(context.Context, *RegisterReq) (*wrapperspb.StringValue, error) Auth(context.Context, *AuthReq) (*Token, error) RenewToken(context.Context, *Token) (*Token, error) VerifyToken(context.Context, *Token) (*emptypb.Empty, error) RevokeToken(context.Context, *Token) (*emptypb.Empty, error) Exist(context.Context, *wrapperspb.StringValue) (*wrapperspb.BoolValue, error) Lock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) Unlock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) List(context.Context, *UserReq) (*UserResp, error) Get(context.Context, *wrapperspb.StringValue) (*User, error) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error) ModifyPassword(context.Context, *ModifyPasswordReq) (*emptypb.Empty, error) // contains filtered or unexported methods }
PassportServer is the server API for Passport service. All implementations must embed UnimplementedPassportServer for forward compatibility.
type RegisterReq ¶
type RegisterReq struct { Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*RegisterReq) Descriptor
deprecated
func (*RegisterReq) Descriptor() ([]byte, []int)
Deprecated: Use RegisterReq.ProtoReflect.Descriptor instead.
func (*RegisterReq) GetAccount ¶
func (x *RegisterReq) GetAccount() string
func (*RegisterReq) GetPassword ¶
func (x *RegisterReq) GetPassword() string
func (*RegisterReq) ProtoMessage ¶
func (*RegisterReq) ProtoMessage()
func (*RegisterReq) ProtoReflect ¶
func (x *RegisterReq) ProtoReflect() protoreflect.Message
func (*RegisterReq) Reset ¶
func (x *RegisterReq) Reset()
func (*RegisterReq) String ¶
func (x *RegisterReq) String() string
type Token ¶
type Token struct { AccessToken string `protobuf:"bytes,1,opt,name=access_token,json=accessToken,proto3" json:"access_token,omitempty"` TokenType string `protobuf:"bytes,2,opt,name=token_type,json=tokenType,proto3" json:"token_type,omitempty"` RefreshToken string `protobuf:"bytes,3,opt,name=refresh_token,json=refreshToken,proto3" json:"refresh_token,omitempty"` ExpiresIn int64 `protobuf:"varint,4,opt,name=expires_in,json=expiresIn,proto3" json:"expires_in,omitempty"` // contains filtered or unexported fields }
func (*Token) Descriptor
deprecated
func (*Token) GetAccessToken ¶
func (*Token) GetExpiresIn ¶
func (*Token) GetRefreshToken ¶
func (*Token) GetTokenType ¶
func (*Token) ProtoMessage ¶
func (*Token) ProtoMessage()
func (*Token) ProtoReflect ¶
func (x *Token) ProtoReflect() protoreflect.Message
type UnimplementedPassportServer ¶
type UnimplementedPassportServer struct{}
UnimplementedPassportServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPassportServer) BindThirdPartyAccount ¶
func (UnimplementedPassportServer) BindThirdPartyAccount(context.Context, *BindThirdPartyAccountReq) (*wrapperspb.StringValue, error)
func (UnimplementedPassportServer) ConfirmCode ¶
func (UnimplementedPassportServer) ConfirmCode(context.Context, *ConfirmCodeReq) (*emptypb.Empty, error)
func (UnimplementedPassportServer) CreateVerificationCode ¶
func (UnimplementedPassportServer) CreateVerificationCode(context.Context, *CreateVerificationCodeReq) (*CreateVerificationCodeResp, error)
func (UnimplementedPassportServer) Exist ¶
func (UnimplementedPassportServer) Exist(context.Context, *wrapperspb.StringValue) (*wrapperspb.BoolValue, error)
func (UnimplementedPassportServer) Get ¶
func (UnimplementedPassportServer) Get(context.Context, *wrapperspb.StringValue) (*User, error)
func (UnimplementedPassportServer) Lock ¶
func (UnimplementedPassportServer) Lock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
func (UnimplementedPassportServer) ModifyPassword ¶
func (UnimplementedPassportServer) ModifyPassword(context.Context, *ModifyPasswordReq) (*emptypb.Empty, error)
func (UnimplementedPassportServer) Register ¶
func (UnimplementedPassportServer) Register(context.Context, *RegisterReq) (*wrapperspb.StringValue, error)
func (UnimplementedPassportServer) Remove ¶
func (UnimplementedPassportServer) Remove(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
func (UnimplementedPassportServer) RenewToken ¶
func (UnimplementedPassportServer) RevokeToken ¶
func (UnimplementedPassportServer) Unlock ¶
func (UnimplementedPassportServer) Unlock(context.Context, *wrapperspb.StringValue) (*emptypb.Empty, error)
func (UnimplementedPassportServer) VerifyToken ¶
type UnsafePassportServer ¶
type UnsafePassportServer interface {
// contains filtered or unexported methods
}
UnsafePassportServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PassportServer will result in compilation errors.
type User ¶
type User struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Account string `protobuf:"bytes,2,opt,name=account,proto3" json:"account,omitempty"` Code string `protobuf:"bytes,3,opt,name=code,proto3" json:"code,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` RegisterDatetime int64 `protobuf:"varint,7,opt,name=register_datetime,json=registerDatetime,proto3" json:"register_datetime,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
func (*User) GetAccount ¶
func (*User) GetRegisterDatetime ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
type UserReq ¶
type UserReq struct { PageNo int64 `protobuf:"varint,1,opt,name=page_no,json=pageNo,proto3" json:"page_no,omitempty"` PageSize int64 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*UserReq) Descriptor
deprecated
func (*UserReq) GetPageSize ¶
func (*UserReq) ProtoMessage ¶
func (*UserReq) ProtoMessage()
func (*UserReq) ProtoReflect ¶
func (x *UserReq) ProtoReflect() protoreflect.Message
type UserResp ¶
type UserResp struct { Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"` TotalCount int64 `protobuf:"varint,2,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"` // contains filtered or unexported fields }
func (*UserResp) Descriptor
deprecated
func (*UserResp) GetTotalCount ¶
func (*UserResp) ProtoMessage ¶
func (*UserResp) ProtoMessage()
func (*UserResp) ProtoReflect ¶
func (x *UserResp) ProtoReflect() protoreflect.Message