Documentation ¶
Index ¶
- func ParseValidateError(err error) error
- type AlreadyExistsError
- type DatabaseError
- type Error
- type InternalServerError
- type InvalidParameterError
- type MissingParameterError
- type NotFoundError
- type ParameterTypeError
- type PermissionError
- type ServiceInvokingError
- type UnauthorizedError
- type UnimplementedError
- type WarnError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlreadyExistsError ¶
type AlreadyExistsError struct {
Resource string
}
AlreadyExistsError .
func NewAlreadyExistsError ¶
func NewAlreadyExistsError(resource string) *AlreadyExistsError
NewAlreadyExistsError .
func (*AlreadyExistsError) Error ¶
func (e *AlreadyExistsError) Error() string
func (*AlreadyExistsError) HTTPStatus ¶
func (e *AlreadyExistsError) HTTPStatus() int
func (*AlreadyExistsError) Translate ¶
func (e *AlreadyExistsError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type DatabaseError ¶
type DatabaseError struct {
Cause error
}
DatabaseError .
func (*DatabaseError) Error ¶
func (e *DatabaseError) Error() string
func (*DatabaseError) HTTPStatus ¶
func (e *DatabaseError) HTTPStatus() int
func (*DatabaseError) Translate ¶
func (e *DatabaseError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type InternalServerError ¶
InternalServerError .
func NewInternalServerError ¶
func NewInternalServerError(err error) *InternalServerError
NewInternalServerError .
func NewInternalServerErrorMessage ¶
func NewInternalServerErrorMessage(message string) *InternalServerError
func (*InternalServerError) Error ¶
func (e *InternalServerError) Error() string
func (*InternalServerError) HTTPStatus ¶
func (e *InternalServerError) HTTPStatus() int
func (*InternalServerError) Translate ¶
func (e *InternalServerError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type InvalidParameterError ¶
InvalidParameterError .
func NewInvalidParameterError ¶
func NewInvalidParameterError(name, message string) *InvalidParameterError
NewInvalidParameterError .
func (*InvalidParameterError) Error ¶
func (e *InvalidParameterError) Error() string
func (*InvalidParameterError) HTTPStatus ¶
func (e *InvalidParameterError) HTTPStatus() int
func (*InvalidParameterError) Translate ¶
func (e *InvalidParameterError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type MissingParameterError ¶
type MissingParameterError struct {
Name string
}
MissingParameterError .
func NewMissingParameterError ¶
func NewMissingParameterError(name string) *MissingParameterError
func (*MissingParameterError) Error ¶
func (e *MissingParameterError) Error() string
func (*MissingParameterError) HTTPStatus ¶
func (e *MissingParameterError) HTTPStatus() int
func (*MissingParameterError) Translate ¶
func (e *MissingParameterError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type NotFoundError ¶
type NotFoundError struct {
Resource string
}
NotFoundError .
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
func (*NotFoundError) HTTPStatus ¶
func (e *NotFoundError) HTTPStatus() int
func (*NotFoundError) Translate ¶
func (e *NotFoundError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type ParameterTypeError ¶
ParameterTypeError
func NewParameterTypeError ¶
func NewParameterTypeError(name string) *ParameterTypeError
NewParameterTypeError .
func (*ParameterTypeError) Error ¶
func (e *ParameterTypeError) Error() string
func (*ParameterTypeError) HTTPStatus ¶
func (e *ParameterTypeError) HTTPStatus() int
func (*ParameterTypeError) Translate ¶
func (e *ParameterTypeError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type PermissionError ¶
PermissionError .
func NewPermissionError ¶
func NewPermissionError(resource, action, reason string) *PermissionError
NewPermissionError .
func (*PermissionError) Error ¶
func (e *PermissionError) Error() string
func (*PermissionError) HTTPStatus ¶
func (e *PermissionError) HTTPStatus() int
func (*PermissionError) Translate ¶
func (e *PermissionError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type ServiceInvokingError ¶
ServiceInvokingError .
func NewServiceInvokingError ¶
func NewServiceInvokingError(service string, err error) *ServiceInvokingError
NewServiceInvokingError .
func (*ServiceInvokingError) Error ¶
func (e *ServiceInvokingError) Error() string
func (*ServiceInvokingError) HTTPStatus ¶
func (e *ServiceInvokingError) HTTPStatus() int
func (*ServiceInvokingError) Translate ¶
func (e *ServiceInvokingError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type UnauthorizedError ¶
type UnauthorizedError struct {
}UnauthorizedError .
func NewUnauthorizedError ¶
func NewUnauthorizedError(reason string) *UnauthorizedError
func (*UnauthorizedError) Error ¶
func (e *UnauthorizedError) Error() string
func (*UnauthorizedError) HTTPStatus ¶
func (e *UnauthorizedError) HTTPStatus() int
func (*UnauthorizedError) Translate ¶
func (e *UnauthorizedError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type UnimplementedError ¶
type UnimplementedError struct {
Service string
}
UnimplementedError .
func NewUnimplementedError ¶
func NewUnimplementedError(service string) *UnimplementedError
NewUnimplementedError .
func (*UnimplementedError) Error ¶
func (e *UnimplementedError) Error() string
func (*UnimplementedError) HTTPStatus ¶
func (e *UnimplementedError) HTTPStatus() int
func (*UnimplementedError) Translate ¶
func (e *UnimplementedError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
type WarnError ¶ added in v1.5.0
WarnError warn error
func NewWarnError ¶ added in v1.5.0
NewWarnError init warn error
func (*WarnError) HTTPStatus ¶ added in v1.5.0
func (*WarnError) Translate ¶ added in v1.5.0
func (e *WarnError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string
Click to show internal directories.
Click to hide internal directories.