Documentation ¶
Index ¶
- Constants
- func BadGatewayError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func BadRequestError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func ConflictError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func ForbiddenError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func FsErrorNormalize(err error) error
- func GeneralServerError(ctx context.Context, w http.ResponseWriter, e error)
- func GetTimeZone() *time.Location
- func HTTPError(ctx context.Context, w http.ResponseWriter, msg string, statusCode int, ...)
- func InputParameterError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func InternalServerError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func InvalidCredentialError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func InvalidInputError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func JsonClientError(ctx context.Context, w http.ResponseWriter, e *httputils.JSONClientError)
- func MissingParameterError(ctx context.Context, w http.ResponseWriter, param string)
- func NewActionNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewBadGatewayError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewBadRequestError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewClientError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewConflictError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewDuplicateIdError(resName string, resId string) *httputils.JSONClientError
- func NewDuplicateNameError(resName string, resId string) *httputils.JSONClientError
- func NewDuplicateResourceError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewForbiddenError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewGeneralError(err error) *httputils.JSONClientError
- func NewImageNotFoundError(imageId string) *httputils.JSONClientError
- func NewInputParameterError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewInsufficientResourceError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewInternalServerError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewInvalidCredentialError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewInvalidStatusError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewJsonClientError(err errors.Error, msg string, params ...interface{}) *httputils.JSONClientError
- func NewMissingParameterError(paramName string) *httputils.JSONClientError
- func NewNoProjectError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotAcceptableError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotEmptyError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotImplementedError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotSufficientPrivilegeError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewNotSupportedError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewOutOfLimitError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewOutOfQuotaError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewOutOfRangeError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewOutOfResourceError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewPaymentError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewPolicyDefinitionError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewProtectedResourceError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewRequireLicenseError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewResourceBusyError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewResourceNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewResourceNotFoundError2(keyword, id string) *httputils.JSONClientError
- func NewResourceNotReadyError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewServerError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewServerStatusError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewServiceAbnormalError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewSpecNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewTenantNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewTimeoutError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewTooLargeEntityError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewUnauthorizedError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewUnclassifiedError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewUnsupportOperationError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewUserNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
- func NewWeakPasswordError() *httputils.JSONClientError
- func NoProjectError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func NotAcceptableError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func NotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func NotImplementedError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func NotSufficientPrivilegeError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func OutOfQuotaError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func PaymentError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func ProtectedResourceError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func RegisterErrorHttpCode(err errors.Error, code int)
- func ResourceNotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func SendHTTPErrorHeader(w http.ResponseWriter, statusCode int)
- func SetHTTPRedirectLocationHeader(w http.ResponseWriter, location string)
- func SetTimeZone(tzStr string)
- func TenantNotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func TimeoutError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- func UnauthorizedError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
- type Error
Constants ¶
View Source
const ( ErrBadGateway = errors.Error("BadGateway") ErrNotImplemented = errors.ErrNotImplemented ErrInternalError = errors.Error("InternalServerError") ErrResourceNotReady = errors.Error("ResourceNotReadyError") ErrPayment = errors.Error("PaymentError") ErrImageNotFound = errors.Error("ImageNotFoundError") ErrResourceNotFound = errors.Error("ResourceNotFoundError") ErrSpecNotFound = errors.Error("SpecNotFoundError") ErrActionNotFound = errors.Error("ActionNotFoundError") ErrTenantNotFound = errors.Error("TenantNotFoundError") ErrServerStatus = errors.Error("ServerStatusError") ErrInvalidStatus = errors.ErrInvalidStatus ErrInvalidIdpStatus = errors.Error("InvalidIdpStatus") ErrInvalidFormat = errors.ErrInvalidFormat ErrInputParameter = errors.Error("InputParameterError") ErrWeakPassword = errors.Error("WeakPasswordError") ErrMissingParameter = errors.Error("MissingParameterError") ErrInsufficientResource = errors.Error("InsufficientResourceError") ErrOutOfResource = errors.Error("OutOfResource") ErrOutOfQuota = errors.Error("OutOfQuotaError") ErrOutOfRange = errors.Error("OutOfRange") ErrOutOfLimit = errors.Error("OutOfLimit") ErrNotSufficientPrivilege = errors.Error("NotSufficientPrivilegeError") ErrUnsupportedOperation = errors.Error("UnsupportOperationError") ErrNotSupported = errors.ErrNotSupported ErrNotEmpty = errors.Error("NotEmptyError") ErrBadRequest = errors.Error("BadRequestError") ErrEmptyRequest = errors.Error("EmptyRequestError") ErrInvalidCredential = errors.Error("InvalidCredentialError") ErrUnauthenticated = ErrInvalidCredential ErrForbidden = errors.Error("ForbiddenError") ErrNotFound = errors.ErrNotFound ErrNotAcceptable = errors.Error("NotAcceptableError") ErrDuplicateName = errors.Error("DuplicateNameError") ErrDuplicateResource = errors.Error("DuplicateResourceError") ErrConflict = errors.Error("ConflictError") ErrDuplicateId = errors.ErrDuplicateId ErrResourceBusy = errors.Error("ResourceBusyError") ErrRequireLicense = errors.Error("RequireLicenseError") ErrTimeout = errors.ErrTimeout ErrProtectedResource = errors.Error("ProtectedResourceError") ErrNoProject = errors.Error("NoProjectError") ErrInvalidProvider = errors.Error("InvalidProvider") ErrNoBalancePermission = errors.Error("NoBalancePermission") ErrTooLarge = errors.Error("TooLargeEntity") ErrTooManyAttempts = errors.Error("TooManyFailedAttempts") ErrTooManyRequests = errors.Error("TooManyRequests") ErrUnsupportedProtocol = errors.ErrUnsupportedProtocol ErrPolicyDefinition = errors.Error("PolicyDefinitionError") ErrUserNotFound = errors.Error("UserNotFound") ErrUserLocked = errors.Error("UserLocked") ErrUserDisabled = errors.Error("UserDisabled") ErrWrongPassword = errors.Error("WrongPassword") ErrIncorrectUsernameOrPassword = errors.Error("IncorrectUsernameOrPassword") ErrServiceAbnormal = errors.Error("ServiceAbnormal") ErrInvalidAccessKey = errors.Error("InvalidAccessKey") ErrNoPermission = errors.Error("NoPermission") )
Variables ¶
This section is empty.
Functions ¶
func BadGatewayError ¶
func BadGatewayError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func BadRequestError ¶
func BadRequestError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func ConflictError ¶
func ConflictError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func ForbiddenError ¶
func ForbiddenError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func FsErrorNormalize ¶
ErrInvalid = fs.ErrInvalid // "invalid argument"
ErrPermission = fs.ErrPermission // "permission denied" ErrExist = fs.ErrExist // "file already exists" ErrNotExist = fs.ErrNotExist // "file does not exist" ErrClosed = fs.ErrClosed // "file already closed"
ErrNoDeadline = errNoDeadline() // "file type does not support deadline" ErrDeadlineExceeded = errDeadlineExceeded() // "i/o timeout"
func GeneralServerError ¶
func GeneralServerError(ctx context.Context, w http.ResponseWriter, e error)
func GetTimeZone ¶
func InputParameterError ¶
func InputParameterError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func InternalServerError ¶
func InternalServerError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func InvalidCredentialError ¶
func InvalidCredentialError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func InvalidInputError ¶
func InvalidInputError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func JsonClientError ¶
func JsonClientError(ctx context.Context, w http.ResponseWriter, e *httputils.JSONClientError)
func MissingParameterError ¶
func MissingParameterError(ctx context.Context, w http.ResponseWriter, param string)
func NewActionNotFoundError ¶
func NewActionNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewBadGatewayError ¶
func NewBadGatewayError(msg string, params ...interface{}) *httputils.JSONClientError
func NewBadRequestError ¶
func NewBadRequestError(msg string, params ...interface{}) *httputils.JSONClientError
func NewClientError ¶
func NewClientError(msg string, params ...interface{}) *httputils.JSONClientError
func NewConflictError ¶
func NewConflictError(msg string, params ...interface{}) *httputils.JSONClientError
func NewDuplicateIdError ¶
func NewDuplicateIdError(resName string, resId string) *httputils.JSONClientError
func NewDuplicateNameError ¶
func NewDuplicateNameError(resName string, resId string) *httputils.JSONClientError
func NewDuplicateResourceError ¶
func NewDuplicateResourceError(msg string, params ...interface{}) *httputils.JSONClientError
func NewForbiddenError ¶
func NewForbiddenError(msg string, params ...interface{}) *httputils.JSONClientError
func NewGeneralError ¶
func NewGeneralError(err error) *httputils.JSONClientError
func NewImageNotFoundError ¶
func NewImageNotFoundError(imageId string) *httputils.JSONClientError
func NewInputParameterError ¶
func NewInputParameterError(msg string, params ...interface{}) *httputils.JSONClientError
func NewInsufficientResourceError ¶
func NewInsufficientResourceError(msg string, params ...interface{}) *httputils.JSONClientError
func NewInternalServerError ¶
func NewInternalServerError(msg string, params ...interface{}) *httputils.JSONClientError
func NewInvalidCredentialError ¶
func NewInvalidCredentialError(msg string, params ...interface{}) *httputils.JSONClientError
func NewInvalidStatusError ¶
func NewInvalidStatusError(msg string, params ...interface{}) *httputils.JSONClientError
func NewJsonClientError ¶
func NewJsonClientError(err errors.Error, msg string, params ...interface{}) *httputils.JSONClientError
func NewMissingParameterError ¶
func NewMissingParameterError(paramName string) *httputils.JSONClientError
func NewNoProjectError ¶
func NewNoProjectError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotAcceptableError ¶
func NewNotAcceptableError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotEmptyError ¶
func NewNotEmptyError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotFoundError ¶
func NewNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotImplementedError ¶
func NewNotImplementedError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotSufficientPrivilegeError ¶
func NewNotSufficientPrivilegeError(msg string, params ...interface{}) *httputils.JSONClientError
func NewNotSupportedError ¶
func NewNotSupportedError(msg string, params ...interface{}) *httputils.JSONClientError
func NewOutOfLimitError ¶
func NewOutOfLimitError(msg string, params ...interface{}) *httputils.JSONClientError
func NewOutOfQuotaError ¶
func NewOutOfQuotaError(msg string, params ...interface{}) *httputils.JSONClientError
func NewOutOfRangeError ¶
func NewOutOfRangeError(msg string, params ...interface{}) *httputils.JSONClientError
func NewOutOfResourceError ¶
func NewOutOfResourceError(msg string, params ...interface{}) *httputils.JSONClientError
func NewPaymentError ¶
func NewPaymentError(msg string, params ...interface{}) *httputils.JSONClientError
func NewPolicyDefinitionError ¶
func NewPolicyDefinitionError(msg string, params ...interface{}) *httputils.JSONClientError
func NewProtectedResourceError ¶
func NewProtectedResourceError(msg string, params ...interface{}) *httputils.JSONClientError
func NewRequireLicenseError ¶
func NewRequireLicenseError(msg string, params ...interface{}) *httputils.JSONClientError
func NewResourceBusyError ¶
func NewResourceBusyError(msg string, params ...interface{}) *httputils.JSONClientError
func NewResourceNotFoundError ¶
func NewResourceNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewResourceNotFoundError2 ¶
func NewResourceNotFoundError2(keyword, id string) *httputils.JSONClientError
func NewResourceNotReadyError ¶
func NewResourceNotReadyError(msg string, params ...interface{}) *httputils.JSONClientError
func NewServerError ¶
func NewServerError(msg string, params ...interface{}) *httputils.JSONClientError
func NewServerStatusError ¶
func NewServerStatusError(msg string, params ...interface{}) *httputils.JSONClientError
func NewServiceAbnormalError ¶
func NewServiceAbnormalError(msg string, params ...interface{}) *httputils.JSONClientError
func NewSpecNotFoundError ¶
func NewSpecNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewTenantNotFoundError ¶
func NewTenantNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewTimeoutError ¶
func NewTimeoutError(msg string, params ...interface{}) *httputils.JSONClientError
func NewTooLargeEntityError ¶
func NewTooLargeEntityError(msg string, params ...interface{}) *httputils.JSONClientError
func NewUnauthorizedError ¶
func NewUnauthorizedError(msg string, params ...interface{}) *httputils.JSONClientError
func NewUnclassifiedError ¶
func NewUnclassifiedError(msg string, params ...interface{}) *httputils.JSONClientError
func NewUnsupportOperationError ¶
func NewUnsupportOperationError(msg string, params ...interface{}) *httputils.JSONClientError
func NewUserNotFoundError ¶
func NewUserNotFoundError(msg string, params ...interface{}) *httputils.JSONClientError
func NewWeakPasswordError ¶
func NewWeakPasswordError() *httputils.JSONClientError
func NoProjectError ¶
func NoProjectError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func NotAcceptableError ¶
func NotAcceptableError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func NotFoundError ¶
func NotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func NotImplementedError ¶
func NotImplementedError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func NotSufficientPrivilegeError ¶
func NotSufficientPrivilegeError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func OutOfQuotaError ¶
func OutOfQuotaError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func PaymentError ¶
func PaymentError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func ProtectedResourceError ¶
func ProtectedResourceError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func RegisterErrorHttpCode ¶
func ResourceNotFoundError ¶
func ResourceNotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func SendHTTPErrorHeader ¶
func SendHTTPErrorHeader(w http.ResponseWriter, statusCode int)
func SetHTTPRedirectLocationHeader ¶
func SetHTTPRedirectLocationHeader(w http.ResponseWriter, location string)
func SetTimeZone ¶
func SetTimeZone(tzStr string)
func TenantNotFoundError ¶
func TenantNotFoundError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func TimeoutError ¶
func TimeoutError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
func UnauthorizedError ¶
func UnauthorizedError(ctx context.Context, w http.ResponseWriter, msg string, params ...interface{})
Types ¶
Click to show internal directories.
Click to hide internal directories.