handlers

package
v0.0.0-...-485d38d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckAndParseJsonCTX

func CheckAndParseJsonCTX(c context.Context, w http.ResponseWriter, r *http.Request) (context.Context, map[string]interface{}, error)

func CheckHeaderGeneric

func CheckHeaderGeneric(c context.Context, w http.ResponseWriter, r *http.Request) (string, error)

func Index

func Index(w http.ResponseWriter, r *http.Request)

Handles the '/' path and returns a random quote

func ReturnBadRequest

func ReturnBadRequest(c context.Context, w http.ResponseWriter, errorCode int64, errorString string)

func ReturnCreated

func ReturnCreated(c context.Context, w http.ResponseWriter)

func ReturnNotFound

func ReturnNotFound(c context.Context, w http.ResponseWriter)

func ReturnNotFoundWithCustomError

func ReturnNotFoundWithCustomError(c context.Context, w http.ResponseWriter, errorCode int64, errorString string)

func ReturnOK

func ReturnOK(c context.Context, w http.ResponseWriter)

func ReturnServerError

func ReturnServerError(c context.Context, w http.ResponseWriter)

func ReturnServerErrorWithCustomError

func ReturnServerErrorWithCustomError(c context.Context, w http.ResponseWriter, errorCode int64, errorString string)

func ReturnUnauthorised

func ReturnUnauthorised(c context.Context, w http.ResponseWriter, errorCode int64, e error)

func ReturnUnprocessableEntity

func ReturnUnprocessableEntity(c context.Context, w http.ResponseWriter, errorCode int64, e error)

func Serverinfo

func Serverinfo(w http.ResponseWriter, r *http.Request)

Handles the '/serverinfo' path

func ValidateParameters

func ValidateParameters(c context.Context, parameters interface{}) error

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL