Documentation
¶
Index ¶
- Constants
- Variables
- func ErrorAccessForbidden(format string, args ...interface{}) *errors.Error
- func ErrorIncorrectPassword(format string, args ...interface{}) *errors.Error
- func ErrorInternalServerError(format string, args ...interface{}) *errors.Error
- func ErrorInvalidPassword(format string, args ...interface{}) *errors.Error
- func ErrorInvalidToken(format string, args ...interface{}) *errors.Error
- func ErrorInvalidUserid(format string, args ...interface{}) *errors.Error
- func ErrorMethodNotAllowed(format string, args ...interface{}) *errors.Error
- func ErrorNetworkError(format string, args ...interface{}) *errors.Error
- func ErrorNetworkTimeout(format string, args ...interface{}) *errors.Error
- func ErrorNotImplemented(format string, args ...interface{}) *errors.Error
- func ErrorNotLoggedIn(format string, args ...interface{}) *errors.Error
- func ErrorRequestNotSupport(format string, args ...interface{}) *errors.Error
- func ErrorRequestTimeout(format string, args ...interface{}) *errors.Error
- func ErrorResourceNotFound(format string, args ...interface{}) *errors.Error
- func ErrorServiceUnavailable(format string, args ...interface{}) *errors.Error
- func ErrorTokenExpired(format string, args ...interface{}) *errors.Error
- func ErrorTokenNotExist(format string, args ...interface{}) *errors.Error
- func ErrorUserFreeze(format string, args ...interface{}) *errors.Error
- func ErrorUserNotExist(format string, args ...interface{}) *errors.Error
- func ErrorUserNotFound(format string, args ...interface{}) *errors.Error
- func IsAccessForbidden(err error) bool
- func IsIncorrectPassword(err error) bool
- func IsInternalServerError(err error) bool
- func IsInvalidPassword(err error) bool
- func IsInvalidToken(err error) bool
- func IsInvalidUserid(err error) bool
- func IsMethodNotAllowed(err error) bool
- func IsNetworkError(err error) bool
- func IsNetworkTimeout(err error) bool
- func IsNotImplemented(err error) bool
- func IsNotLoggedIn(err error) bool
- func IsRequestNotSupport(err error) bool
- func IsRequestTimeout(err error) bool
- func IsResourceNotFound(err error) bool
- func IsServiceUnavailable(err error) bool
- func IsTokenExpired(err error) bool
- func IsTokenNotExist(err error) bool
- func IsUserFreeze(err error) bool
- func IsUserNotExist(err error) bool
- func IsUserNotFound(err error) bool
- func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
- type CreateUserRequest
- func (*CreateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateUserRequest) GetOperatorId() uint32
- func (x *CreateUserRequest) GetUser() *User
- func (*CreateUserRequest) ProtoMessage()
- func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
- func (x *CreateUserRequest) Reset()
- func (x *CreateUserRequest) String() string
- func (m *CreateUserRequest) Validate() error
- func (m *CreateUserRequest) ValidateAll() error
- type CreateUserRequestMultiError
- type CreateUserRequestValidationError
- func (e CreateUserRequestValidationError) Cause() error
- func (e CreateUserRequestValidationError) Error() string
- func (e CreateUserRequestValidationError) ErrorName() string
- func (e CreateUserRequestValidationError) Field() string
- func (e CreateUserRequestValidationError) Key() bool
- func (e CreateUserRequestValidationError) Reason() string
- type DeleteUserRequest
- func (*DeleteUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DeleteUserRequest) GetId() uint32
- func (x *DeleteUserRequest) GetOperatorId() uint32
- func (*DeleteUserRequest) ProtoMessage()
- func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
- func (x *DeleteUserRequest) Reset()
- func (x *DeleteUserRequest) String() string
- func (m *DeleteUserRequest) Validate() error
- func (m *DeleteUserRequest) ValidateAll() error
- type DeleteUserRequestMultiError
- type DeleteUserRequestValidationError
- func (e DeleteUserRequestValidationError) Cause() error
- func (e DeleteUserRequestValidationError) Error() string
- func (e DeleteUserRequestValidationError) ErrorName() string
- func (e DeleteUserRequestValidationError) Field() string
- func (e DeleteUserRequestValidationError) Key() bool
- func (e DeleteUserRequestValidationError) Reason() string
- type GetUserByUserNameRequest
- func (*GetUserByUserNameRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserByUserNameRequest) GetUserName() string
- func (*GetUserByUserNameRequest) ProtoMessage()
- func (x *GetUserByUserNameRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserByUserNameRequest) Reset()
- func (x *GetUserByUserNameRequest) String() string
- func (m *GetUserByUserNameRequest) Validate() error
- func (m *GetUserByUserNameRequest) ValidateAll() error
- type GetUserByUserNameRequestMultiError
- type GetUserByUserNameRequestValidationError
- func (e GetUserByUserNameRequestValidationError) Cause() error
- func (e GetUserByUserNameRequestValidationError) Error() string
- func (e GetUserByUserNameRequestValidationError) ErrorName() string
- func (e GetUserByUserNameRequestValidationError) Field() string
- func (e GetUserByUserNameRequestValidationError) Key() bool
- func (e GetUserByUserNameRequestValidationError) Reason() string
- type GetUserRequest
- func (*GetUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetUserRequest) GetId() uint32
- func (*GetUserRequest) ProtoMessage()
- func (x *GetUserRequest) ProtoReflect() protoreflect.Message
- func (x *GetUserRequest) Reset()
- func (x *GetUserRequest) String() string
- func (m *GetUserRequest) Validate() error
- func (m *GetUserRequest) ValidateAll() error
- type GetUserRequestMultiError
- type GetUserRequestValidationError
- func (e GetUserRequestValidationError) Cause() error
- func (e GetUserRequestValidationError) Error() string
- func (e GetUserRequestValidationError) ErrorName() string
- func (e GetUserRequestValidationError) Field() string
- func (e GetUserRequestValidationError) Key() bool
- func (e GetUserRequestValidationError) Reason() string
- type ListUserResponse
- func (*ListUserResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListUserResponse) GetItems() []*User
- func (x *ListUserResponse) GetTotal() int32
- func (*ListUserResponse) ProtoMessage()
- func (x *ListUserResponse) ProtoReflect() protoreflect.Message
- func (x *ListUserResponse) Reset()
- func (x *ListUserResponse) String() string
- func (m *ListUserResponse) Validate() error
- func (m *ListUserResponse) ValidateAll() error
- type ListUserResponseMultiError
- type ListUserResponseValidationError
- func (e ListUserResponseValidationError) Cause() error
- func (e ListUserResponseValidationError) Error() string
- func (e ListUserResponseValidationError) ErrorName() string
- func (e ListUserResponseValidationError) Field() string
- func (e ListUserResponseValidationError) Key() bool
- func (e ListUserResponseValidationError) Reason() string
- type UnimplementedUserServiceServer
- func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
- func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) GetUserByUserName(context.Context, *GetUserByUserNameRequest) (*User, error)
- func (UnimplementedUserServiceServer) ListUser(context.Context, *v1.PagingRequest) (*ListUserResponse, error)
- func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
- func (UnimplementedUserServiceServer) UserExists(context.Context, *UserExistsRequest) (*UserExistsResponse, error)
- func (UnimplementedUserServiceServer) VerifyPassword(context.Context, *VerifyPasswordRequest) (*VerifyPasswordResponse, error)
- type UnsafeUserServiceServer
- type UpdateUserRequest
- func (*UpdateUserRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateUserRequest) GetId() uint32
- func (x *UpdateUserRequest) GetOperatorId() uint32
- func (x *UpdateUserRequest) GetUser() *User
- func (*UpdateUserRequest) ProtoMessage()
- func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
- func (x *UpdateUserRequest) Reset()
- func (x *UpdateUserRequest) String() string
- func (m *UpdateUserRequest) Validate() error
- func (m *UpdateUserRequest) ValidateAll() error
- type UpdateUserRequestMultiError
- type UpdateUserRequestValidationError
- func (e UpdateUserRequestValidationError) Cause() error
- func (e UpdateUserRequestValidationError) Error() string
- func (e UpdateUserRequestValidationError) ErrorName() string
- func (e UpdateUserRequestValidationError) Field() string
- func (e UpdateUserRequestValidationError) Key() bool
- func (e UpdateUserRequestValidationError) Reason() string
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAuthority() UserAuthority
- func (x *User) GetAvatar() string
- func (x *User) GetCreateTime() string
- func (x *User) GetCreatorId() uint32
- func (x *User) GetDescription() string
- func (x *User) GetEmail() string
- func (x *User) GetId() uint32
- func (x *User) GetPassword() string
- func (x *User) GetRoleId() uint32
- func (x *User) GetStatus() string
- func (x *User) GetUpdateTime() string
- func (x *User) GetUserName() string
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserAuthority
- func (UserAuthority) Descriptor() protoreflect.EnumDescriptor
- func (x UserAuthority) Enum() *UserAuthority
- func (UserAuthority) EnumDescriptor() ([]byte, []int)deprecated
- func (x UserAuthority) Number() protoreflect.EnumNumber
- func (x UserAuthority) String() string
- func (UserAuthority) Type() protoreflect.EnumType
- type UserErrorReason
- func (UserErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x UserErrorReason) Enum() *UserErrorReason
- func (UserErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x UserErrorReason) Number() protoreflect.EnumNumber
- func (x UserErrorReason) String() string
- func (UserErrorReason) Type() protoreflect.EnumType
- type UserExistsRequest
- func (*UserExistsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *UserExistsRequest) GetUserName() string
- func (*UserExistsRequest) ProtoMessage()
- func (x *UserExistsRequest) ProtoReflect() protoreflect.Message
- func (x *UserExistsRequest) Reset()
- func (x *UserExistsRequest) String() string
- func (m *UserExistsRequest) Validate() error
- func (m *UserExistsRequest) ValidateAll() error
- type UserExistsRequestMultiError
- type UserExistsRequestValidationError
- func (e UserExistsRequestValidationError) Cause() error
- func (e UserExistsRequestValidationError) Error() string
- func (e UserExistsRequestValidationError) ErrorName() string
- func (e UserExistsRequestValidationError) Field() string
- func (e UserExistsRequestValidationError) Key() bool
- func (e UserExistsRequestValidationError) Reason() string
- type UserExistsResponse
- func (*UserExistsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *UserExistsResponse) GetExist() bool
- func (*UserExistsResponse) ProtoMessage()
- func (x *UserExistsResponse) ProtoReflect() protoreflect.Message
- func (x *UserExistsResponse) Reset()
- func (x *UserExistsResponse) String() string
- func (m *UserExistsResponse) Validate() error
- func (m *UserExistsResponse) ValidateAll() error
- type UserExistsResponseMultiError
- type UserExistsResponseValidationError
- func (e UserExistsResponseValidationError) Cause() error
- func (e UserExistsResponseValidationError) Error() string
- func (e UserExistsResponseValidationError) ErrorName() string
- func (e UserExistsResponseValidationError) Field() string
- func (e UserExistsResponseValidationError) Key() bool
- func (e UserExistsResponseValidationError) Reason() string
- type UserMultiError
- type UserServiceClient
- type UserServiceServer
- type UserValidationError
- type VerifyPasswordRequest
- func (*VerifyPasswordRequest) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyPasswordRequest) GetPassword() string
- func (x *VerifyPasswordRequest) GetUserName() string
- func (*VerifyPasswordRequest) ProtoMessage()
- func (x *VerifyPasswordRequest) ProtoReflect() protoreflect.Message
- func (x *VerifyPasswordRequest) Reset()
- func (x *VerifyPasswordRequest) String() string
- func (m *VerifyPasswordRequest) Validate() error
- func (m *VerifyPasswordRequest) ValidateAll() error
- type VerifyPasswordRequestMultiError
- type VerifyPasswordRequestValidationError
- func (e VerifyPasswordRequestValidationError) Cause() error
- func (e VerifyPasswordRequestValidationError) Error() string
- func (e VerifyPasswordRequestValidationError) ErrorName() string
- func (e VerifyPasswordRequestValidationError) Field() string
- func (e VerifyPasswordRequestValidationError) Key() bool
- func (e VerifyPasswordRequestValidationError) Reason() string
- type VerifyPasswordResponse
- func (*VerifyPasswordResponse) Descriptor() ([]byte, []int)deprecated
- func (x *VerifyPasswordResponse) GetResult() VerifyPasswordResult
- func (*VerifyPasswordResponse) ProtoMessage()
- func (x *VerifyPasswordResponse) ProtoReflect() protoreflect.Message
- func (x *VerifyPasswordResponse) Reset()
- func (x *VerifyPasswordResponse) String() string
- func (m *VerifyPasswordResponse) Validate() error
- func (m *VerifyPasswordResponse) ValidateAll() error
- type VerifyPasswordResponseMultiError
- type VerifyPasswordResponseValidationError
- func (e VerifyPasswordResponseValidationError) Cause() error
- func (e VerifyPasswordResponseValidationError) Error() string
- func (e VerifyPasswordResponseValidationError) ErrorName() string
- func (e VerifyPasswordResponseValidationError) Field() string
- func (e VerifyPasswordResponseValidationError) Key() bool
- func (e VerifyPasswordResponseValidationError) Reason() string
- type VerifyPasswordResult
- func (VerifyPasswordResult) Descriptor() protoreflect.EnumDescriptor
- func (x VerifyPasswordResult) Enum() *VerifyPasswordResult
- func (VerifyPasswordResult) EnumDescriptor() ([]byte, []int)deprecated
- func (x VerifyPasswordResult) Number() protoreflect.EnumNumber
- func (x VerifyPasswordResult) String() string
- func (VerifyPasswordResult) Type() protoreflect.EnumType
Constants ¶
const ( UserService_ListUser_FullMethodName = "/user.v1.UserService/ListUser" UserService_GetUser_FullMethodName = "/user.v1.UserService/GetUser" UserService_CreateUser_FullMethodName = "/user.v1.UserService/CreateUser" UserService_UpdateUser_FullMethodName = "/user.v1.UserService/UpdateUser" UserService_DeleteUser_FullMethodName = "/user.v1.UserService/DeleteUser" UserService_GetUserByUserName_FullMethodName = "/user.v1.UserService/GetUserByUserName" UserService_VerifyPassword_FullMethodName = "/user.v1.UserService/VerifyPassword" UserService_UserExists_FullMethodName = "/user.v1.UserService/UserExists" )
Variables ¶
var ( UserErrorReason_name = map[int32]string{ 0: "NOT_LOGGED_IN", 1: "ACCESS_FORBIDDEN", 2: "RESOURCE_NOT_FOUND", 3: "METHOD_NOT_ALLOWED", 4: "REQUEST_TIMEOUT", 5: "INTERNAL_SERVER_ERROR", 6: "NOT_IMPLEMENTED", 7: "NETWORK_ERROR", 8: "SERVICE_UNAVAILABLE", 9: "NETWORK_TIMEOUT", 10: "REQUEST_NOT_SUPPORT", 11: "USER_NOT_FOUND", 12: "INCORRECT_PASSWORD", 13: "USER_FREEZE", 14: "INVALID_USERID", 15: "INVALID_PASSWORD", 16: "TOKEN_EXPIRED", 17: "INVALID_TOKEN", 18: "TOKEN_NOT_EXIST", 19: "USER_NOT_EXIST", } UserErrorReason_value = map[string]int32{ "NOT_LOGGED_IN": 0, "ACCESS_FORBIDDEN": 1, "RESOURCE_NOT_FOUND": 2, "METHOD_NOT_ALLOWED": 3, "REQUEST_TIMEOUT": 4, "INTERNAL_SERVER_ERROR": 5, "NOT_IMPLEMENTED": 6, "NETWORK_ERROR": 7, "SERVICE_UNAVAILABLE": 8, "NETWORK_TIMEOUT": 9, "REQUEST_NOT_SUPPORT": 10, "USER_NOT_FOUND": 11, "INCORRECT_PASSWORD": 12, "USER_FREEZE": 13, "INVALID_USERID": 14, "INVALID_PASSWORD": 15, "TOKEN_EXPIRED": 16, "INVALID_TOKEN": 17, "TOKEN_NOT_EXIST": 18, "USER_NOT_EXIST": 19, } )
Enum value maps for UserErrorReason.
var ( VerifyPasswordResult_name = map[int32]string{ 0: "SUCCESS", 1: "ACCOUNT_NOT_EXISTS", 2: "WRONG_PASSWORD", 3: "FREEZE", 4: "DELETED", } VerifyPasswordResult_value = map[string]int32{ "SUCCESS": 0, "ACCOUNT_NOT_EXISTS": 1, "WRONG_PASSWORD": 2, "FREEZE": 3, "DELETED": 4, } )
Enum value maps for VerifyPasswordResult.
var ( UserAuthority_name = map[int32]string{ 0: "SYS_ADMIN", 1: "CUSTOMER_USER", 2: "GUEST_USER", } UserAuthority_value = map[string]int32{ "SYS_ADMIN": 0, "CUSTOMER_USER": 1, "GUEST_USER": 2, } )
Enum value maps for UserAuthority.
var File_user_v1_error_proto protoreflect.FileDescriptor
var File_user_v1_user_proto protoreflect.FileDescriptor
var UserService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "user.v1.UserService", HandlerType: (*UserServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListUser", Handler: _UserService_ListUser_Handler, }, { MethodName: "GetUser", Handler: _UserService_GetUser_Handler, }, { MethodName: "CreateUser", Handler: _UserService_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _UserService_UpdateUser_Handler, }, { MethodName: "DeleteUser", Handler: _UserService_DeleteUser_Handler, }, { MethodName: "GetUserByUserName", Handler: _UserService_GetUserByUserName_Handler, }, { MethodName: "VerifyPassword", Handler: _UserService_VerifyPassword_Handler, }, { MethodName: "UserExists", Handler: _UserService_UserExists_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/v1/user.proto", }
UserService_ServiceDesc is the grpc.ServiceDesc for UserService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorAccessForbidden ¶
func ErrorIncorrectPassword ¶
func ErrorInvalidPassword ¶
func ErrorInvalidToken ¶
func ErrorInvalidUserid ¶
func ErrorMethodNotAllowed ¶
func ErrorNetworkError ¶
func ErrorNetworkTimeout ¶
func ErrorNotImplemented ¶
func ErrorNotLoggedIn ¶
func ErrorRequestNotSupport ¶
func ErrorRequestTimeout ¶
func ErrorResourceNotFound ¶
func ErrorServiceUnavailable ¶
func ErrorTokenExpired ¶
func ErrorTokenNotExist ¶
func ErrorUserFreeze ¶
func ErrorUserNotExist ¶
func ErrorUserNotFound ¶
func IsAccessForbidden ¶
func IsIncorrectPassword ¶
func IsInternalServerError ¶
func IsInvalidPassword ¶
func IsInvalidToken ¶
func IsInvalidUserid ¶
func IsMethodNotAllowed ¶
func IsNetworkError ¶
func IsNetworkTimeout ¶
func IsNotImplemented ¶
func IsNotLoggedIn ¶
func IsRequestNotSupport ¶
func IsRequestTimeout ¶
func IsResourceNotFound ¶
func IsServiceUnavailable ¶
func IsTokenExpired ¶
func IsTokenNotExist ¶
func IsUserFreeze ¶
func IsUserNotExist ¶
func IsUserNotFound ¶
func RegisterUserServiceServer ¶
func RegisterUserServiceServer(s grpc.ServiceRegistrar, srv UserServiceServer)
Types ¶
type CreateUserRequest ¶
type CreateUserRequest struct { User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"` OperatorId uint32 `protobuf:"varint,2,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"` // contains filtered or unexported fields }
func (*CreateUserRequest) Descriptor
deprecated
func (*CreateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
func (*CreateUserRequest) GetOperatorId ¶
func (x *CreateUserRequest) GetOperatorId() uint32
func (*CreateUserRequest) GetUser ¶
func (x *CreateUserRequest) GetUser() *User
func (*CreateUserRequest) ProtoMessage ¶
func (*CreateUserRequest) ProtoMessage()
func (*CreateUserRequest) ProtoReflect ¶
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message
func (*CreateUserRequest) Reset ¶
func (x *CreateUserRequest) Reset()
func (*CreateUserRequest) String ¶
func (x *CreateUserRequest) String() string
func (*CreateUserRequest) Validate ¶
func (m *CreateUserRequest) Validate() error
Validate checks the field values on CreateUserRequest 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 (*CreateUserRequest) ValidateAll ¶
func (m *CreateUserRequest) ValidateAll() error
ValidateAll checks the field values on CreateUserRequest 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 CreateUserRequestMultiError, or nil if none found.
type CreateUserRequestMultiError ¶
type CreateUserRequestMultiError []error
CreateUserRequestMultiError is an error wrapping multiple validation errors returned by CreateUserRequest.ValidateAll() if the designated constraints aren't met.
func (CreateUserRequestMultiError) AllErrors ¶
func (m CreateUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CreateUserRequestMultiError) Error ¶
func (m CreateUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CreateUserRequestValidationError ¶
type CreateUserRequestValidationError struct {
// contains filtered or unexported fields
}
CreateUserRequestValidationError is the validation error returned by CreateUserRequest.Validate if the designated constraints aren't met.
func (CreateUserRequestValidationError) Cause ¶
func (e CreateUserRequestValidationError) Cause() error
Cause function returns cause value.
func (CreateUserRequestValidationError) Error ¶
func (e CreateUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (CreateUserRequestValidationError) ErrorName ¶
func (e CreateUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (CreateUserRequestValidationError) Field ¶
func (e CreateUserRequestValidationError) Field() string
Field function returns field value.
func (CreateUserRequestValidationError) Key ¶
func (e CreateUserRequestValidationError) Key() bool
Key function returns key value.
func (CreateUserRequestValidationError) Reason ¶
func (e CreateUserRequestValidationError) Reason() string
Reason function returns reason value.
type DeleteUserRequest ¶
type DeleteUserRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` OperatorId uint32 `protobuf:"varint,2,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"` // contains filtered or unexported fields }
func (*DeleteUserRequest) Descriptor
deprecated
func (*DeleteUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use DeleteUserRequest.ProtoReflect.Descriptor instead.
func (*DeleteUserRequest) GetId ¶
func (x *DeleteUserRequest) GetId() uint32
func (*DeleteUserRequest) GetOperatorId ¶
func (x *DeleteUserRequest) GetOperatorId() uint32
func (*DeleteUserRequest) ProtoMessage ¶
func (*DeleteUserRequest) ProtoMessage()
func (*DeleteUserRequest) ProtoReflect ¶
func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message
func (*DeleteUserRequest) Reset ¶
func (x *DeleteUserRequest) Reset()
func (*DeleteUserRequest) String ¶
func (x *DeleteUserRequest) String() string
func (*DeleteUserRequest) Validate ¶
func (m *DeleteUserRequest) Validate() error
Validate checks the field values on DeleteUserRequest 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 (*DeleteUserRequest) ValidateAll ¶
func (m *DeleteUserRequest) ValidateAll() error
ValidateAll checks the field values on DeleteUserRequest 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 DeleteUserRequestMultiError, or nil if none found.
type DeleteUserRequestMultiError ¶
type DeleteUserRequestMultiError []error
DeleteUserRequestMultiError is an error wrapping multiple validation errors returned by DeleteUserRequest.ValidateAll() if the designated constraints aren't met.
func (DeleteUserRequestMultiError) AllErrors ¶
func (m DeleteUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (DeleteUserRequestMultiError) Error ¶
func (m DeleteUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type DeleteUserRequestValidationError ¶
type DeleteUserRequestValidationError struct {
// contains filtered or unexported fields
}
DeleteUserRequestValidationError is the validation error returned by DeleteUserRequest.Validate if the designated constraints aren't met.
func (DeleteUserRequestValidationError) Cause ¶
func (e DeleteUserRequestValidationError) Cause() error
Cause function returns cause value.
func (DeleteUserRequestValidationError) Error ¶
func (e DeleteUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (DeleteUserRequestValidationError) ErrorName ¶
func (e DeleteUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (DeleteUserRequestValidationError) Field ¶
func (e DeleteUserRequestValidationError) Field() string
Field function returns field value.
func (DeleteUserRequestValidationError) Key ¶
func (e DeleteUserRequestValidationError) Key() bool
Key function returns key value.
func (DeleteUserRequestValidationError) Reason ¶
func (e DeleteUserRequestValidationError) Reason() string
Reason function returns reason value.
type GetUserByUserNameRequest ¶
type GetUserByUserNameRequest struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` // contains filtered or unexported fields }
func (*GetUserByUserNameRequest) Descriptor
deprecated
func (*GetUserByUserNameRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserByUserNameRequest.ProtoReflect.Descriptor instead.
func (*GetUserByUserNameRequest) GetUserName ¶
func (x *GetUserByUserNameRequest) GetUserName() string
func (*GetUserByUserNameRequest) ProtoMessage ¶
func (*GetUserByUserNameRequest) ProtoMessage()
func (*GetUserByUserNameRequest) ProtoReflect ¶
func (x *GetUserByUserNameRequest) ProtoReflect() protoreflect.Message
func (*GetUserByUserNameRequest) Reset ¶
func (x *GetUserByUserNameRequest) Reset()
func (*GetUserByUserNameRequest) String ¶
func (x *GetUserByUserNameRequest) String() string
func (*GetUserByUserNameRequest) Validate ¶
func (m *GetUserByUserNameRequest) Validate() error
Validate checks the field values on GetUserByUserNameRequest 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 (*GetUserByUserNameRequest) ValidateAll ¶
func (m *GetUserByUserNameRequest) ValidateAll() error
ValidateAll checks the field values on GetUserByUserNameRequest 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 GetUserByUserNameRequestMultiError, or nil if none found.
type GetUserByUserNameRequestMultiError ¶
type GetUserByUserNameRequestMultiError []error
GetUserByUserNameRequestMultiError is an error wrapping multiple validation errors returned by GetUserByUserNameRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserByUserNameRequestMultiError) AllErrors ¶
func (m GetUserByUserNameRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserByUserNameRequestMultiError) Error ¶
func (m GetUserByUserNameRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserByUserNameRequestValidationError ¶
type GetUserByUserNameRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserByUserNameRequestValidationError is the validation error returned by GetUserByUserNameRequest.Validate if the designated constraints aren't met.
func (GetUserByUserNameRequestValidationError) Cause ¶
func (e GetUserByUserNameRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserByUserNameRequestValidationError) Error ¶
func (e GetUserByUserNameRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserByUserNameRequestValidationError) ErrorName ¶
func (e GetUserByUserNameRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserByUserNameRequestValidationError) Field ¶
func (e GetUserByUserNameRequestValidationError) Field() string
Field function returns field value.
func (GetUserByUserNameRequestValidationError) Key ¶
func (e GetUserByUserNameRequestValidationError) Key() bool
Key function returns key value.
func (GetUserByUserNameRequestValidationError) Reason ¶
func (e GetUserByUserNameRequestValidationError) Reason() string
Reason function returns reason value.
type GetUserRequest ¶
type GetUserRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetUserRequest) Descriptor
deprecated
func (*GetUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetUserRequest.ProtoReflect.Descriptor instead.
func (*GetUserRequest) GetId ¶
func (x *GetUserRequest) GetId() uint32
func (*GetUserRequest) ProtoMessage ¶
func (*GetUserRequest) ProtoMessage()
func (*GetUserRequest) ProtoReflect ¶
func (x *GetUserRequest) ProtoReflect() protoreflect.Message
func (*GetUserRequest) Reset ¶
func (x *GetUserRequest) Reset()
func (*GetUserRequest) String ¶
func (x *GetUserRequest) String() string
func (*GetUserRequest) Validate ¶
func (m *GetUserRequest) Validate() error
Validate checks the field values on GetUserRequest 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 (*GetUserRequest) ValidateAll ¶
func (m *GetUserRequest) ValidateAll() error
ValidateAll checks the field values on GetUserRequest 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 GetUserRequestMultiError, or nil if none found.
type GetUserRequestMultiError ¶
type GetUserRequestMultiError []error
GetUserRequestMultiError is an error wrapping multiple validation errors returned by GetUserRequest.ValidateAll() if the designated constraints aren't met.
func (GetUserRequestMultiError) AllErrors ¶
func (m GetUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (GetUserRequestMultiError) Error ¶
func (m GetUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type GetUserRequestValidationError ¶
type GetUserRequestValidationError struct {
// contains filtered or unexported fields
}
GetUserRequestValidationError is the validation error returned by GetUserRequest.Validate if the designated constraints aren't met.
func (GetUserRequestValidationError) Cause ¶
func (e GetUserRequestValidationError) Cause() error
Cause function returns cause value.
func (GetUserRequestValidationError) Error ¶
func (e GetUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (GetUserRequestValidationError) ErrorName ¶
func (e GetUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (GetUserRequestValidationError) Field ¶
func (e GetUserRequestValidationError) Field() string
Field function returns field value.
func (GetUserRequestValidationError) Key ¶
func (e GetUserRequestValidationError) Key() bool
Key function returns key value.
func (GetUserRequestValidationError) Reason ¶
func (e GetUserRequestValidationError) Reason() string
Reason function returns reason value.
type ListUserResponse ¶
type ListUserResponse struct { Items []*User `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` Total int32 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
List of users reply
func (*ListUserResponse) Descriptor
deprecated
func (*ListUserResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListUserResponse.ProtoReflect.Descriptor instead.
func (*ListUserResponse) GetItems ¶
func (x *ListUserResponse) GetItems() []*User
func (*ListUserResponse) GetTotal ¶
func (x *ListUserResponse) GetTotal() int32
func (*ListUserResponse) ProtoMessage ¶
func (*ListUserResponse) ProtoMessage()
func (*ListUserResponse) ProtoReflect ¶
func (x *ListUserResponse) ProtoReflect() protoreflect.Message
func (*ListUserResponse) Reset ¶
func (x *ListUserResponse) Reset()
func (*ListUserResponse) String ¶
func (x *ListUserResponse) String() string
func (*ListUserResponse) Validate ¶
func (m *ListUserResponse) Validate() error
Validate checks the field values on ListUserResponse 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 (*ListUserResponse) ValidateAll ¶
func (m *ListUserResponse) ValidateAll() error
ValidateAll checks the field values on ListUserResponse 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 ListUserResponseMultiError, or nil if none found.
type ListUserResponseMultiError ¶
type ListUserResponseMultiError []error
ListUserResponseMultiError is an error wrapping multiple validation errors returned by ListUserResponse.ValidateAll() if the designated constraints aren't met.
func (ListUserResponseMultiError) AllErrors ¶
func (m ListUserResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ListUserResponseMultiError) Error ¶
func (m ListUserResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ListUserResponseValidationError ¶
type ListUserResponseValidationError struct {
// contains filtered or unexported fields
}
ListUserResponseValidationError is the validation error returned by ListUserResponse.Validate if the designated constraints aren't met.
func (ListUserResponseValidationError) Cause ¶
func (e ListUserResponseValidationError) Cause() error
Cause function returns cause value.
func (ListUserResponseValidationError) Error ¶
func (e ListUserResponseValidationError) Error() string
Error satisfies the builtin error interface
func (ListUserResponseValidationError) ErrorName ¶
func (e ListUserResponseValidationError) ErrorName() string
ErrorName returns error name.
func (ListUserResponseValidationError) Field ¶
func (e ListUserResponseValidationError) Field() string
Field function returns field value.
func (ListUserResponseValidationError) Key ¶
func (e ListUserResponseValidationError) Key() bool
Key function returns key value.
func (ListUserResponseValidationError) Reason ¶
func (e ListUserResponseValidationError) Reason() string
Reason function returns reason value.
type UnimplementedUserServiceServer ¶
type UnimplementedUserServiceServer struct { }
UnimplementedUserServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedUserServiceServer) CreateUser ¶
func (UnimplementedUserServiceServer) CreateUser(context.Context, *CreateUserRequest) (*User, error)
func (UnimplementedUserServiceServer) DeleteUser ¶
func (UnimplementedUserServiceServer) DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error)
func (UnimplementedUserServiceServer) GetUser ¶
func (UnimplementedUserServiceServer) GetUser(context.Context, *GetUserRequest) (*User, error)
func (UnimplementedUserServiceServer) GetUserByUserName ¶
func (UnimplementedUserServiceServer) GetUserByUserName(context.Context, *GetUserByUserNameRequest) (*User, error)
func (UnimplementedUserServiceServer) ListUser ¶
func (UnimplementedUserServiceServer) ListUser(context.Context, *v1.PagingRequest) (*ListUserResponse, error)
func (UnimplementedUserServiceServer) UpdateUser ¶
func (UnimplementedUserServiceServer) UpdateUser(context.Context, *UpdateUserRequest) (*User, error)
func (UnimplementedUserServiceServer) UserExists ¶
func (UnimplementedUserServiceServer) UserExists(context.Context, *UserExistsRequest) (*UserExistsResponse, error)
func (UnimplementedUserServiceServer) VerifyPassword ¶
func (UnimplementedUserServiceServer) VerifyPassword(context.Context, *VerifyPasswordRequest) (*VerifyPasswordResponse, error)
type UnsafeUserServiceServer ¶
type UnsafeUserServiceServer interface {
// contains filtered or unexported methods
}
UnsafeUserServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to UserServiceServer will result in compilation errors.
type UpdateUserRequest ¶
type UpdateUserRequest struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` User *User `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` OperatorId uint32 `protobuf:"varint,3,opt,name=operator_id,json=operatorId,proto3" json:"operator_id,omitempty"` // contains filtered or unexported fields }
func (*UpdateUserRequest) Descriptor
deprecated
func (*UpdateUserRequest) Descriptor() ([]byte, []int)
Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
func (*UpdateUserRequest) GetId ¶
func (x *UpdateUserRequest) GetId() uint32
func (*UpdateUserRequest) GetOperatorId ¶
func (x *UpdateUserRequest) GetOperatorId() uint32
func (*UpdateUserRequest) GetUser ¶
func (x *UpdateUserRequest) GetUser() *User
func (*UpdateUserRequest) ProtoMessage ¶
func (*UpdateUserRequest) ProtoMessage()
func (*UpdateUserRequest) ProtoReflect ¶
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message
func (*UpdateUserRequest) Reset ¶
func (x *UpdateUserRequest) Reset()
func (*UpdateUserRequest) String ¶
func (x *UpdateUserRequest) String() string
func (*UpdateUserRequest) Validate ¶
func (m *UpdateUserRequest) Validate() error
Validate checks the field values on UpdateUserRequest 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 (*UpdateUserRequest) ValidateAll ¶
func (m *UpdateUserRequest) ValidateAll() error
ValidateAll checks the field values on UpdateUserRequest 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 UpdateUserRequestMultiError, or nil if none found.
type UpdateUserRequestMultiError ¶
type UpdateUserRequestMultiError []error
UpdateUserRequestMultiError is an error wrapping multiple validation errors returned by UpdateUserRequest.ValidateAll() if the designated constraints aren't met.
func (UpdateUserRequestMultiError) AllErrors ¶
func (m UpdateUserRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UpdateUserRequestMultiError) Error ¶
func (m UpdateUserRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UpdateUserRequestValidationError ¶
type UpdateUserRequestValidationError struct {
// contains filtered or unexported fields
}
UpdateUserRequestValidationError is the validation error returned by UpdateUserRequest.Validate if the designated constraints aren't met.
func (UpdateUserRequestValidationError) Cause ¶
func (e UpdateUserRequestValidationError) Cause() error
Cause function returns cause value.
func (UpdateUserRequestValidationError) Error ¶
func (e UpdateUserRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UpdateUserRequestValidationError) ErrorName ¶
func (e UpdateUserRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UpdateUserRequestValidationError) Field ¶
func (e UpdateUserRequestValidationError) Field() string
Field function returns field value.
func (UpdateUserRequestValidationError) Key ¶
func (e UpdateUserRequestValidationError) Key() bool
Key function returns key value.
func (UpdateUserRequestValidationError) Reason ¶
func (e UpdateUserRequestValidationError) Reason() string
Reason function returns reason value.
type User ¶
type User struct { Id uint32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserName *string `protobuf:"bytes,2,opt,name=user_name,json=userName,proto3,oneof" json:"user_name,omitempty"` Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` Avatar *string `protobuf:"bytes,4,opt,name=avatar,proto3,oneof" json:"avatar,omitempty"` Description *string `protobuf:"bytes,5,opt,name=description,proto3,oneof" json:"description,omitempty"` Password *string `protobuf:"bytes,6,opt,name=password,proto3,oneof" json:"password,omitempty"` CreateTime *string `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3,oneof" json:"create_time,omitempty"` UpdateTime *string `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3,oneof" json:"update_time,omitempty"` Status *string `protobuf:"bytes,9,opt,name=status,proto3,oneof" json:"status,omitempty"` RoleId *uint32 `protobuf:"varint,10,opt,name=role_id,json=roleId,proto3,oneof" json:"role_id,omitempty"` CreatorId *uint32 `protobuf:"varint,11,opt,name=creator_id,json=creatorId,proto3,oneof" json:"creator_id,omitempty"` Authority *UserAuthority `protobuf:"varint,12,opt,name=authority,proto3,enum=user.v1.UserAuthority,oneof" json:"authority,omitempty"` // contains filtered or unexported fields }
User
func (*User) Descriptor
deprecated
func (*User) GetAuthority ¶
func (x *User) GetAuthority() UserAuthority
func (*User) GetCreateTime ¶
func (*User) GetCreatorId ¶
func (*User) GetDescription ¶
func (*User) GetPassword ¶
func (*User) GetUpdateTime ¶
func (*User) GetUserName ¶
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User 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 (*User) ValidateAll ¶
ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.
type UserAuthority ¶
type UserAuthority int32
User rights
const ( UserAuthority_SYS_ADMIN UserAuthority = 0 UserAuthority_CUSTOMER_USER UserAuthority = 1 UserAuthority_GUEST_USER UserAuthority = 2 )
func (UserAuthority) Descriptor ¶
func (UserAuthority) Descriptor() protoreflect.EnumDescriptor
func (UserAuthority) Enum ¶
func (x UserAuthority) Enum() *UserAuthority
func (UserAuthority) EnumDescriptor
deprecated
func (UserAuthority) EnumDescriptor() ([]byte, []int)
Deprecated: Use UserAuthority.Descriptor instead.
func (UserAuthority) Number ¶
func (x UserAuthority) Number() protoreflect.EnumNumber
func (UserAuthority) String ¶
func (x UserAuthority) String() string
func (UserAuthority) Type ¶
func (UserAuthority) Type() protoreflect.EnumType
type UserErrorReason ¶
type UserErrorReason int32
const ( UserErrorReason_NOT_LOGGED_IN UserErrorReason = 0 UserErrorReason_ACCESS_FORBIDDEN UserErrorReason = 1 UserErrorReason_RESOURCE_NOT_FOUND UserErrorReason = 2 UserErrorReason_METHOD_NOT_ALLOWED UserErrorReason = 3 UserErrorReason_REQUEST_TIMEOUT UserErrorReason = 4 UserErrorReason_INTERNAL_SERVER_ERROR UserErrorReason = 5 UserErrorReason_NOT_IMPLEMENTED UserErrorReason = 6 UserErrorReason_NETWORK_ERROR UserErrorReason = 7 UserErrorReason_SERVICE_UNAVAILABLE UserErrorReason = 8 UserErrorReason_NETWORK_TIMEOUT UserErrorReason = 9 UserErrorReason_REQUEST_NOT_SUPPORT UserErrorReason = 10 UserErrorReason_USER_NOT_FOUND UserErrorReason = 11 UserErrorReason_INCORRECT_PASSWORD UserErrorReason = 12 UserErrorReason_USER_FREEZE UserErrorReason = 13 UserErrorReason_INVALID_USERID UserErrorReason = 14 UserErrorReason_INVALID_PASSWORD UserErrorReason = 15 UserErrorReason_TOKEN_EXPIRED UserErrorReason = 16 UserErrorReason_INVALID_TOKEN UserErrorReason = 17 UserErrorReason_TOKEN_NOT_EXIST UserErrorReason = 18 UserErrorReason_USER_NOT_EXIST UserErrorReason = 19 )
func (UserErrorReason) Descriptor ¶
func (UserErrorReason) Descriptor() protoreflect.EnumDescriptor
func (UserErrorReason) Enum ¶
func (x UserErrorReason) Enum() *UserErrorReason
func (UserErrorReason) EnumDescriptor
deprecated
func (UserErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use UserErrorReason.Descriptor instead.
func (UserErrorReason) Number ¶
func (x UserErrorReason) Number() protoreflect.EnumNumber
func (UserErrorReason) String ¶
func (x UserErrorReason) String() string
func (UserErrorReason) Type ¶
func (UserErrorReason) Type() protoreflect.EnumType
type UserExistsRequest ¶
type UserExistsRequest struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` // contains filtered or unexported fields }
func (*UserExistsRequest) Descriptor
deprecated
func (*UserExistsRequest) Descriptor() ([]byte, []int)
Deprecated: Use UserExistsRequest.ProtoReflect.Descriptor instead.
func (*UserExistsRequest) GetUserName ¶
func (x *UserExistsRequest) GetUserName() string
func (*UserExistsRequest) ProtoMessage ¶
func (*UserExistsRequest) ProtoMessage()
func (*UserExistsRequest) ProtoReflect ¶
func (x *UserExistsRequest) ProtoReflect() protoreflect.Message
func (*UserExistsRequest) Reset ¶
func (x *UserExistsRequest) Reset()
func (*UserExistsRequest) String ¶
func (x *UserExistsRequest) String() string
func (*UserExistsRequest) Validate ¶
func (m *UserExistsRequest) Validate() error
Validate checks the field values on UserExistsRequest 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 (*UserExistsRequest) ValidateAll ¶
func (m *UserExistsRequest) ValidateAll() error
ValidateAll checks the field values on UserExistsRequest 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 UserExistsRequestMultiError, or nil if none found.
type UserExistsRequestMultiError ¶
type UserExistsRequestMultiError []error
UserExistsRequestMultiError is an error wrapping multiple validation errors returned by UserExistsRequest.ValidateAll() if the designated constraints aren't met.
func (UserExistsRequestMultiError) AllErrors ¶
func (m UserExistsRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserExistsRequestMultiError) Error ¶
func (m UserExistsRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserExistsRequestValidationError ¶
type UserExistsRequestValidationError struct {
// contains filtered or unexported fields
}
UserExistsRequestValidationError is the validation error returned by UserExistsRequest.Validate if the designated constraints aren't met.
func (UserExistsRequestValidationError) Cause ¶
func (e UserExistsRequestValidationError) Cause() error
Cause function returns cause value.
func (UserExistsRequestValidationError) Error ¶
func (e UserExistsRequestValidationError) Error() string
Error satisfies the builtin error interface
func (UserExistsRequestValidationError) ErrorName ¶
func (e UserExistsRequestValidationError) ErrorName() string
ErrorName returns error name.
func (UserExistsRequestValidationError) Field ¶
func (e UserExistsRequestValidationError) Field() string
Field function returns field value.
func (UserExistsRequestValidationError) Key ¶
func (e UserExistsRequestValidationError) Key() bool
Key function returns key value.
func (UserExistsRequestValidationError) Reason ¶
func (e UserExistsRequestValidationError) Reason() string
Reason function returns reason value.
type UserExistsResponse ¶
type UserExistsResponse struct { Exist bool `protobuf:"varint,1,opt,name=exist,proto3" json:"exist,omitempty"` // contains filtered or unexported fields }
func (*UserExistsResponse) Descriptor
deprecated
func (*UserExistsResponse) Descriptor() ([]byte, []int)
Deprecated: Use UserExistsResponse.ProtoReflect.Descriptor instead.
func (*UserExistsResponse) GetExist ¶
func (x *UserExistsResponse) GetExist() bool
func (*UserExistsResponse) ProtoMessage ¶
func (*UserExistsResponse) ProtoMessage()
func (*UserExistsResponse) ProtoReflect ¶
func (x *UserExistsResponse) ProtoReflect() protoreflect.Message
func (*UserExistsResponse) Reset ¶
func (x *UserExistsResponse) Reset()
func (*UserExistsResponse) String ¶
func (x *UserExistsResponse) String() string
func (*UserExistsResponse) Validate ¶
func (m *UserExistsResponse) Validate() error
Validate checks the field values on UserExistsResponse 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 (*UserExistsResponse) ValidateAll ¶
func (m *UserExistsResponse) ValidateAll() error
ValidateAll checks the field values on UserExistsResponse 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 UserExistsResponseMultiError, or nil if none found.
type UserExistsResponseMultiError ¶
type UserExistsResponseMultiError []error
UserExistsResponseMultiError is an error wrapping multiple validation errors returned by UserExistsResponse.ValidateAll() if the designated constraints aren't met.
func (UserExistsResponseMultiError) AllErrors ¶
func (m UserExistsResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserExistsResponseMultiError) Error ¶
func (m UserExistsResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserExistsResponseValidationError ¶
type UserExistsResponseValidationError struct {
// contains filtered or unexported fields
}
UserExistsResponseValidationError is the validation error returned by UserExistsResponse.Validate if the designated constraints aren't met.
func (UserExistsResponseValidationError) Cause ¶
func (e UserExistsResponseValidationError) Cause() error
Cause function returns cause value.
func (UserExistsResponseValidationError) Error ¶
func (e UserExistsResponseValidationError) Error() string
Error satisfies the builtin error interface
func (UserExistsResponseValidationError) ErrorName ¶
func (e UserExistsResponseValidationError) ErrorName() string
ErrorName returns error name.
func (UserExistsResponseValidationError) Field ¶
func (e UserExistsResponseValidationError) Field() string
Field function returns field value.
func (UserExistsResponseValidationError) Key ¶
func (e UserExistsResponseValidationError) Key() bool
Key function returns key value.
func (UserExistsResponseValidationError) Reason ¶
func (e UserExistsResponseValidationError) Reason() string
Reason function returns reason value.
type UserMultiError ¶
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserServiceClient ¶
type UserServiceClient interface { // List of users ListUser(ctx context.Context, in *v1.PagingRequest, opts ...grpc.CallOption) (*ListUserResponse, error) // Get user detail GetUser(ctx context.Context, in *GetUserRequest, opts ...grpc.CallOption) (*User, error) // Create user CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*User, error) // Update user UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*User, error) // Delete user DeleteUser(ctx context.Context, in *DeleteUserRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) // Get user by username GetUserByUserName(ctx context.Context, in *GetUserByUserNameRequest, opts ...grpc.CallOption) (*User, error) // Verify password VerifyPassword(ctx context.Context, in *VerifyPasswordRequest, opts ...grpc.CallOption) (*VerifyPasswordResponse, error) // Check user exists UserExists(ctx context.Context, in *UserExistsRequest, opts ...grpc.CallOption) (*UserExistsResponse, error) }
UserServiceClient is the client API for UserService 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.
The user service definition.
func NewUserServiceClient ¶
func NewUserServiceClient(cc grpc.ClientConnInterface) UserServiceClient
type UserServiceServer ¶
type UserServiceServer interface { // List of users ListUser(context.Context, *v1.PagingRequest) (*ListUserResponse, error) // Get user detail GetUser(context.Context, *GetUserRequest) (*User, error) // Create user CreateUser(context.Context, *CreateUserRequest) (*User, error) // Update user UpdateUser(context.Context, *UpdateUserRequest) (*User, error) // Delete user DeleteUser(context.Context, *DeleteUserRequest) (*emptypb.Empty, error) // Get user by username GetUserByUserName(context.Context, *GetUserByUserNameRequest) (*User, error) // Verify password VerifyPassword(context.Context, *VerifyPasswordRequest) (*VerifyPasswordResponse, error) // Check user exists UserExists(context.Context, *UserExistsRequest) (*UserExistsResponse, error) // contains filtered or unexported methods }
UserServiceServer is the server API for UserService service. All implementations must embed UnimplementedUserServiceServer for forward compatibility
The user service definition.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.
type VerifyPasswordRequest ¶
type VerifyPasswordRequest struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` Password string `protobuf:"bytes,2,opt,name=password,proto3" json:"password,omitempty"` // contains filtered or unexported fields }
func (*VerifyPasswordRequest) Descriptor
deprecated
func (*VerifyPasswordRequest) Descriptor() ([]byte, []int)
Deprecated: Use VerifyPasswordRequest.ProtoReflect.Descriptor instead.
func (*VerifyPasswordRequest) GetPassword ¶
func (x *VerifyPasswordRequest) GetPassword() string
func (*VerifyPasswordRequest) GetUserName ¶
func (x *VerifyPasswordRequest) GetUserName() string
func (*VerifyPasswordRequest) ProtoMessage ¶
func (*VerifyPasswordRequest) ProtoMessage()
func (*VerifyPasswordRequest) ProtoReflect ¶
func (x *VerifyPasswordRequest) ProtoReflect() protoreflect.Message
func (*VerifyPasswordRequest) Reset ¶
func (x *VerifyPasswordRequest) Reset()
func (*VerifyPasswordRequest) String ¶
func (x *VerifyPasswordRequest) String() string
func (*VerifyPasswordRequest) Validate ¶
func (m *VerifyPasswordRequest) Validate() error
Validate checks the field values on VerifyPasswordRequest 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 (*VerifyPasswordRequest) ValidateAll ¶
func (m *VerifyPasswordRequest) ValidateAll() error
ValidateAll checks the field values on VerifyPasswordRequest 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 VerifyPasswordRequestMultiError, or nil if none found.
type VerifyPasswordRequestMultiError ¶
type VerifyPasswordRequestMultiError []error
VerifyPasswordRequestMultiError is an error wrapping multiple validation errors returned by VerifyPasswordRequest.ValidateAll() if the designated constraints aren't met.
func (VerifyPasswordRequestMultiError) AllErrors ¶
func (m VerifyPasswordRequestMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VerifyPasswordRequestMultiError) Error ¶
func (m VerifyPasswordRequestMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VerifyPasswordRequestValidationError ¶
type VerifyPasswordRequestValidationError struct {
// contains filtered or unexported fields
}
VerifyPasswordRequestValidationError is the validation error returned by VerifyPasswordRequest.Validate if the designated constraints aren't met.
func (VerifyPasswordRequestValidationError) Cause ¶
func (e VerifyPasswordRequestValidationError) Cause() error
Cause function returns cause value.
func (VerifyPasswordRequestValidationError) Error ¶
func (e VerifyPasswordRequestValidationError) Error() string
Error satisfies the builtin error interface
func (VerifyPasswordRequestValidationError) ErrorName ¶
func (e VerifyPasswordRequestValidationError) ErrorName() string
ErrorName returns error name.
func (VerifyPasswordRequestValidationError) Field ¶
func (e VerifyPasswordRequestValidationError) Field() string
Field function returns field value.
func (VerifyPasswordRequestValidationError) Key ¶
func (e VerifyPasswordRequestValidationError) Key() bool
Key function returns key value.
func (VerifyPasswordRequestValidationError) Reason ¶
func (e VerifyPasswordRequestValidationError) Reason() string
Reason function returns reason value.
type VerifyPasswordResponse ¶
type VerifyPasswordResponse struct { Result VerifyPasswordResult `protobuf:"varint,1,opt,name=result,proto3,enum=user.v1.VerifyPasswordResult" json:"result,omitempty"` // contains filtered or unexported fields }
func (*VerifyPasswordResponse) Descriptor
deprecated
func (*VerifyPasswordResponse) Descriptor() ([]byte, []int)
Deprecated: Use VerifyPasswordResponse.ProtoReflect.Descriptor instead.
func (*VerifyPasswordResponse) GetResult ¶
func (x *VerifyPasswordResponse) GetResult() VerifyPasswordResult
func (*VerifyPasswordResponse) ProtoMessage ¶
func (*VerifyPasswordResponse) ProtoMessage()
func (*VerifyPasswordResponse) ProtoReflect ¶
func (x *VerifyPasswordResponse) ProtoReflect() protoreflect.Message
func (*VerifyPasswordResponse) Reset ¶
func (x *VerifyPasswordResponse) Reset()
func (*VerifyPasswordResponse) String ¶
func (x *VerifyPasswordResponse) String() string
func (*VerifyPasswordResponse) Validate ¶
func (m *VerifyPasswordResponse) Validate() error
Validate checks the field values on VerifyPasswordResponse 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 (*VerifyPasswordResponse) ValidateAll ¶
func (m *VerifyPasswordResponse) ValidateAll() error
ValidateAll checks the field values on VerifyPasswordResponse 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 VerifyPasswordResponseMultiError, or nil if none found.
type VerifyPasswordResponseMultiError ¶
type VerifyPasswordResponseMultiError []error
VerifyPasswordResponseMultiError is an error wrapping multiple validation errors returned by VerifyPasswordResponse.ValidateAll() if the designated constraints aren't met.
func (VerifyPasswordResponseMultiError) AllErrors ¶
func (m VerifyPasswordResponseMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (VerifyPasswordResponseMultiError) Error ¶
func (m VerifyPasswordResponseMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type VerifyPasswordResponseValidationError ¶
type VerifyPasswordResponseValidationError struct {
// contains filtered or unexported fields
}
VerifyPasswordResponseValidationError is the validation error returned by VerifyPasswordResponse.Validate if the designated constraints aren't met.
func (VerifyPasswordResponseValidationError) Cause ¶
func (e VerifyPasswordResponseValidationError) Cause() error
Cause function returns cause value.
func (VerifyPasswordResponseValidationError) Error ¶
func (e VerifyPasswordResponseValidationError) Error() string
Error satisfies the builtin error interface
func (VerifyPasswordResponseValidationError) ErrorName ¶
func (e VerifyPasswordResponseValidationError) ErrorName() string
ErrorName returns error name.
func (VerifyPasswordResponseValidationError) Field ¶
func (e VerifyPasswordResponseValidationError) Field() string
Field function returns field value.
func (VerifyPasswordResponseValidationError) Key ¶
func (e VerifyPasswordResponseValidationError) Key() bool
Key function returns key value.
func (VerifyPasswordResponseValidationError) Reason ¶
func (e VerifyPasswordResponseValidationError) Reason() string
Reason function returns reason value.
type VerifyPasswordResult ¶
type VerifyPasswordResult int32
Verify password result code
const ( VerifyPasswordResult_SUCCESS VerifyPasswordResult = 0 VerifyPasswordResult_ACCOUNT_NOT_EXISTS VerifyPasswordResult = 1 VerifyPasswordResult_WRONG_PASSWORD VerifyPasswordResult = 2 VerifyPasswordResult_FREEZE VerifyPasswordResult = 3 VerifyPasswordResult_DELETED VerifyPasswordResult = 4 )
func (VerifyPasswordResult) Descriptor ¶
func (VerifyPasswordResult) Descriptor() protoreflect.EnumDescriptor
func (VerifyPasswordResult) Enum ¶
func (x VerifyPasswordResult) Enum() *VerifyPasswordResult
func (VerifyPasswordResult) EnumDescriptor
deprecated
func (VerifyPasswordResult) EnumDescriptor() ([]byte, []int)
Deprecated: Use VerifyPasswordResult.Descriptor instead.
func (VerifyPasswordResult) Number ¶
func (x VerifyPasswordResult) Number() protoreflect.EnumNumber
func (VerifyPasswordResult) String ¶
func (x VerifyPasswordResult) String() string
func (VerifyPasswordResult) Type ¶
func (VerifyPasswordResult) Type() protoreflect.EnumType