userv1

package
v0.0.0-...-f0a7105 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 19, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
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

View Source
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.

View Source
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.

View Source
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.

View Source
var File_user_v1_error_proto protoreflect.FileDescriptor
View Source
var File_user_v1_user_proto protoreflect.FileDescriptor
View Source
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 ErrorAccessForbidden(format string, args ...interface{}) *errors.Error

func ErrorIncorrectPassword

func ErrorIncorrectPassword(format string, args ...interface{}) *errors.Error

func ErrorInternalServerError

func ErrorInternalServerError(format string, args ...interface{}) *errors.Error

func ErrorInvalidPassword

func ErrorInvalidPassword(format string, args ...interface{}) *errors.Error

func ErrorInvalidToken

func ErrorInvalidToken(format string, args ...interface{}) *errors.Error

func ErrorInvalidUserid

func ErrorInvalidUserid(format string, args ...interface{}) *errors.Error

func ErrorMethodNotAllowed

func ErrorMethodNotAllowed(format string, args ...interface{}) *errors.Error

func ErrorNetworkError

func ErrorNetworkError(format string, args ...interface{}) *errors.Error

func ErrorNetworkTimeout

func ErrorNetworkTimeout(format string, args ...interface{}) *errors.Error

func ErrorNotImplemented

func ErrorNotImplemented(format string, args ...interface{}) *errors.Error

func ErrorNotLoggedIn

func ErrorNotLoggedIn(format string, args ...interface{}) *errors.Error

func ErrorRequestNotSupport

func ErrorRequestNotSupport(format string, args ...interface{}) *errors.Error

func ErrorRequestTimeout

func ErrorRequestTimeout(format string, args ...interface{}) *errors.Error

func ErrorResourceNotFound

func ErrorResourceNotFound(format string, args ...interface{}) *errors.Error

func ErrorServiceUnavailable

func ErrorServiceUnavailable(format string, args ...interface{}) *errors.Error

func ErrorTokenExpired

func ErrorTokenExpired(format string, args ...interface{}) *errors.Error

func ErrorTokenNotExist

func ErrorTokenNotExist(format string, args ...interface{}) *errors.Error

func ErrorUserFreeze

func ErrorUserFreeze(format string, args ...interface{}) *errors.Error

func ErrorUserNotExist

func ErrorUserNotExist(format string, args ...interface{}) *errors.Error

func ErrorUserNotFound

func ErrorUserNotFound(format string, args ...interface{}) *errors.Error

func IsAccessForbidden

func IsAccessForbidden(err error) bool

func IsIncorrectPassword

func IsIncorrectPassword(err error) bool

func IsInternalServerError

func IsInternalServerError(err error) bool

func IsInvalidPassword

func IsInvalidPassword(err error) bool

func IsInvalidToken

func IsInvalidToken(err error) bool

func IsInvalidUserid

func IsInvalidUserid(err error) bool

func IsMethodNotAllowed

func IsMethodNotAllowed(err error) bool

func IsNetworkError

func IsNetworkError(err error) bool

func IsNetworkTimeout

func IsNetworkTimeout(err error) bool

func IsNotImplemented

func IsNotImplemented(err error) bool

func IsNotLoggedIn

func IsNotLoggedIn(err error) bool

func IsRequestNotSupport

func IsRequestNotSupport(err error) bool

func IsRequestTimeout

func IsRequestTimeout(err error) bool

func IsResourceNotFound

func IsResourceNotFound(err error) bool

func IsServiceUnavailable

func IsServiceUnavailable(err error) bool

func IsTokenExpired

func IsTokenExpired(err error) bool

func IsTokenNotExist

func IsTokenNotExist(err error) bool

func IsUserFreeze

func IsUserFreeze(err error) bool

func IsUserNotExist

func IsUserNotExist(err error) bool

func IsUserNotFound

func IsUserNotFound(err error) bool

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

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

Cause function returns cause value.

func (CreateUserRequestValidationError) Error

Error satisfies the builtin error interface

func (CreateUserRequestValidationError) ErrorName

ErrorName returns error name.

func (CreateUserRequestValidationError) Field

Field function returns field value.

func (CreateUserRequestValidationError) Key

Key function returns key value.

func (CreateUserRequestValidationError) Reason

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

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

Cause function returns cause value.

func (DeleteUserRequestValidationError) Error

Error satisfies the builtin error interface

func (DeleteUserRequestValidationError) ErrorName

ErrorName returns error name.

func (DeleteUserRequestValidationError) Field

Field function returns field value.

func (DeleteUserRequestValidationError) Key

Key function returns key value.

func (DeleteUserRequestValidationError) Reason

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

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

Cause function returns cause value.

func (GetUserByUserNameRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserByUserNameRequestValidationError) ErrorName

ErrorName returns error name.

func (GetUserByUserNameRequestValidationError) Field

Field function returns field value.

func (GetUserByUserNameRequestValidationError) Key

Key function returns key value.

func (GetUserByUserNameRequestValidationError) Reason

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

Cause function returns cause value.

func (GetUserRequestValidationError) Error

Error satisfies the builtin error interface

func (GetUserRequestValidationError) ErrorName

func (e GetUserRequestValidationError) ErrorName() string

ErrorName returns error name.

func (GetUserRequestValidationError) Field

Field function returns field value.

