route

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RegexpRoute

type RegexpRoute struct {
	RouteRule     string
	Regexp        *regexp.Regexp
	StaticLength  int
	StaticPath    string
	ReflectType   reflect.Type
	RequestMethod map[string]bool
	Extensions    map[string]bool
	BothFuncs     map[string]bool
	ExecuteFunc   string
}

[]*RegexpRoute

type Route

type Route struct {
	Static map[string]*StaticRoute
	Regexp []*RegexpRoute
}

func NewRoute

func NewRoute() *Route

func (*Route) Exists

func (r *Route) Exists(regPath string) (exists bool)

func (*Route) Get

func (r *Route) Get(reqPath string, reqMethod string,
	extension string) ([]reflect.Value, string, reflect.Type, bool, bool, bool)

func (*Route) Rego

func (r *Route) Rego(vOriginal string, vNew string) (length int, staticPath string, regexpInstance *regexp.Regexp)

func (*Route) Set

func (r *Route) Set(route string, execFunc string,
	reqMethod map[string]bool, extensions map[string]bool,
	group map[string]bool, refType reflect.Type)

type StaticRoute

type StaticRoute struct {
	ReflectType   reflect.Type
	RequestMethod map[string]bool
	Extensions    map[string]bool
	BothFuncs     map[string]bool
	ExecuteFunc   string
}

map[string]*StaticRoute

Jump to

Keyboard shortcuts

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