encode

package
v0.0.0-...-4515e61 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2019 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Encoder

type Encoder interface {
	//Encode an interface{} to a data format.
	//Can only be called once in a request because it sets data format specific http headers
	Encode(w http.ResponseWriter, v interface{}) error
}

Encoder for api http endpoints

func NewJSONEncoder

func NewJSONEncoder() Encoder

NewJSONEncoder for JSON API endpoints

Jump to

Keyboard shortcuts

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