Documentation
¶
Index ¶
- func NotEmpty(err error, skips ...int) bool
- func SetNotEmptyExit(t bool)
- func SetTrack(t bool)
- type Error
- func BadRequest(message string) *Error
- func Conflict(message string) *Error
- func Forbidden(message string) *Error
- func InternalError(message string) *Error
- func New(status int, message string) *Error
- func NotAllowed(message string) *Error
- func NotFound(message string) *Error
- func OK(message string) *Error
- func Unauthorized(message string) *Error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetNotEmptyExit ¶ added in v0.0.12
func SetNotEmptyExit(t bool)
Types ¶
type Error ¶
type Error struct {
Status int `json:"status"`
Error string `json:"error"`
Code string `json:"code,omitempty"`
Message string `json:"message,omitempty"`
Timestamp string `json:"ts"`
TraceId string `json:"tid"`
}
func BadRequest ¶
func InternalError ¶
func NotAllowed ¶
func Unauthorized ¶
Click to show internal directories.
Click to hide internal directories.