Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeKey = "Content-Type" ContentTypeJSONValue = "application/json" ContentTypeYAMLValue = "application/yaml" )
Variables ¶
This section is empty.
Functions ¶
func RenderJSON ¶
func RenderJSON[O any](w http.ResponseWriter, o O, opts ...Option) error
RenderJSON renders json object with returned apierrors
func RenderYAML ¶
func RenderYAML[O any](w http.ResponseWriter, o O, opts ...Option) error
Types ¶
type Option ¶
type Option func(w http.ResponseWriter, c *config)
func WithContentType ¶
func WithHeader ¶
func WithStatus ¶
Click to show internal directories.
Click to hide internal directories.