imp

package
v0.0.0-...-77d0bba Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2018 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache is just an super simple example, nothing is being invalidated.

func NewCache

func NewCache() *Cache

func (*Cache) Get

func (s *Cache) Get(key string) (interface{}, bool)

func (*Cache) Set

func (s *Cache) Set(key string, value interface{}, timeout time.Duration) error

type ContentNegotiationBinder

type ContentNegotiationBinder struct {
	JSONBinder       JSONBinder
	XMLBinder        XMLBinder
	ParametersBinder ParametersBinder
}

func (ContentNegotiationBinder) Bind

func (c ContentNegotiationBinder) Bind(r *http.Request, dst interface{}) error

type ContentNegotiationRenderer

type ContentNegotiationRenderer struct {
	JSONRenderer JSON
	XMLRenderer  XML
	TextRenderer Text
}

func (ContentNegotiationRenderer) Render

func (c ContentNegotiationRenderer) Render(w http.ResponseWriter, r *http.Request, status int, i interface{}) error

type JSON

type JSON struct{}

func (JSON) Render

func (JSON) Render(w http.ResponseWriter, r *http.Request, status int, i interface{}) error

type JSONBinder

type JSONBinder struct{}

func (JSONBinder) Bind

func (JSONBinder) Bind(r *http.Request, dst interface{}) error

type Parameters

type Parameters struct{}

func (Parameters) ByName

func (p Parameters) ByName(r *http.Request, key string) string

type ParametersBinder

type ParametersBinder struct{}

func (ParametersBinder) Bind

func (ParametersBinder) Bind(r *http.Request, dst interface{}) error

type Text

type Text struct{}

func (Text) Render

func (Text) Render(w http.ResponseWriter, r *http.Request, status int, i interface{}) error

type Validator

type Validator struct{}

func (Validator) Validate

func (Validator) Validate(v validator.Validatable) (bool, error)

type XML

type XML struct{}

func (XML) Render

func (XML) Render(w http.ResponseWriter, r *http.Request, status int, i interface{}) error

type XMLBinder

type XMLBinder struct{}

func (XMLBinder) Bind

func (XMLBinder) Bind(r *http.Request, dst interface{}) error

Jump to

Keyboard shortcuts

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