utils

package
v0.0.0-...-8b1022e Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2016 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RespondBadGateway

func RespondBadGateway(w io.Writer, req *http.Request, msgs ...interface{})

func RespondOK

func RespondOK(writer io.Writer, req *http.Request) error

Types

type ErrorHandler

type ErrorHandler interface {
	ServeHTTP(w http.ResponseWriter, req *http.Request, err error)
}
var (
	DefaultHandler ErrorHandler = &StdHandler{}
)

type ErrorHandlerFunc

type ErrorHandlerFunc func(http.ResponseWriter, *http.Request, error)

func (ErrorHandlerFunc) ServeHTTP

func (f ErrorHandlerFunc) ServeHTTP(w http.ResponseWriter, r *http.Request, err error)

ServeHTTP calls f(w, r).

type StdHandler

type StdHandler struct {
}

func (*StdHandler) ServeHTTP

func (e *StdHandler) ServeHTTP(w http.ResponseWriter, req *http.Request, err error)

Jump to

Keyboard shortcuts

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