Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMethodNotAllowed : ErrMethodNotAllowed = errors.New(errMethodNotAllowed) // ErraqueductServerError : ErraqueductServerError = errors.New(erraqueductServerError) // ErrBadRequest : ErrBadRequest = errors.New(errBadRequest) // ErrNotAuthorized : ErrNotAuthorized = errors.New(errNotAuthorized) // ErrNotImplemented : ErrNotImplemented = errors.New(errNotImplemented) )
Functions ¶
This section is empty.
Types ¶
type BaseHandlerAdapter ¶
type BaseHandlerAdapter struct {
httprouter.Router
}
BaseHandlerAdapter :
func (*BaseHandlerAdapter) RegisterHandlerFunc ¶
func (a *BaseHandlerAdapter) RegisterHandlerFunc(method string, path string, handler HandlerFunc, middleware ...Middleware)
RegisterHandlerFunc :
type HandlerFunc ¶
HandlerFunc is a custom HTTP handler function that returns a struct and an error that will be encoded and returned to the client
type Request ¶
type Request struct { *http.Request // Params contains a map of the URL parameters, with keys obtained from the route path Params map[string]string }
Request is a wrapper that extends http.Request with convenience attributes
type Response ¶
type Response struct {
http.ResponseWriter
}
Response is simply a wrapper around the http.ResponseWritter func
type ServerConfig ¶
type ServerConfig struct { // Server bind address in the form host:port BindAddress string // Handlers contains a mapping of paths to http.Handler structs Handlers map[string]HandlerAdapter // Logger Logger log.Logger }
ServerConfig :
Click to show internal directories.
Click to hide internal directories.