Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterUserAuthHTTPServer(s *http.Server, srv UserAuthHTTPServer)
- func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)
- type Reply
- func (*Reply) Descriptor() ([]byte, []int)deprecated
- func (x *Reply) GetData() string
- func (x *Reply) GetMessage() string
- func (x *Reply) GetStatusCode() int32
- func (*Reply) ProtoMessage()
- func (x *Reply) ProtoReflect() protoreflect.Message
- func (x *Reply) Reset()
- func (x *Reply) String() string
- func (m *Reply) Validate() error
- func (m *Reply) ValidateAll() error
- type ReplyMultiError
- type ReplyValidationError
- type UnimplementedUserAuthServer
- func (UnimplementedUserAuthServer) UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error)
- func (UnimplementedUserAuthServer) UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error)
- func (UnimplementedUserAuthServer) UserReg(context.Context, *UserRegRequest) (*Reply, error)
- type UnsafeUserAuthServer
- type UserAuthClient
- type UserAuthHTTPClient
- type UserAuthHTTPClientImpl
- func (c *UserAuthHTTPClientImpl) UserBingPhone(ctx context.Context, in *UserBingPhoneRequest, opts ...http.CallOption) (*Reply, error)
- func (c *UserAuthHTTPClientImpl) UserMergeAccount(ctx context.Context, in *UserMergeAccountRequest, opts ...http.CallOption) (*Reply, error)
- func (c *UserAuthHTTPClientImpl) UserReg(ctx context.Context, in *UserRegRequest, opts ...http.CallOption) (*Reply, error)
- type UserAuthHTTPServer
- type UserAuthServer
- type UserBingPhoneRequest
- func (*UserBingPhoneRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserBingPhoneRequest) GetAppId() string
- func (x *UserBingPhoneRequest) GetCode() string
- func (x *UserBingPhoneRequest) GetOpenId() string
- func (*UserBingPhoneRequest) ProtoMessage()
- func (x *UserBingPhoneRequest) ProtoReflect() protoreflect.Message
- func (x *UserBingPhoneRequest) Reset()
- func (x *UserBingPhoneRequest) String() string
- func (m *UserBingPhoneRequest) Validate() error
- func (m *UserBingPhoneRequest) ValidateAll() error
- type UserBingPhoneRequestMultiError
- type UserBingPhoneRequestValidationError
- func (e UserBingPhoneRequestValidationError) Cause() error
- func (e UserBingPhoneRequestValidationError) Error() string
- func (e UserBingPhoneRequestValidationError) ErrorName() string
- func (e UserBingPhoneRequestValidationError) Field() string
- func (e UserBingPhoneRequestValidationError) Key() bool
- func (e UserBingPhoneRequestValidationError) Reason() string
- type UserMergeAccountRequest
- func (*UserMergeAccountRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserMergeAccountRequest) GetAppId() string
- func (x *UserMergeAccountRequest) GetOpenId() string
- func (x *UserMergeAccountRequest) GetPhone() string
- func (*UserMergeAccountRequest) ProtoMessage()
- func (x *UserMergeAccountRequest) ProtoReflect() protoreflect.Message
- func (x *UserMergeAccountRequest) Reset()
- func (x *UserMergeAccountRequest) String() string
- func (m *UserMergeAccountRequest) Validate() error
- func (m *UserMergeAccountRequest) ValidateAll() error
- type UserMergeAccountRequestMultiError
- type UserMergeAccountRequestValidationError
- func (e UserMergeAccountRequestValidationError) Cause() error
- func (e UserMergeAccountRequestValidationError) Error() string
- func (e UserMergeAccountRequestValidationError) ErrorName() string
- func (e UserMergeAccountRequestValidationError) Field() string
- func (e UserMergeAccountRequestValidationError) Key() bool
- func (e UserMergeAccountRequestValidationError) Reason() string
- type UserRegRequest
- func (*UserRegRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserRegRequest) GetAppId() string
- func (x *UserRegRequest) GetCode() string
- func (x *UserRegRequest) GetSn() string
- func (*UserRegRequest) ProtoMessage()
- func (x *UserRegRequest) ProtoReflect() protoreflect.Message
- func (x *UserRegRequest) Reset()
- func (x *UserRegRequest) String() string
- func (m *UserRegRequest) Validate() error
- func (m *UserRegRequest) ValidateAll() error
- type UserRegRequestMultiError
- type UserRegRequestValidationError
- func (e UserRegRequestValidationError) Cause() error
- func (e UserRegRequestValidationError) Error() string
- func (e UserRegRequestValidationError) ErrorName() string
- func (e UserRegRequestValidationError) Field() string
- func (e UserRegRequestValidationError) Key() bool
- func (e UserRegRequestValidationError) Reason() string
Constants ¶
const ( UserAuth_UserReg_FullMethodName = "/api.user.v1.UserAuth/UserReg" UserAuth_UserBingPhone_FullMethodName = "/api.user.v1.UserAuth/UserBingPhone" UserAuth_UserMergeAccount_FullMethodName = "/api.user.v1.UserAuth/UserMergeAccount" )
const OperationUserAuthUserBingPhone = "/api.user.v1.UserAuth/UserBingPhone"
const OperationUserAuthUserMergeAccount = "/api.user.v1.UserAuth/UserMergeAccount"
const OperationUserAuthUserReg = "/api.user.v1.UserAuth/UserReg"
Variables ¶
var File_user_v1_common_proto protoreflect.FileDescriptor
var File_user_v1_user_auth_proto protoreflect.FileDescriptor
var UserAuth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "api.user.v1.UserAuth", HandlerType: (*UserAuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "UserReg", Handler: _UserAuth_UserReg_Handler, }, { MethodName: "UserBingPhone", Handler: _UserAuth_UserBingPhone_Handler, }, { MethodName: "UserMergeAccount", Handler: _UserAuth_UserMergeAccount_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user_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 RegisterUserAuthHTTPServer ¶
func RegisterUserAuthHTTPServer(s *http.Server, srv UserAuthHTTPServer)
func RegisterUserAuthServer ¶
func RegisterUserAuthServer(s grpc.ServiceRegistrar, srv UserAuthServer)
Types ¶
type Reply ¶
type Reply struct { StatusCode int32 `protobuf:"varint,1,opt,name=status_code,json=statusCode,proto3" json:"status_code,omitempty"` // 状态码 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // 提示信息 Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"` // json字符串 // contains filtered or unexported fields }
func (*Reply) Descriptor
deprecated
func (*Reply) GetMessage ¶
func (*Reply) GetStatusCode ¶
func (*Reply) ProtoMessage ¶
func (*Reply) ProtoMessage()
func (*Reply) ProtoReflect ¶
func (x *Reply) ProtoReflect() protoreflect.Message
func (*Reply) Validate ¶
Validate checks the field values on Reply with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*Reply) ValidateAll ¶
ValidateAll checks the field values on Reply with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in ReplyMultiError, or nil if none found.
type ReplyMultiError ¶
type ReplyMultiError []error
ReplyMultiError is an error wrapping multiple validation errors returned by Reply.ValidateAll() if the designated constraints aren't met.
func (ReplyMultiError) AllErrors ¶
func (m ReplyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ReplyMultiError) Error ¶
func (m ReplyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ReplyValidationError ¶
type ReplyValidationError struct {
// contains filtered or unexported fields
}
ReplyValidationError is the validation error returned by Reply.Validate if the designated constraints aren't met.
func (ReplyValidationError) Cause ¶
func (e ReplyValidationError) Cause() error
Cause function returns cause value.
func (ReplyValidationError) Error ¶
func (e ReplyValidationError) Error() string
Error satisfies the builtin error interface
func (ReplyValidationError) ErrorName ¶
func (e ReplyValidationError) ErrorName() string
ErrorName returns error name.
func (ReplyValidationError) Field ¶
func (e ReplyValidationError) Field() string
Field function returns field value.
func (ReplyValidationError) Key ¶
func (e ReplyValidationError) Key() bool
Key function returns key value.
func (ReplyValidationError) Reason ¶
func (e ReplyValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserAuthServer ¶
type UnimplementedUserAuthServer struct{}
UnimplementedUserAuthServer 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 (UnimplementedUserAuthServer) UserBingPhone ¶
func (UnimplementedUserAuthServer) UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error)
func (UnimplementedUserAuthServer) UserMergeAccount ¶
func (UnimplementedUserAuthServer) UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error)
func (UnimplementedUserAuthServer) UserReg ¶
func (UnimplementedUserAuthServer) UserReg(context.Context, *UserRegRequest) (*Reply, error)
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 { // 用户注册(登录) UserReg(ctx context.Context, in *UserRegRequest, opts ...grpc.CallOption) (*Reply, error) // 用户绑定手机号 UserBingPhone(ctx context.Context, in *UserBingPhoneRequest, opts ...grpc.CallOption) (*Reply, error) // 账号合并功能 UserMergeAccount(ctx context.Context, in *UserMergeAccountRequest, opts ...grpc.CallOption) (*Reply, 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 UserAuthHTTPClient ¶
type UserAuthHTTPClient interface { UserBingPhone(ctx context.Context, req *UserBingPhoneRequest, opts ...http.CallOption) (rsp *Reply, err error) UserMergeAccount(ctx context.Context, req *UserMergeAccountRequest, opts ...http.CallOption) (rsp *Reply, err error) UserReg(ctx context.Context, req *UserRegRequest, opts ...http.CallOption) (rsp *Reply, err error) }
func NewUserAuthHTTPClient ¶
func NewUserAuthHTTPClient(client *http.Client) UserAuthHTTPClient
type UserAuthHTTPClientImpl ¶
type UserAuthHTTPClientImpl struct {
// contains filtered or unexported fields
}
func (*UserAuthHTTPClientImpl) UserBingPhone ¶
func (c *UserAuthHTTPClientImpl) UserBingPhone(ctx context.Context, in *UserBingPhoneRequest, opts ...http.CallOption) (*Reply, error)
func (*UserAuthHTTPClientImpl) UserMergeAccount ¶
func (c *UserAuthHTTPClientImpl) UserMergeAccount(ctx context.Context, in *UserMergeAccountRequest, opts ...http.CallOption) (*Reply, error)
func (*UserAuthHTTPClientImpl) UserReg ¶
func (c *UserAuthHTTPClientImpl) UserReg(ctx context.Context, in *UserRegRequest, opts ...http.CallOption) (*Reply, error)
type UserAuthHTTPServer ¶
type UserAuthHTTPServer interface { // UserBingPhone 用户绑定手机号 UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error) // UserMergeAccount 账号合并功能 UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error) // UserReg 用户注册(登录) UserReg(context.Context, *UserRegRequest) (*Reply, error) }
type UserAuthServer ¶
type UserAuthServer interface { // 用户注册(登录) UserReg(context.Context, *UserRegRequest) (*Reply, error) // 用户绑定手机号 UserBingPhone(context.Context, *UserBingPhoneRequest) (*Reply, error) // 账号合并功能 UserMergeAccount(context.Context, *UserMergeAccountRequest) (*Reply, error) // contains filtered or unexported methods }
UserAuthServer is the server API for UserAuth service. All implementations must embed UnimplementedUserAuthServer for forward compatibility.
用户认证管理
type UserBingPhoneRequest ¶
type UserBingPhoneRequest struct { // 用户标识,不能为空 OpenId string `protobuf:"bytes,1,opt,name=openId,proto3" json:"openId,omitempty"` // 手机号获取凭证,不能为空 Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 应用AppId,不能为空 AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"` // contains filtered or unexported fields }
用户绑定手机号
func (*UserBingPhoneRequest) Descriptor
deprecated
func (*UserBingPhoneRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserBingPhoneRequest.ProtoReflect.Descriptor instead.
func (*UserBingPhoneRequest) GetAppId ¶
func (x *UserBingPhoneRequest) GetAppId() string
func (*UserBingPhoneRequest) GetCode ¶
func (x *UserBingPhoneRequest) GetCode() string
func (*UserBingPhoneRequest) GetOpenId ¶
func (x *UserBingPhoneRequest) GetOpenId() string
func (*UserBingPhoneRequest) ProtoMessage ¶
func (*UserBingPhoneRequest) ProtoMessage()
func (*UserBingPhoneRequest) ProtoReflect ¶
func (x *UserBingPhoneRequest) ProtoReflect() protoreflect.Message
func (*UserBingPhoneRequest) Reset ¶
func (x *UserBingPhoneRequest) Reset()
func (*UserBingPhoneRequest) String ¶
func (x *UserBingPhoneRequest) String() string
func (*UserBingPhoneRequest) Validate ¶
func (m *UserBingPhoneRequest) Validate() error
Validate checks the field values on UserBingPhoneRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserBingPhoneRequest) ValidateAll ¶
func (m *UserBingPhoneRequest) ValidateAll() error
ValidateAll checks the field values on UserBingPhoneRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserBingPhoneRequestMultiError, or nil if none found.
type UserBingPhoneRequestMultiError ¶
type UserBingPhoneRequestMultiError []error
UserBingPhoneRequestMultiError is an error wrapping multiple validation errors returned by UserBingPhoneRequest.ValidateAll() if the designated constraints aren't met.
func (UserBingPhoneRequestMultiError) AllErrors ¶
func (m UserBingPhoneRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserBingPhoneRequestMultiError) Error ¶
func (m UserBingPhoneRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserBingPhoneRequestValidationError ¶
type UserBingPhoneRequestValidationError struct {
// contains filtered or unexported fields
}
UserBingPhoneRequestValidationError is the validation error returned by UserBingPhoneRequest.Validate if the designated constraints aren't met.
func (UserBingPhoneRequestValidationError) Cause ¶
func (e UserBingPhoneRequestValidationError) Cause() error
Cause function returns cause value.
func (UserBingPhoneRequestValidationError) Error ¶
func (e UserBingPhoneRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserBingPhoneRequestValidationError) ErrorName ¶
func (e UserBingPhoneRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserBingPhoneRequestValidationError) Field ¶
func (e UserBingPhoneRequestValidationError) Field() string
Field function returns field value.
func (UserBingPhoneRequestValidationError) Key ¶
func (e UserBingPhoneRequestValidationError) Key() bool
Key function returns key value.
func (UserBingPhoneRequestValidationError) Reason ¶
func (e UserBingPhoneRequestValidationError) Reason() string
Reason function returns reason value.
type UserMergeAccountRequest ¶
type UserMergeAccountRequest struct { // 要合并的手机号 Phone string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"` // 用户OpenID OpenId string `protobuf:"bytes,2,opt,name=openId,proto3" json:"openId,omitempty"` // 应用AppId,不能为空 AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"` // contains filtered or unexported fields }
用户合并账号
func (*UserMergeAccountRequest) Descriptor
deprecated
func (*UserMergeAccountRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserMergeAccountRequest.ProtoReflect.Descriptor instead.
func (*UserMergeAccountRequest) GetAppId ¶
func (x *UserMergeAccountRequest) GetAppId() string
func (*UserMergeAccountRequest) GetOpenId ¶
func (x *UserMergeAccountRequest) GetOpenId() string
func (*UserMergeAccountRequest) GetPhone ¶
func (x *UserMergeAccountRequest) GetPhone() string
func (*UserMergeAccountRequest) ProtoMessage ¶
func (*UserMergeAccountRequest) ProtoMessage()
func (*UserMergeAccountRequest) ProtoReflect ¶
func (x *UserMergeAccountRequest) ProtoReflect() protoreflect.Message
func (*UserMergeAccountRequest) Reset ¶
func (x *UserMergeAccountRequest) Reset()
func (*UserMergeAccountRequest) String ¶
func (x *UserMergeAccountRequest) String() string
func (*UserMergeAccountRequest) Validate ¶
func (m *UserMergeAccountRequest) Validate() error
Validate checks the field values on UserMergeAccountRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserMergeAccountRequest) ValidateAll ¶
func (m *UserMergeAccountRequest) ValidateAll() error
ValidateAll checks the field values on UserMergeAccountRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserMergeAccountRequestMultiError, or nil if none found.
type UserMergeAccountRequestMultiError ¶
type UserMergeAccountRequestMultiError []error
UserMergeAccountRequestMultiError is an error wrapping multiple validation errors returned by UserMergeAccountRequest.ValidateAll() if the designated constraints aren't met.
func (UserMergeAccountRequestMultiError) AllErrors ¶
func (m UserMergeAccountRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMergeAccountRequestMultiError) Error ¶
func (m UserMergeAccountRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserMergeAccountRequestValidationError ¶
type UserMergeAccountRequestValidationError struct {
// contains filtered or unexported fields
}
UserMergeAccountRequestValidationError is the validation error returned by UserMergeAccountRequest.Validate if the designated constraints aren't met.
func (UserMergeAccountRequestValidationError) Cause ¶
func (e UserMergeAccountRequestValidationError) Cause() error
Cause function returns cause value.
func (UserMergeAccountRequestValidationError) Error ¶
func (e UserMergeAccountRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserMergeAccountRequestValidationError) ErrorName ¶
func (e UserMergeAccountRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserMergeAccountRequestValidationError) Field ¶
func (e UserMergeAccountRequestValidationError) Field() string
Field function returns field value.
func (UserMergeAccountRequestValidationError) Key ¶
func (e UserMergeAccountRequestValidationError) Key() bool
Key function returns key value.
func (UserMergeAccountRequestValidationError) Reason ¶
func (e UserMergeAccountRequestValidationError) Reason() string
Reason function returns reason value.
type UserRegRequest ¶
type UserRegRequest struct { // 设备编号,不能为空 Sn string `protobuf:"bytes,1,opt,name=sn,proto3" json:"sn,omitempty"` // 临时登录凭证,不能为空 Code string `protobuf:"bytes,2,opt,name=code,proto3" json:"code,omitempty"` // 应用AppId,不能为空 AppId string `protobuf:"bytes,3,opt,name=appId,proto3" json:"appId,omitempty"` // contains filtered or unexported fields }
注册用户必须参数
func (*UserRegRequest) Descriptor
deprecated
func (*UserRegRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserRegRequest.ProtoReflect.Descriptor instead.
func (*UserRegRequest) GetAppId ¶
func (x *UserRegRequest) GetAppId() string
func (*UserRegRequest) GetCode ¶
func (x *UserRegRequest) GetCode() string
func (*UserRegRequest) GetSn ¶
func (x *UserRegRequest) GetSn() string
func (*UserRegRequest) ProtoMessage ¶
func (*UserRegRequest) ProtoMessage()
func (*UserRegRequest) ProtoReflect ¶
func (x *UserRegRequest) ProtoReflect() protoreflect.Message
func (*UserRegRequest) Reset ¶
func (x *UserRegRequest) Reset()
func (*UserRegRequest) String ¶
func (x *UserRegRequest) String() string
func (*UserRegRequest) Validate ¶
func (m *UserRegRequest) Validate() error
Validate checks the field values on UserRegRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.
func (*UserRegRequest) ValidateAll ¶
func (m *UserRegRequest) ValidateAll() error
ValidateAll checks the field values on UserRegRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UserRegRequestMultiError, or nil if none found.
type UserRegRequestMultiError ¶
type UserRegRequestMultiError []error
UserRegRequestMultiError is an error wrapping multiple validation errors returned by UserRegRequest.ValidateAll() if the designated constraints aren't met.
func (UserRegRequestMultiError) AllErrors ¶
func (m UserRegRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserRegRequestMultiError) Error ¶
func (m UserRegRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserRegRequestValidationError ¶
type UserRegRequestValidationError struct {
// contains filtered or unexported fields
}
UserRegRequestValidationError is the validation error returned by UserRegRequest.Validate if the designated constraints aren't met.
func (UserRegRequestValidationError) Cause ¶
func (e UserRegRequestValidationError) Cause() error
Cause function returns cause value.
func (UserRegRequestValidationError) Error ¶
func (e UserRegRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserRegRequestValidationError) ErrorName ¶
func (e UserRegRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserRegRequestValidationError) Field ¶
func (e UserRegRequestValidationError) Field() string
Field function returns field value.
func (UserRegRequestValidationError) Key ¶
func (e UserRegRequestValidationError) Key() bool
Key function returns key value.
func (UserRegRequestValidationError) Reason ¶
func (e UserRegRequestValidationError) Reason() string
Reason function returns reason value.