render

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 14, 2021 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypeUnknown = iota
	ContentTypeHTML
	ContentTypeJSON
	ContentTypeM3U
)

ContentTypes handled by this package.

View Source
const ParamContentType = "ContentType"

Variables

This section is empty.

Functions

func HTML

func HTML(w http.ResponseWriter, r *http.Request, list *playlist.PlayList)

func ListContentType

func ListContentType(next http.Handler) http.Handler

func M3U

func M3U(w http.ResponseWriter, r *http.Request, list *playlist.PlayList)

func Responder

func Responder(w http.ResponseWriter, r *http.Request, v interface{})

func SetListResponder

func SetListResponder(next http.Handler) http.Handler

SetListResponder is a middleware that switches default chi responder to list responder.

Types

type ContentType

type ContentType int

ContentType is an enumeration of common HTTP content types.

func GetAcceptedContentType

func GetAcceptedContentType(r *http.Request) ContentType

func GetContentType

func GetContentType(s string) ContentType

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL