Documentation ¶
Overview ¶
Package httpreply implements common replies for http requests
Index ¶
- func Alive(w http.ResponseWriter, cmaperr error) (err error)
- func CMAPError(w http.ResponseWriter, description string) (err error)
- func Created(w http.ResponseWriter, cmaperr error, content string, answer []byte) (err error)
- func Deleted(w http.ResponseWriter, cmaperr error) (err error)
- func InvalidBodyError(w http.ResponseWriter) (err error)
- func JSONMarshalError(w http.ResponseWriter) (err error)
- func JSONUnmarshalError(w http.ResponseWriter) (err error)
- func MethodNotAllowed(w http.ResponseWriter) (err error)
- func NotFoundError(w http.ResponseWriter) (err error)
- func Resource(w http.ResponseWriter, v interface{}, cmaperr error) (err error)
- func Updated(w http.ResponseWriter, cmaperr error) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Alive ¶
func Alive(w http.ResponseWriter, cmaperr error) (err error)
Alive is standard response for liveness probe
func CMAPError ¶
func CMAPError(w http.ResponseWriter, description string) (err error)
CMAPError writes standard response for cloneMAP Error
func Deleted ¶
func Deleted(w http.ResponseWriter, cmaperr error) (err error)
Deleted writes standard response for ressource deleteion
func InvalidBodyError ¶
func InvalidBodyError(w http.ResponseWriter) (err error)
InvalidBodyError writes standard response for Invalid Body Error
func JSONMarshalError ¶
func JSONMarshalError(w http.ResponseWriter) (err error)
JSONMarshalError writes standard response for JSON Marshal Error
func JSONUnmarshalError ¶
func JSONUnmarshalError(w http.ResponseWriter) (err error)
JSONUnmarshalError writes standard response for JSON Unmarshal Error
func MethodNotAllowed ¶
func MethodNotAllowed(w http.ResponseWriter) (err error)
MethodNotAllowed writes standard response if requested method is not allowed
func NotFoundError ¶
func NotFoundError(w http.ResponseWriter) (err error)
NotFoundError writes standard response for Ressource not found Error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.