Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingToken means Must provide Authorization header with format `Bearer {token}` ErrMissingToken = NewAPPError(http.StatusUnauthorized, 40100, "Must provide Authorization header with format `Bearer {token}`") // ErrAuthHeaderFormat means must provide Authorization header with format `Bearer {token}` ErrAuthHeaderFormat = NewAPPError(http.StatusUnauthorized, 40101, "Must provide Authorization header with format `Bearer {token}`") )
Functions ¶
This section is empty.
Types ¶
type APPError ¶
type APPError struct { Status int `json:"-"` Code int `json:"code"` Msg string `json:"msg"` Data interface{} `json:"data,omitempty"` }
APPError declare custom error
func NewAPPError ¶
NewAPPError new *APPError
func (*APPError) WithArgs ¶
WithArgs formats according to a format specifier and returns the resulting string.
Click to show internal directories.
Click to hide internal directories.