render

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContentTypePlainText = iota
	ContentTypeHTML
	ContentTypeJSON
	ContentTypeEventStream
	ContentTypeXML
)

Variables

This section is empty.

Functions

func Bind

func Bind(r io.Reader, v interface{}) error

Bind is a short-hand method for decoding a JSON request body.

func HTML

func HTML(w http.ResponseWriter, status int, v string)

func JSON

func JSON(w http.ResponseWriter, status int, v interface{})

func Noop

func Noop(w http.ResponseWriter)

func ParseContentType

func ParseContentType(next chi.Handler) chi.Handler

func Respond

func Respond(w http.ResponseWriter, status int, v interface{})

func String

func String(w http.ResponseWriter, status int, v string)

func XML

func XML(w http.ResponseWriter, status int, v interface{})

Types

type ContentType

type ContentType int

A ContentType is an enumeration of HTTP content types.

Jump to

Keyboard shortcuts

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