Documentation ¶
Index ¶
Constants ¶
View Source
const (
DEFAULT_KEY_ERROR = "details"
)
Variables ¶
View Source
var ( AppErr = &AppError{Err: "Server error"} NotFoundErr = &NotFoundError{} PermissionDeniedErr = &PermissionDeniedError{Err: "Permission denied"} ValidErr = &ValidError{} InvalidPasswordErr = &InvalidPasswordError{} )
Functions ¶
func RestErrorResponce ¶
func RestErrorResponce(w http.ResponseWriter, restError RestError)
Types ¶
type InvalidPasswordError ¶
type InvalidPasswordError struct {
BaseError
}
====== PermissionDeniedError ======
func (*InvalidPasswordError) Error ¶
func (v *InvalidPasswordError) Error() string
func (*InvalidPasswordError) RestError ¶
func (e *InvalidPasswordError) RestError() map[string][]string
func (InvalidPasswordError) Status ¶
func (InvalidPasswordError) Status() int
type ModelInstanceError ¶
====== ModelInstanceError ======
func (*ModelInstanceError) Error ¶
func (v *ModelInstanceError) Error() string
func (*ModelInstanceError) RestError ¶
func (e *ModelInstanceError) RestError() map[string][]string
func (ModelInstanceError) Status ¶
func (ModelInstanceError) Status() int
type NotFoundError ¶
type NotFoundError struct{ BaseError }
====== NotFoundError ======
func (NotFoundError) Error ¶
func (NotFoundError) Error() string
func (*NotFoundError) RestError ¶
func (e *NotFoundError) RestError() map[string][]string
func (NotFoundError) Status ¶
func (NotFoundError) Status() int
type PermissionDeniedError ¶
====== PermissionDeniedError ======
func (*PermissionDeniedError) Error ¶
func (p *PermissionDeniedError) Error() string
func (*PermissionDeniedError) RestError ¶
func (e *PermissionDeniedError) RestError() map[string][]string
func (PermissionDeniedError) Status ¶
func (PermissionDeniedError) Status() int
type UnauthorizedError ¶
type UnauthorizedError struct {}
====== UnauthorizedError ======
func (*UnauthorizedError) Error ¶
func (p *UnauthorizedError) Error() string
func (*UnauthorizedError) RestError ¶
func (e *UnauthorizedError) RestError() map[string][]string
func (UnauthorizedError) Status ¶
func (UnauthorizedError) Status() int
type ValidError ¶
====== PermissionDeniedError ======
func (*ValidError) Error ¶
func (v *ValidError) Error() string
func (*ValidError) RestError ¶
func (e *ValidError) RestError() map[string][]string
func (ValidError) Status ¶
func (ValidError) Status() int
Click to show internal directories.
Click to hide internal directories.