Versions in this module Expand all Collapse all v1 v1.0.1 Aug 15, 2024 Changes in this version + func FromGrpcError(err error) error + func ParseValidateError(err error) error + func ToGrpcError(err error) error + type AlreadyExistsError struct + Resource string + func NewAlreadyExistsError(resource string) *AlreadyExistsError + func (e *AlreadyExistsError) Error() string + func (e *AlreadyExistsError) HTTPStatus() int + func (e *AlreadyExistsError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type DatabaseError struct + Cause error + func NewDatabaseError(err error) *DatabaseError + func (e *DatabaseError) Error() string + func (e *DatabaseError) HTTPStatus() int + func (e *DatabaseError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type Error interface + type InternalServerError struct + Cause error + Message string + func NewInternalServerError(err error) *InternalServerError + func NewInternalServerErrorMessage(message string) *InternalServerError + func (e *InternalServerError) Error() string + func (e *InternalServerError) HTTPStatus() int + func (e *InternalServerError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type InvalidParameterError struct + Message string + Name string + func NewInvalidParameterError(name, message string) *InvalidParameterError + func (e *InvalidParameterError) Error() string + func (e *InvalidParameterError) HTTPStatus() int + func (e *InvalidParameterError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type MissingParameterError struct + Name string + func NewMissingParameterError(name string) *MissingParameterError + func (e *MissingParameterError) Error() string + func (e *MissingParameterError) HTTPStatus() int + func (e *MissingParameterError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type NotFoundError struct + Resource string + func NewNotFoundError(resource string) *NotFoundError + func (e *NotFoundError) Error() string + func (e *NotFoundError) HTTPStatus() int + func (e *NotFoundError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type ParameterTypeError struct + Name string + ValidType string + func NewParameterTypeError(name string) *ParameterTypeError + func (e *ParameterTypeError) Error() string + func (e *ParameterTypeError) HTTPStatus() int + func (e *ParameterTypeError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type PermissionError struct + Action string + Reason string + Resource string + func NewPermissionError(resource, action, reason string) *PermissionError + func (e *PermissionError) Error() string + func (e *PermissionError) HTTPStatus() int + func (e *PermissionError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type ServiceInvokingError struct + Cause error + Service string + func NewServiceInvokingError(service string, err error) *ServiceInvokingError + func (e *ServiceInvokingError) Error() string + func (e *ServiceInvokingError) HTTPStatus() int + func (e *ServiceInvokingError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type UnauthorizedError struct + Reason string + func NewUnauthorizedError(reason string) *UnauthorizedError + func (e *UnauthorizedError) Error() string + func (e *UnauthorizedError) HTTPStatus() int + func (e *UnauthorizedError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type UnimplementedError struct + Service string + func NewUnimplementedError(service string) *UnimplementedError + func (e *UnimplementedError) Error() string + func (e *UnimplementedError) HTTPStatus() int + func (e *UnimplementedError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string + type WarnError struct + Message string + Name string + func NewWarnError(message string) *WarnError + func (e *WarnError) Error() string + func (e *WarnError) HTTPStatus() int + func (e *WarnError) Translate(t i18n.Translator, langs i18n.LanguageCodes) string