func (GetUserRequestValidationError) Key

Key function returns key value.

func (GetUserRequestValidationError) Reason

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

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

Cause function returns cause value.

func (ListUserResponseValidationError) Error

Error satisfies the builtin error interface

func (ListUserResponseValidationError) ErrorName

ErrorName returns error name.

func (ListUserResponseValidationError) Field

Field function returns field value.

func (ListUserResponseValidationError) Key

Key function returns key value.

func (ListUserResponseValidationError) Reason

Reason function returns reason value.

type UnimplementedUserServiceServer

type UnimplementedUserServiceServer struct {
}

UnimplementedUserServiceServer must be embedded to have forward compatible implementations.

func (UnimplementedUserServiceServer) CreateUser

func (UnimplementedUserServiceServer) DeleteUser

func (UnimplementedUserServiceServer) GetUser

func (UnimplementedUserServiceServer) GetUserByUserName

func (UnimplementedUserServiceServer) ListUser

func (UnimplementedUserServiceServer) UpdateUser

func (UnimplementedUserServiceServer) UserExists

func (UnimplementedUserServiceServer) VerifyPassword

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

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

Cause function returns cause value.

func (UpdateUserRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateUserRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateUserRequestValidationError) Field

Field function returns field value.

func (UpdateUserRequestValidationError) Key

Key function returns key value.

func (UpdateUserRequestValidationError) Reason

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) Descriptor() ([]byte, []int)

Deprecated: Use User.ProtoReflect.Descriptor instead.

func (*User) GetAuthority

func (x *User) GetAuthority() UserAuthority

func (*User) GetAvatar

func (x *User) GetAvatar() string

func (*User) GetCreateTime

func (x *User) GetCreateTime() string

func (*User) GetCreatorId

func (x *User) GetCreatorId() uint32

func (*User) GetDescription

func (x *User) GetDescription() string

func (*User) GetEmail

func (x *User) GetEmail() string

func (*User) GetId

func (x *User) GetId() uint32

func (*User) GetPassword

func (x *User) GetPassword() string

func (*User) GetRoleId

func (x *User) GetRoleId() uint32

func (*User) GetStatus

func (x *User) GetStatus() string

func (*User) GetUpdateTime

func (x *User) GetUpdateTime() string

func (*User) GetUserName

func (x *User) GetUserName() string

func (*User) ProtoMessage

func (*User) ProtoMessage()

func (*User) ProtoReflect

func (x *User) ProtoReflect() protoreflect.Message

func (*User) Reset

func (x *User) Reset()

func (*User) String

func (x *User) String() string

func (*User) Validate

func (m *User) Validate() error

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

func (m *User) ValidateAll() error

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) Enum

func (x UserAuthority) Enum() *UserAuthority

func (UserAuthority) EnumDescriptor deprecated

func (UserAuthority) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserAuthority.Descriptor instead.

func (UserAuthority) Number

func (UserAuthority) String

func (x UserAuthority) String() string

func (UserAuthority) Type

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) Enum

func (x UserErrorReason) Enum() *UserErrorReason

func (UserErrorReason) EnumDescriptor deprecated

func (UserErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use UserErrorReason.Descriptor instead.

func (UserErrorReason) Number

func (UserErrorReason) String

func (x UserErrorReason) String() string

func (UserErrorReason) Type

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

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

Cause function returns cause value.

func (UserExistsRequestValidationError) Error

Error satisfies the builtin error interface

func (UserExistsRequestValidationError) ErrorName

ErrorName returns error name.

func (UserExistsRequestValidationError) Field

Field function returns field value.

func (UserExistsRequestValidationError) Key

Key function returns key value.

func (UserExistsRequestValidationError) Reason

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

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

Cause function returns cause value.

func (UserExistsResponseValidationError) Error

Error satisfies the builtin error interface

func (UserExistsResponseValidationError) ErrorName

ErrorName returns error name.

func (UserExistsResponseValidationError) Field

Field function returns field value.

func (UserExistsResponseValidationError) Key

Key function returns key value.

func (UserExistsResponseValidationError) Reason

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.

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

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

Cause function returns cause value.

func (VerifyPasswordRequestValidationError) Error

Error satisfies the builtin error interface

func (VerifyPasswordRequestValidationError) ErrorName

ErrorName returns error name.

func (VerifyPasswordRequestValidationError) Field

Field function returns field value.

func (VerifyPasswordRequestValidationError) Key

Key function returns key value.

func (VerifyPasswordRequestValidationError) Reason

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 (*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

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

Cause function returns cause value.

func (VerifyPasswordResponseValidationError) Error

Error satisfies the builtin error interface

func (VerifyPasswordResponseValidationError) ErrorName

ErrorName returns error name.

func (VerifyPasswordResponseValidationError) Field

Field function returns field value.

func (VerifyPasswordResponseValidationError) Key

Key function returns key value.

func (VerifyPasswordResponseValidationError) Reason

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) Enum

func (VerifyPasswordResult) EnumDescriptor deprecated

func (VerifyPasswordResult) EnumDescriptor() ([]byte, []int)

Deprecated: Use VerifyPasswordResult.Descriptor instead.

func (VerifyPasswordResult) Number

func (VerifyPasswordResult) String

func (x VerifyPasswordResult) String() string

func (VerifyPasswordResult) Type

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL