zeus: github.com/daryl/zeus Index | Files

package zeus

import "github.com/daryl/zeus"

Index

Package Files

mux.go utils.go

func Var Uses

func Var(r *http.Request, n string) string

Get route variable from the current request.

func Vars Uses

func Vars(r *http.Request) map[string]string

Get route variables for the current request.

type Handler Uses

type Handler struct {
    http.HandlerFunc
    // contains filtered or unexported fields
}

Handler contains the pattern and handler func.

type Mux Uses

type Mux struct {
    NotFound http.HandlerFunc
    // contains filtered or unexported fields
}

Mux contains a map of handlers and the NotFound handler func.

func New Uses

func New() *Mux

New returns a new Mux instance.

func (*Mux) DELETE Uses

func (m *Mux) DELETE(patt string, handler http.HandlerFunc)

DELETE adds a new route for DELETE requests.

func (*Mux) GET Uses

func (m *Mux) GET(patt string, handler http.HandlerFunc)

GET adds a new route for GET requests.

func (*Mux) HEAD Uses

func (m *Mux) HEAD(patt string, handler http.HandlerFunc)

HEAD adds a new route for HEAD requests.

func (*Mux) Listen Uses

func (m *Mux) Listen(port string)

Listen is a shorthand way of doing http.ListenAndServe.

func (*Mux) OPTIONS Uses

func (m *Mux) OPTIONS(patt string, handler http.HandlerFunc)

OPTIONS adds a new route for OPTIONS requests.

func (*Mux) PATCH Uses

func (m *Mux) PATCH(patt string, handler http.HandlerFunc)

PATCH adds a new route for PATCH requests.

func (*Mux) POST Uses

func (m *Mux) POST(patt string, handler http.HandlerFunc)

POST adds a new route for POST requests.

func (*Mux) PUT Uses

func (m *Mux) PUT(patt string, handler http.HandlerFunc)

PUT adds a new route for PUT requests.

func (*Mux) ServeHTTP Uses

func (m *Mux) ServeHTTP(w http.ResponseWriter, r *http.Request)

Package zeus imports 2 packages (graph) and is imported by 10 packages. Updated 2016-09-29. Refresh now. Tools for package owners.