ctrl

package
v0.0.0-...-fff7972 Latest Latest
Warning

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

Go to latest
Published: May 8, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Render = render.New()

Functions

func AuthMiddleware

func AuthMiddleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func EventMiddleware

func EventMiddleware(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)

func NewHandler

func NewHandler(mx ...Muxer) http.Handler

NewHandler returns a http.Handler by the given list.

Types

type Handle

type Handle struct {
	Pattern string
	Handler func(http.ResponseWriter, *http.Request)
	Methods []string
}

type Muxer

type Muxer interface {
	PathPrefix() string
	Handler() http.Handler
}

type Route

type Route struct {
	StrictSlash bool
	Handles     []Handle
	Middlewares []negroni.Handler
	// contains filtered or unexported fields
}

func NewRoute

func NewRoute(pathPrefix string) *Route

NewRoute returns a pointer of Route.

func (Route) Handler

func (r Route) Handler() http.Handler

Handler returns a http.Handler.

func (Route) PathPrefix

func (r Route) PathPrefix() string

PathPrefix returns the r.PathPrefix.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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