routing

package module
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Any

func Any(uri string, controller inter.Controller) inter.RouteCollection

Register a new route responding to all methods

func Delete

func Delete(uri string, controller inter.Controller) inter.RouteCollection

Register new DELETE routes

func Get

func Get(uri string, controller inter.Controller) inter.RouteCollection

Register new GET routes

func Match

func Match(methods []string, uri string, controller inter.Controller) inter.RouteCollection

Register a new route with multiple methods

func NewRoute

func NewRoute(uri string, method string, controller inter.Controller) inter.Route

func NewRouteCollection

func NewRouteCollection() inter.RouteCollection

func Options

func Options(uri string, controller inter.Controller) inter.RouteCollection

Register new OPTIONS routes

func Patch

func Patch(uri string, controller inter.Controller) inter.RouteCollection

Register new PATCH routes

func Post

func Post(uri string, controller inter.Controller) inter.RouteCollection

Register new POST routes

func Put

func Put(uri string, controller inter.Controller) inter.RouteCollection

Register new PUT routes

Types

type Route

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

func (*Route) Controller

func (r *Route) Controller() inter.Controller

func (*Route) Method

func (r *Route) Method() string

func (*Route) Uri added in v0.1.0

func (r *Route) Uri() string

type RouteCollection

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

func (RouteCollection) All

func (c RouteCollection) All() []inter.Route

func (*RouteCollection) App

func (c *RouteCollection) App() inter.App

func (RouteCollection) Match

func (c RouteCollection) Match(request inter.Request) inter.Route

func (*RouteCollection) Merge

func (c *RouteCollection) Merge(routeCollections []inter.RouteCollection) inter.RouteCollection

func (*RouteCollection) Push

func (*RouteCollection) SetApp

func (c *RouteCollection) SetApp(app inter.App)

type UrlValues added in v0.1.0

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

func NewUrlByMultiValues added in v0.1.0

func NewUrlByMultiValues(values map[string][]string) UrlValues

func NewUrlByValues added in v0.1.0

func NewUrlByValues(values map[string]string) UrlValues

func (UrlValues) Number added in v0.1.0

func (u UrlValues) Number(key string) int

func (UrlValues) NumberE added in v0.1.0

func (u UrlValues) NumberE(key string) (int, error)

func (UrlValues) Numbers added in v0.1.0

func (u UrlValues) Numbers(key string) []int

func (UrlValues) NumbersE added in v0.1.0

func (u UrlValues) NumbersE(key string) ([]int, error)

func (UrlValues) Source added in v0.1.0

func (u UrlValues) Source() url.Values

func (UrlValues) String added in v0.1.0

func (u UrlValues) String(key string) string

func (UrlValues) StringE added in v0.1.0

func (u UrlValues) StringE(key string) (string, error)

func (UrlValues) Strings added in v0.1.0

func (u UrlValues) Strings(key string) []string

func (UrlValues) StringsE added in v0.1.0

func (u UrlValues) StringsE(key string) ([]string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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