Documentation ¶
Index ¶
- Variables
- func DefaultHealthCheck() map[string]any
- func DefaultOkResponse() map[string]any
- func HealthCheck(w http.ResponseWriter, r *http.Request)
- func Json(w io.Writer, v any) error
- func NewInvalidJSONPayloadErr(err error) error
- func WriteErrorJSONResponse(w http.ResponseWriter, message any, codes ...int)
- func WriteJSONResponse(w http.ResponseWriter, v any)
- func Yaml(w io.Writer, v any) error
- type ApiError
Constants ¶
This section is empty.
Variables ¶
View Source
var (
InvalidJSONPayload = NewError("Invalid json payload", http.StatusBadRequest, 20)
)
Functions ¶
func DefaultHealthCheck ¶
func DefaultOkResponse ¶
func HealthCheck ¶
func HealthCheck(w http.ResponseWriter, r *http.Request)
func WriteErrorJSONResponse ¶
func WriteErrorJSONResponse(w http.ResponseWriter, message any, codes ...int)
func WriteJSONResponse ¶
func WriteJSONResponse(w http.ResponseWriter, v any)
Types ¶
Click to show internal directories.
Click to hide internal directories.