Documentation
¶
Index ¶
- func Any(uri string, controller inter.Controller) inter.RouteCollection
- func Delete(uri string, controller inter.Controller) inter.RouteCollection
- func Get(uri string, controller inter.Controller) inter.RouteCollection
- func Match(methods []string, uri string, controller inter.Controller) inter.RouteCollection
- func NewRoute(uri string, method string, controller inter.Controller) inter.Route
- func NewRouteCollection() inter.RouteCollection
- func Options(uri string, controller inter.Controller) inter.RouteCollection
- func Patch(uri string, controller inter.Controller) inter.RouteCollection
- func Post(uri string, controller inter.Controller) inter.RouteCollection
- func Put(uri string, controller inter.Controller) inter.RouteCollection
- type Route
- type RouteCollection
- func (c RouteCollection) All() []inter.Route
- func (c *RouteCollection) App() inter.App
- func (c RouteCollection) Match(request inter.Request) inter.Route
- func (c *RouteCollection) Merge(routeCollections []inter.RouteCollection) inter.RouteCollection
- func (c *RouteCollection) Push(route inter.Route) inter.RouteCollection
- func (c *RouteCollection) SetApp(app inter.App)
- type UrlValues
- func (u UrlValues) Number(key string) int
- func (u UrlValues) NumberE(key string) (int, error)
- func (u UrlValues) Numbers(key string) []int
- func (u UrlValues) NumbersE(key string) ([]int, error)
- func (u UrlValues) Source() url.Values
- func (u UrlValues) String(key string) string
- func (u UrlValues) StringE(key string) (string, error)
- func (u UrlValues) Strings(key string) []string
- func (u UrlValues) StringsE(key string) ([]string, error)
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 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
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) Merge ¶
func (c *RouteCollection) Merge(routeCollections []inter.RouteCollection) inter.RouteCollection
func (*RouteCollection) Push ¶
func (c *RouteCollection) Push(route inter.Route) inter.RouteCollection
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 NewUrlByValues ¶ added in v0.1.0
Click to show internal directories.
Click to hide internal directories.