Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
- type AuthClient
- type AuthServer
- type SendVerifyCodeReq
- func (*SendVerifyCodeReq) Descriptor() ([]byte, []int)deprecated
- func (x *SendVerifyCodeReq) GetAuthId() string
- func (x *SendVerifyCodeReq) GetAuthType() string
- func (*SendVerifyCodeReq) ProtoMessage()
- func (x *SendVerifyCodeReq) ProtoReflect() protoreflect.Message
- func (x *SendVerifyCodeReq) Reset()
- func (x *SendVerifyCodeReq) String() string
- type SendVerifyCodeResp
- type SetPasswordReq
- func (*SetPasswordReq) Descriptor() ([]byte, []int)deprecated
- func (x *SetPasswordReq) GetPassword() string
- func (x *SetPasswordReq) GetUserId() string
- func (*SetPasswordReq) ProtoMessage()
- func (x *SetPasswordReq) ProtoReflect() protoreflect.Message
- func (x *SetPasswordReq) Reset()
- func (x *SetPasswordReq) String() string
- type SetPasswordResp
- type SignInReq
- func (*SignInReq) Descriptor() ([]byte, []int)deprecated
- func (x *SignInReq) GetAuthId() string
- func (x *SignInReq) GetAuthType() string
- func (x *SignInReq) GetParams() []string
- func (x *SignInReq) GetPassword() string
- func (*SignInReq) ProtoMessage()
- func (x *SignInReq) ProtoReflect() protoreflect.Message
- func (x *SignInReq) Reset()
- func (x *SignInReq) String() string
- type SignInResp
- type UnimplementedAuthServer
- func (UnimplementedAuthServer) SendVerifyCode(context.Context, *SendVerifyCodeReq) (*SendVerifyCodeResp, error)
- func (UnimplementedAuthServer) SetPassword(context.Context, *SetPasswordReq) (*SetPasswordResp, error)
- func (UnimplementedAuthServer) SignIn(context.Context, *SignInReq) (*SignInResp, error)
- type UnsafeAuthServer
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAppId() string
- func (x *User) GetOpenId() string
- func (x *User) GetUnionId() string
- func (x *User) GetUserId() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
Constants ¶
const ( Auth_SignIn_FullMethodName = "/auth.Auth/signIn" Auth_SetPassword_FullMethodName = "/auth.Auth/setPassword" Auth_SendVerifyCode_FullMethodName = "/auth.Auth/sendVerifyCode" )
Variables ¶
var Auth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "auth.Auth", HandlerType: (*AuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "signIn", Handler: _Auth_SignIn_Handler, }, { MethodName: "setPassword", Handler: _Auth_SetPassword_Handler, }, { MethodName: "sendVerifyCode", Handler: _Auth_SendVerifyCode_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "authentication.proto", }
Auth_ServiceDesc is the grpc.ServiceDesc for Auth service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_authentication_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAuthServer ¶
func RegisterAuthServer(s grpc.ServiceRegistrar, srv AuthServer)
Types ¶
type AuthClient ¶
type AuthClient interface { SignIn(ctx context.Context, in *SignInReq, opts ...grpc.CallOption) (*SignInResp, error) SetPassword(ctx context.Context, in *SetPasswordReq, opts ...grpc.CallOption) (*SetPasswordResp, error) SendVerifyCode(ctx context.Context, in *SendVerifyCodeReq, opts ...grpc.CallOption) (*SendVerifyCodeResp, error) }
AuthClient is the client API for Auth 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 NewAuthClient ¶
func NewAuthClient(cc grpc.ClientConnInterface) AuthClient
type AuthServer ¶
type AuthServer interface { SignIn(context.Context, *SignInReq) (*SignInResp, error) SetPassword(context.Context, *SetPasswordReq) (*SetPasswordResp, error) SendVerifyCode(context.Context, *SendVerifyCodeReq) (*SendVerifyCodeResp, error) // contains filtered or unexported methods }
AuthServer is the server API for Auth service. All implementations must embed UnimplementedAuthServer for forward compatibility
type SendVerifyCodeReq ¶
type SendVerifyCodeReq struct { AuthType string `protobuf:"bytes,1,opt,name=authType,proto3" json:"authType,omitempty"` AuthId string `protobuf:"bytes,2,opt,name=authId,proto3" json:"authId,omitempty"` // contains filtered or unexported fields }
func (*SendVerifyCodeReq) Descriptor
deprecated
func (*SendVerifyCodeReq) Descriptor() ([]byte, []int)
Deprecated: Use SendVerifyCodeReq.ProtoReflect.Descriptor instead.
func (*SendVerifyCodeReq) GetAuthId ¶
func (x *SendVerifyCodeReq) GetAuthId() string
func (*SendVerifyCodeReq) GetAuthType ¶
func (x *SendVerifyCodeReq) GetAuthType() string
func (*SendVerifyCodeReq) ProtoMessage ¶
func (*SendVerifyCodeReq) ProtoMessage()
func (*SendVerifyCodeReq) ProtoReflect ¶
func (x *SendVerifyCodeReq) ProtoReflect() protoreflect.Message
func (*SendVerifyCodeReq) Reset ¶
func (x *SendVerifyCodeReq) Reset()
func (*SendVerifyCodeReq) String ¶
func (x *SendVerifyCodeReq) String() string
type SendVerifyCodeResp ¶
type SendVerifyCodeResp struct {
// contains filtered or unexported fields
}
func (*SendVerifyCodeResp) Descriptor
deprecated
func (*SendVerifyCodeResp) Descriptor() ([]byte, []int)
Deprecated: Use SendVerifyCodeResp.ProtoReflect.Descriptor instead.
func (*SendVerifyCodeResp) ProtoMessage ¶
func (*SendVerifyCodeResp) ProtoMessage()
func (*SendVerifyCodeResp) ProtoReflect ¶
func (x *SendVerifyCodeResp) ProtoReflect() protoreflect.Message
func (*SendVerifyCodeResp) Reset ¶
func (x *SendVerifyCodeResp) Reset()
func (*SendVerifyCodeResp) String ¶
func (x *SendVerifyCodeResp) String() string
type SetPasswordReq ¶
type SetPasswordReq struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*SetPasswordReq) Descriptor
deprecated
func (*SetPasswordReq) Descriptor() ([]byte, []int)
Deprecated: Use SetPasswordReq.ProtoReflect.Descriptor instead.
func (*SetPasswordReq) GetPassword ¶
func (x *SetPasswordReq) GetPassword() string
func (*SetPasswordReq) GetUserId ¶
func (x *SetPasswordReq) GetUserId() string
func (*SetPasswordReq) ProtoMessage ¶
func (*SetPasswordReq) ProtoMessage()
func (*SetPasswordReq) ProtoReflect ¶
func (x *SetPasswordReq) ProtoReflect() protoreflect.Message
func (*SetPasswordReq) Reset ¶
func (x *SetPasswordReq) Reset()
func (*SetPasswordReq) String ¶
func (x *SetPasswordReq) String() string
type SetPasswordResp ¶
type SetPasswordResp struct {
// contains filtered or unexported fields
}
func (*SetPasswordResp) Descriptor
deprecated
func (*SetPasswordResp) Descriptor() ([]byte, []int)
Deprecated: Use SetPasswordResp.ProtoReflect.Descriptor instead.
func (*SetPasswordResp) ProtoMessage ¶
func (*SetPasswordResp) ProtoMessage()
func (*SetPasswordResp) ProtoReflect ¶
func (x *SetPasswordResp) ProtoReflect() protoreflect.Message
func (*SetPasswordResp) Reset ¶
func (x *SetPasswordResp) Reset()
func (*SetPasswordResp) String ¶
func (x *SetPasswordResp) String() string
type SignInReq ¶
type SignInReq struct { AuthType string `protobuf:"bytes,1,opt,name=authType,proto3" json:"authType,omitempty"` AuthId string `protobuf:"bytes,2,opt,name=authId,proto3" json:"authId,omitempty"` Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"` Params []string `protobuf:"bytes,4,rep,name=params,proto3" json:"params,omitempty"` // contains filtered or unexported fields }
func (*SignInReq) Descriptor
deprecated
func (*SignInReq) GetAuthType ¶
func (*SignInReq) GetPassword ¶
func (*SignInReq) ProtoMessage ¶
func (*SignInReq) ProtoMessage()
func (*SignInReq) ProtoReflect ¶
func (x *SignInReq) ProtoReflect() protoreflect.Message
type SignInResp ¶
type SignInResp struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` // contains filtered or unexported fields }
func (*SignInResp) Descriptor
deprecated
func (*SignInResp) Descriptor() ([]byte, []int)
Deprecated: Use SignInResp.ProtoReflect.Descriptor instead.
func (*SignInResp) GetUser ¶ added in v1.4.10
func (x *SignInResp) GetUser() *User
func (*SignInResp) ProtoMessage ¶
func (*SignInResp) ProtoMessage()
func (*SignInResp) ProtoReflect ¶
func (x *SignInResp) ProtoReflect() protoreflect.Message
func (*SignInResp) Reset ¶
func (x *SignInResp) Reset()
func (*SignInResp) String ¶
func (x *SignInResp) String() string
type UnimplementedAuthServer ¶
type UnimplementedAuthServer struct { }
UnimplementedAuthServer must be embedded to have forward compatible implementations.
func (UnimplementedAuthServer) SendVerifyCode ¶
func (UnimplementedAuthServer) SendVerifyCode(context.Context, *SendVerifyCodeReq) (*SendVerifyCodeResp, error)
func (UnimplementedAuthServer) SetPassword ¶
func (UnimplementedAuthServer) SetPassword(context.Context, *SetPasswordReq) (*SetPasswordResp, error)
func (UnimplementedAuthServer) SignIn ¶
func (UnimplementedAuthServer) SignIn(context.Context, *SignInReq) (*SignInResp, error)
type UnsafeAuthServer ¶
type UnsafeAuthServer interface {
// contains filtered or unexported methods
}
UnsafeAuthServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to AuthServer will result in compilation errors.
type User ¶ added in v1.4.10
type User struct { UserId string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"` OpenId string `protobuf:"bytes,2,opt,name=openId,proto3" json:"openId,omitempty"` UnionId string `protobuf:"bytes,3,opt,name=unionId,proto3" json:"unionId,omitempty"` AppId string `protobuf:"bytes,4,opt,name=appId,proto3" json:"appId,omitempty"` // contains filtered or unexported fields }
func (*User) Descriptor
deprecated
added in
v1.4.10
func (*User) GetUnionId ¶ added in v1.4.10
func (*User) ProtoMessage ¶ added in v1.4.10
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶ added in v1.4.10
func (x *User) ProtoReflect() protoreflect.Message