Documentation ¶
Index ¶
- func AllowedContentTypes(next http.HandlerFunc, mediaTypes ...string) http.HandlerFunc
- func AllowedMethods(next http.HandlerFunc, methods ...string) http.HandlerFunc
- func DecodeCursor(encoded string) (time.Time, uuid.UUID, error)
- func EncodeCursor(t time.Time, id uuid.UUID) string
- func JsonDecodeBody(r *http.Request, dst interface{}) error
- func RenderResponse(r *http.Request, w http.ResponseWriter, statusCode int, res interface{})
- type ApiError
- type ContentType
- type XMLResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowedContentTypes ¶
func AllowedContentTypes(next http.HandlerFunc, mediaTypes ...string) http.HandlerFunc
func AllowedMethods ¶
func AllowedMethods(next http.HandlerFunc, methods ...string) http.HandlerFunc
func JsonDecodeBody ¶
func RenderResponse ¶
func RenderResponse(r *http.Request, w http.ResponseWriter, statusCode int, res interface{})
Types ¶
type ContentType ¶
type ContentType string
const ( ContentTypeJSON ContentType = "application/json" ContentTypeXML ContentType = "application/xml" )
type XMLResponse ¶
Click to show internal directories.
Click to hide internal directories.