app

package
v0.0.0-...-be21ac7 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2015 License: MIT Imports: 3 Imported by: 0

README

app

Tiny wrapper around "pat" and "alice".

View the docs.

Examples

License

MIT

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

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

App builder.

func New

func New() *App

New application.

func (*App) Del

func (a *App) Del(path string, h interface{})

Del will register a pattern with a handler for DELETE requests.

func (*App) Get

func (a *App) Get(path string, h interface{})

Get will register a pattern with a handler for GET requests. The handler given is also registered for HEAD requests.

func (*App) Head

func (a *App) Head(path string, h interface{})

Head will register a pattern with a handler for HEAD requests.

func (*App) Listen

func (a *App) Listen(addr string) error

Listen on `addr`.

func (*App) Options

func (a *App) Options(path string, h interface{})

Options will register a pattern with a handler for OPTIONS requests.

func (*App) Post

func (a *App) Post(path string, h interface{})

Post will register a pattern with a handler for POST requests.

func (*App) Put

func (a *App) Put(path string, h interface{})

Put will register a pattern with a handler for PUT requests.

func (*App) ServeHTTP

func (a *App) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements http.Handler

func (*App) Use

func (a *App) Use(mw ...alice.Constructor)

Use the given middleware.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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