Documentation
¶
Index ¶
- func Bind(w http.ResponseWriter, r *http.Request, out interface{}) bool
- func GetIntParam(name string, w http.ResponseWriter, r *http.Request) (int, error)
- func QueryParams(url *url.URL) db.RetrieveQueryParams
- func Store(r *http.Request) db.Store
- func TaskPool(r *http.Request) *tasks.TaskPool
- func WriteError(w http.ResponseWriter, err error)
- func WriteJSON(w http.ResponseWriter, code int, out interface{})
- type H
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bind ¶
func Bind(w http.ResponseWriter, r *http.Request, out interface{}) bool
Bind decodes json into object
func GetIntParam ¶
GetIntParam fetches a parameter from the route variables as an integer redirects to a 404 or writes bad request state depending on error state
func QueryParams ¶
func QueryParams(url *url.URL) db.RetrieveQueryParams
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
func WriteJSON ¶
func WriteJSON(w http.ResponseWriter, code int, out interface{})
WriteJSON writes object as JSON
Types ¶
Click to show internal directories.
Click to hide internal directories.