Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MethodNotAllowedHandler HandlerFunc = HandlerFunc(defaultMethodNotAllowed) NotFoundHandler HandlerFunc = HandlerFunc(defaultNotFound) PayloadWrapper Wrapper = DefaultWrapper{} PanicHandler ErrorHandler = nil ResponseHeaders []Header = defaultHeaders )
Functions ¶
This section is empty.
Types ¶
type BadRequest ¶
type BadRequest struct {
Msg string
}
func (BadRequest) Code ¶
func (s BadRequest) Code() int
func (BadRequest) Message ¶
func (s BadRequest) Message() string
type DefaultWrapper ¶
type DefaultWrapper struct{}
func (DefaultWrapper) Wrap ¶
func (w DefaultWrapper) Wrap(payload interface{}, status Status) (interface{}, int)
type ErrorHandler ¶
type ErrorHandler interface {
Handle(e interface{})
}
type HandlerFunc ¶
func (HandlerFunc) ServeHTTP ¶
func (f HandlerFunc) ServeHTTP(writer http.ResponseWriter, request *http.Request)
type InternalError ¶
type InternalError struct {
Msg string
}
func (InternalError) Code ¶
func (s InternalError) Code() int
func (InternalError) Message ¶
func (s InternalError) Message() string
type MethodNotAllowed ¶
type MethodNotAllowed struct {
Msg string
}
func (MethodNotAllowed) Code ¶
func (s MethodNotAllowed) Code() int
func (MethodNotAllowed) Message ¶
func (s MethodNotAllowed) Message() string
Click to show internal directories.
Click to hide internal directories.