Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadInput ¶
ReadInput reads the JSON-encoded value from request and stores it in the value pointed to by value.
func WriteErrorMsg ¶
WriteErrorMsg writes an error message to the http.ResponseWriter
func WriteSuccess ¶
func WriteSuccess(w http.ResponseWriter, logger *zerolog.Logger, statusCode int, result interface{})
WriteSuccess writes a success result to the http.ResponseWriter
Types ¶
type ErrorOutput ¶
type ErrorOutput struct { Code int `json:"code"` Message string `json:"message" example:"something wrong happened"` }
ErrorOutput represents the output data in case of error.
Click to show internal directories.
Click to hide internal directories.