router

package
v0.0.0-...-6945508 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2016 License: MIT Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(routes Routes) *mux.Router

NewRouter creates a gorilla/mux router from a list of Route structures.

Types

type Route

type Route struct {
	Name        string
	Method      []string
	Pattern     string
	HandlerFunc http.HandlerFunc
	Queries     []string
	Protected   bool
}

Route structure contains information about a route and a reference to a handler.

type Routes

type Routes struct {
	BasePattern string
	Routes      []Route
}

Routes is a collection of Route structures.

Jump to

Keyboard shortcuts

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