http

package
v0.0.0-...-17bc277 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultRequestHandler

func DefaultRequestHandler(logger log.Logger, store *plex.Store, cfg plex.Config) (*goji.Mux, error)

DefaultRequestHandler creates an instance of the default HTTP request handler

func Failure

func Failure(w http.ResponseWriter, err error, code int, logger log.Logger)

Failure writes an API error message to the response and logger.

func Ok

func Ok(w http.ResponseWriter, v interface{}, logger log.Logger)

Ok writes an success API message to the response

Types

type Error

type Error string

Error represents a WTF error.

func (Error) Error

func (e Error) Error() string

Error returns the error message.

type Middleware

type Middleware func(http.Handler) http.Handler

Middleware aliases the functions that take in handlers and return handlers to form a middleware stack

Jump to

Keyboard shortcuts

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