render

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2023 License: GPL-3.0 Imports: 12 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 ContentTypeFromString added in v1.0.1

func ContentTypeFromString(s string) ContentType

func GetAcceptedContentType

func GetAcceptedContentType(r *http.Request) ContentType

Jump to

Keyboard shortcuts

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