Documentation
¶
Index ¶
- Variables
- func ErrorBadRequest(format string, args ...interface{}) *errors.Error
- func ErrorCaptcha(format string, args ...interface{}) *errors.Error
- func ErrorConflict(format string, args ...interface{}) *errors.Error
- func ErrorExist(format string, args ...interface{}) *errors.Error
- func ErrorForbidden(format string, args ...interface{}) *errors.Error
- func ErrorInternalServer(format string, args ...interface{}) *errors.Error
- func ErrorInvalidArgument(format string, args ...interface{}) *errors.Error
- func ErrorNotFound(format string, args ...interface{}) *errors.Error
- func ErrorParams(format string, args ...interface{}) *errors.Error
- func ErrorPassword(format string, args ...interface{}) *errors.Error
- func ErrorPermissionDenied(format string, args ...interface{}) *errors.Error
- func ErrorRequired(format string, args ...interface{}) *errors.Error
- func ErrorResourceNotOpen(format string, args ...interface{}) *errors.Error
- func ErrorTokenExpired(format string, args ...interface{}) *errors.Error
- func ErrorTokenInvalid(format string, args ...interface{}) *errors.Error
- func ErrorUnauthorized(format string, args ...interface{}) *errors.Error
- func ErrorUserForbidden(format string, args ...interface{}) *errors.Error
- func ErrorUserNotFound(format string, args ...interface{}) *errors.Error
- func IsBadRequest(err error) bool
- func IsCaptcha(err error) bool
- func IsConflict(err error) bool
- func IsExist(err error) bool
- func IsForbidden(err error) bool
- func IsInternalServer(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsParams(err error) bool
- func IsPassword(err error) bool
- func IsPermissionDenied(err error) bool
- func IsRequired(err error) bool
- func IsResourceNotOpen(err error) bool
- func IsTokenExpired(err error) bool
- func IsTokenInvalid(err error) bool
- func IsUnauthorized(err error) bool
- func IsUserForbidden(err error) bool
- func IsUserNotFound(err error) bool
- type ClientError
- func (ClientError) Descriptor() protoreflect.EnumDescriptor
- func (x ClientError) Enum() *ClientError
- func (ClientError) EnumDescriptor() ([]byte, []int)deprecated
- func (x ClientError) Number() protoreflect.EnumNumber
- func (x ClientError) String() string
- func (ClientError) Type() protoreflect.EnumType
- type ForbiddenError
- func (ForbiddenError) Descriptor() protoreflect.EnumDescriptor
- func (x ForbiddenError) Enum() *ForbiddenError
- func (ForbiddenError) EnumDescriptor() ([]byte, []int)deprecated
- func (x ForbiddenError) Number() protoreflect.EnumNumber
- func (x ForbiddenError) String() string
- func (ForbiddenError) Type() protoreflect.EnumType
- type ServerError
- func (ServerError) Descriptor() protoreflect.EnumDescriptor
- func (x ServerError) Enum() *ServerError
- func (ServerError) EnumDescriptor() ([]byte, []int)deprecated
- func (x ServerError) Number() protoreflect.EnumNumber
- func (x ServerError) String() string
- func (ServerError) Type() protoreflect.EnumType
- type UnauthorizedError
- func (UnauthorizedError) Descriptor() protoreflect.EnumDescriptor
- func (x UnauthorizedError) Enum() *UnauthorizedError
- func (UnauthorizedError) EnumDescriptor() ([]byte, []int)deprecated
- func (x UnauthorizedError) Number() protoreflect.EnumNumber
- func (x UnauthorizedError) String() string
- func (UnauthorizedError) Type() protoreflect.EnumType
Constants ¶
This section is empty.
Variables ¶
var ( ClientError_name = map[int32]string{ 0: "BAD_REQUEST", 1: "NOT_FOUND", 2: "CAPTCHA", 3: "PARAMS", 4: "EXIST", 5: "REQUIRED", 6: "CONFLICT", } ClientError_value = map[string]int32{ "BAD_REQUEST": 0, "NOT_FOUND": 1, "CAPTCHA": 2, "PARAMS": 3, "EXIST": 4, "REQUIRED": 5, "CONFLICT": 6, } )
Enum value maps for ClientError.
var ( 0: "UNAUTHORIZED", 1: "TOKEN_INVALID", 2: "TOKEN_EXPIRED", 3: "USER_FORBIDDEN", 4: "USER_NOT_FOUND", } "UNAUTHORIZED": 0, "TOKEN_INVALID": 1, "TOKEN_EXPIRED": 2, "USER_FORBIDDEN": 3, "USER_NOT_FOUND": 4, } )
Enum value maps for UnauthorizedError.
var ( ForbiddenError_name = map[int32]string{ 0: "FORBIDDEN", 1: "RESOURCE_NOT_OPEN", 4: "PASSWORD", 5: "PERMISSION_DENIED", } ForbiddenError_value = map[string]int32{ "FORBIDDEN": 0, "RESOURCE_NOT_OPEN": 1, "PASSWORD": 4, "PERMISSION_DENIED": 5, } )
Enum value maps for ForbiddenError.
var ( ServerError_name = map[int32]string{ 0: "INTERNAL_SERVER", 1: "INVALID_ARGUMENT", } ServerError_value = map[string]int32{ "INTERNAL_SERVER": 0, "INVALID_ARGUMENT": 1, } )
Enum value maps for ServerError.
var File_err_proto protoreflect.FileDescriptor
Functions ¶
func ErrorBadRequest ¶
BAD_REQUEST Request Parameter Issues
- Incorrect Request Format: The data format sent by the client does not meet the requirements of the API.
- Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements.
- Missing Necessary Parameters: The required parameters for the API are not provided.
- Invalid Parameter Format: The provided parameter format is incorrect.
func ErrorCaptcha ¶
CAPTCHA Captcha Verification Failed
- Incorrect Captcha: The provided captcha code is incorrect.
- Captcha Expired: The captcha code has expired and cannot be used.
- Captcha Not Provided: The captcha code is required but not provided.
func ErrorConflict ¶
CONFLICT Conflict
- The requested resource already exists.
- The requested resource already error.
func ErrorExist ¶
EXIST Resource Already Exists
- The requested resource already exists.
- The requested resource already error
func ErrorForbidden ¶
## Permission Denied - The user does not have the necessary permissions to access the resource.
func ErrorInternalServer ¶
## Server Error - The server encountered an unexpected error. - The server is temporarily unavailable.
func ErrorInvalidArgument ¶
## Invalid Argument - The provided argument is invalid or does not meet the requirements. - The provided argument is out of range. - The provided argument is not supported.
func ErrorNotFound ¶
NOT_FOUND Resource Not Found
- The requested resource does not exist or is not available.
func ErrorParams ¶
PARAMS Invalid Parameters
- Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements.
- Missing Necessary Parameters: The required parameters for the API are not provided.
func ErrorPassword ¶
## Invalid Password - The provided password is invalid. - The user account is disabled and cannot access the resource.
func ErrorPermissionDenied ¶
## Permission Denied - The user does not have the necessary permissions to access the resource. - The member account is disabled and cannot access the resource.
func ErrorResourceNotOpen ¶
## Resource Not Open - The requested resource is not open to the public.
func ErrorTokenInvalid ¶
UNAUTHORIZED_INVALID_TOKEN Invalid Token
- The provided authentication token is invalid or does not have the required permissions.
func ErrorUnauthorized ¶
UNAUTHORIZED Authentication Issues - The user is not authenticated or does not have the required permissions to access the resource.
func ErrorUserForbidden ¶
USER_FORBIDDEN User Forbidden
- The user account is disabled and cannot access the resource.
func IsBadRequest ¶
BAD_REQUEST Request Parameter Issues
- Incorrect Request Format: The data format sent by the client does not meet the requirements of the API.
- Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements.
- Missing Necessary Parameters: The required parameters for the API are not provided.
- Invalid Parameter Format: The provided parameter format is incorrect.
func IsCaptcha ¶
CAPTCHA Captcha Verification Failed
- Incorrect Captcha: The provided captcha code is incorrect.
- Captcha Expired: The captcha code has expired and cannot be used.
- Captcha Not Provided: The captcha code is required but not provided.
func IsConflict ¶
CONFLICT Conflict
- The requested resource already exists.
- The requested resource already error.
func IsExist ¶
EXIST Resource Already Exists
- The requested resource already exists.
- The requested resource already error
func IsForbidden ¶
## Permission Denied - The user does not have the necessary permissions to access the resource.
func IsInternalServer ¶
## Server Error - The server encountered an unexpected error. - The server is temporarily unavailable.
func IsInvalidArgument ¶
## Invalid Argument - The provided argument is invalid or does not meet the requirements. - The provided argument is out of range. - The provided argument is not supported.
func IsNotFound ¶
NOT_FOUND Resource Not Found
- The requested resource does not exist or is not available.
func IsParams ¶
PARAMS Invalid Parameters
- Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements.
- Missing Necessary Parameters: The required parameters for the API are not provided.
func IsPassword ¶
## Invalid Password - The provided password is invalid. - The user account is disabled and cannot access the resource.
func IsPermissionDenied ¶
## Permission Denied - The user does not have the necessary permissions to access the resource. - The member account is disabled and cannot access the resource.
func IsResourceNotOpen ¶
## Resource Not Open - The requested resource is not open to the public.
func IsTokenInvalid ¶
UNAUTHORIZED_INVALID_TOKEN Invalid Token
- The provided authentication token is invalid or does not have the required permissions.
func IsUnauthorized ¶
UNAUTHORIZED Authentication Issues - The user is not authenticated or does not have the required permissions to access the resource.
func IsUserForbidden ¶
USER_FORBIDDEN User Forbidden
- The user account is disabled and cannot access the resource.
Types ¶
type ClientError ¶
type ClientError int32
const ( // BAD_REQUEST Request Parameter Issues // - Incorrect Request Format: The data format sent by the client does not meet the requirements of the API. // - Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements. // - Missing Necessary Parameters: The required parameters for the API are not provided. // - Invalid Parameter Format: The provided parameter format is incorrect. ClientError_BAD_REQUEST ClientError = 0 // NOT_FOUND Resource Not Found // - The requested resource does not exist or is not available. ClientError_NOT_FOUND ClientError = 1 // CAPTCHA Captcha Verification Failed // - Incorrect Captcha: The provided captcha code is incorrect. // - Captcha Expired: The captcha code has expired and cannot be used. // - Captcha Not Provided: The captcha code is required but not provided. ClientError_CAPTCHA ClientError = 2 // PARAMS Invalid Parameters // - Invalid Parameter Values: The provided parameter values do not comply with business rules or format requirements. // - Missing Necessary Parameters: The required parameters for the API are not provided. ClientError_PARAMS ClientError = 3 // EXIST Resource Already Exists // - The requested resource already exists. // - The requested resource already error ClientError_EXIST ClientError = 4 // REQUIRED Required // - The requested parameter is required. ClientError_REQUIRED ClientError = 5 // CONFLICT Conflict // - The requested resource already exists. // - The requested resource already error. ClientError_CONFLICT ClientError = 6 )
func (ClientError) Descriptor ¶
func (ClientError) Descriptor() protoreflect.EnumDescriptor
func (ClientError) Enum ¶
func (x ClientError) Enum() *ClientError
func (ClientError) EnumDescriptor
deprecated
func (ClientError) EnumDescriptor() ([]byte, []int)
Deprecated: Use ClientError.Descriptor instead.
func (ClientError) Number ¶
func (x ClientError) Number() protoreflect.EnumNumber
func (ClientError) String ¶
func (x ClientError) String() string
func (ClientError) Type ¶
func (ClientError) Type() protoreflect.EnumType
type ForbiddenError ¶
type ForbiddenError int32
const ( // ## Permission Denied // - The user does not have the necessary permissions to access the resource. ForbiddenError_FORBIDDEN ForbiddenError = 0 // ## Resource Not Open // - The requested resource is not open to the public. ForbiddenError_RESOURCE_NOT_OPEN ForbiddenError = 1 // ## Invalid Password // - The provided password is invalid. // - The user account is disabled and cannot access the resource. ForbiddenError_PASSWORD ForbiddenError = 4 // ## Permission Denied // - The user does not have the necessary permissions to access the resource. // - The member account is disabled and cannot access the resource. ForbiddenError_PERMISSION_DENIED ForbiddenError = 5 )
func (ForbiddenError) Descriptor ¶
func (ForbiddenError) Descriptor() protoreflect.EnumDescriptor
func (ForbiddenError) Enum ¶
func (x ForbiddenError) Enum() *ForbiddenError
func (ForbiddenError) EnumDescriptor
deprecated
func (ForbiddenError) EnumDescriptor() ([]byte, []int)
Deprecated: Use ForbiddenError.Descriptor instead.
func (ForbiddenError) Number ¶
func (x ForbiddenError) Number() protoreflect.EnumNumber
func (ForbiddenError) String ¶
func (x ForbiddenError) String() string
func (ForbiddenError) Type ¶
func (ForbiddenError) Type() protoreflect.EnumType
type ServerError ¶
type ServerError int32
const ( // ## Server Error // - The server encountered an unexpected error. // - The server is temporarily unavailable. ServerError_INTERNAL_SERVER ServerError = 0 // ## Invalid Argument // - The provided argument is invalid or does not meet the requirements. // - The provided argument is out of range. // - The provided argument is not supported. ServerError_INVALID_ARGUMENT ServerError = 1 )
func (ServerError) Descriptor ¶
func (ServerError) Descriptor() protoreflect.EnumDescriptor
func (ServerError) Enum ¶
func (x ServerError) Enum() *ServerError
func (ServerError) EnumDescriptor
deprecated
func (ServerError) EnumDescriptor() ([]byte, []int)
Deprecated: Use ServerError.Descriptor instead.
func (ServerError) Number ¶
func (x ServerError) Number() protoreflect.EnumNumber
func (ServerError) String ¶
func (x ServerError) String() string
func (ServerError) Type ¶
func (ServerError) Type() protoreflect.EnumType
type UnauthorizedError ¶
type UnauthorizedError int32
const ( // - The user is not authenticated or does not have the required permissions to access the resource. UnauthorizedError_UNAUTHORIZED UnauthorizedError = 0 // - The provided authentication token is invalid or does not have the required permissions. UnauthorizedError_TOKEN_INVALID UnauthorizedError = 1 // - The provided authentication token has expired. UnauthorizedError_TOKEN_EXPIRED UnauthorizedError = 2 // - The user account is disabled and cannot access the resource. UnauthorizedError_USER_FORBIDDEN UnauthorizedError = 3 // - The requested user does not exist. UnauthorizedError_USER_NOT_FOUND UnauthorizedError = 4 )
func (UnauthorizedError) Descriptor ¶
func (UnauthorizedError) Descriptor() protoreflect.EnumDescriptor
func (UnauthorizedError) Enum ¶
func (x UnauthorizedError) Enum() *UnauthorizedError
func (UnauthorizedError) EnumDescriptor
deprecated
func (UnauthorizedError) EnumDescriptor() ([]byte, []int)
Deprecated: Use UnauthorizedError.Descriptor instead.
func (UnauthorizedError) Number ¶
func (x UnauthorizedError) Number() protoreflect.EnumNumber
func (UnauthorizedError) String ¶
func (x UnauthorizedError) String() string
func (UnauthorizedError) Type ¶
func (UnauthorizedError) Type() protoreflect.EnumType