response

package
v0.0.0-...-f0f63f4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Output

type Output struct{}

Output is the response object.

func New

func New() *Output

New returns a new response object.

func (*Output) Created

func (o *Output) Created(w http.ResponseWriter, recordID string) (int, error)

Created will output a creation response to the writer.

func (*Output) JSON

func (o *Output) JSON(w http.ResponseWriter, body interface{}) (int, error)

JSON will output JSON to the writer.

func (*Output) OK

func (o *Output) OK(w http.ResponseWriter, message string) (int, error)

OK will write an OK status to the writer.

Jump to

Keyboard shortcuts

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