Documentation
¶
Index ¶
- func DecorateRoutes(routes *RouteCollection)
- func NewRoute(url string, method string, controller inter.Controller) inter.Route
- type Route
- func (r *Route) Constraint() map[string]string
- func (r *Route) Controller() inter.Controller
- func (r *Route) Method() string
- func (r *Route) RouteOptions() inter.RouteOptions
- func (r *Route) SetConstraint(parameter string, regex string) inter.Route
- func (r *Route) SetDestination(destination string) inter.Route
- func (r *Route) SetPrefix(prefix string) inter.Route
- func (r *Route) SetStatus(status int) inter.Route
- func (r *Route) SetUrl(url string) inter.Route
- func (r *Route) Url() string
- type RouteCollection
- func Any(uri string, controller inter.Controller) *RouteCollection
- func Delete(uri string, controller inter.Controller) *RouteCollection
- func Get(uri string, controller inter.Controller) *RouteCollection
- func Group(routeCollections ...inter.RouteCollection) *RouteCollection
- func Match(methods []string, uri string, controller inter.Controller) *RouteCollection
- func NewRouteCollection(routeCollections ...inter.RouteCollection) *RouteCollection
- func Options(uri string, controller inter.Controller) *RouteCollection
- func Patch(uri string, controller inter.Controller) *RouteCollection
- func PermanentRedirect(uri string, destination string) *RouteCollection
- func Post(uri string, controller inter.Controller) *RouteCollection
- func Put(uri string, controller inter.Controller) *RouteCollection
- func Redirect(uri string, destination string, status int) *RouteCollection
- func TemporaryRedirect(uri string, destination string) *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(routeCollection inter.RouteCollection) inter.RouteCollection
- func (c *RouteCollection) Prefix(prefix string) inter.RouteCollection
- func (c *RouteCollection) Push(route inter.Route) inter.RouteCollection
- func (c *RouteCollection) SetApp(app inter.App)
- func (c *RouteCollection) Where(parameter, regex string) *RouteCollection
- func (c *RouteCollection) WhereMulti(constraints map[string]string) *RouteCollection
- type RouteOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecorateRoutes ¶
func DecorateRoutes(routes *RouteCollection)
Types ¶
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
func (*Route) Constraint ¶
func (*Route) Controller ¶
func (r *Route) Controller() inter.Controller
func (*Route) RouteOptions ¶
func (r *Route) RouteOptions() inter.RouteOptions
func (*Route) SetConstraint ¶
type RouteCollection ¶
type RouteCollection struct {
// contains filtered or unexported fields
}
func Any ¶
func Any(uri string, controller inter.Controller) *RouteCollection
Register a new route responding to all methods
func Delete ¶
func Delete(uri string, controller inter.Controller) *RouteCollection
Register new DELETE routes
func Get ¶
func Get(uri string, controller inter.Controller) *RouteCollection
Register new GET routes
func Group ¶
func Group(routeCollections ...inter.RouteCollection) *RouteCollection
func Match ¶
func Match(methods []string, uri string, controller inter.Controller) *RouteCollection
Register a new route with multiple methods
func NewRouteCollection ¶
func NewRouteCollection(routeCollections ...inter.RouteCollection) *RouteCollection
func Options ¶
func Options(uri string, controller inter.Controller) *RouteCollection
Register new OPTIONS routes
func Patch ¶
func Patch(uri string, controller inter.Controller) *RouteCollection
Register new PATCH routes
func PermanentRedirect ¶
func PermanentRedirect(uri string, destination string) *RouteCollection
Create a permanent redirect from one URI to another.
func Post ¶
func Post(uri string, controller inter.Controller) *RouteCollection
Register new POST routes
func Put ¶
func Put(uri string, controller inter.Controller) *RouteCollection
Register new PUT routes
func Redirect ¶
func Redirect(uri string, destination string, status int) *RouteCollection
Create a redirect from one URI to another.
func TemporaryRedirect ¶
func TemporaryRedirect(uri string, destination string) *RouteCollection
Create a temporary redirect from one URI to another.
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(routeCollection inter.RouteCollection) inter.RouteCollection
func (*RouteCollection) Prefix ¶
func (c *RouteCollection) Prefix(prefix string) inter.RouteCollection
func (*RouteCollection) Push ¶
func (c *RouteCollection) Push(route inter.Route) inter.RouteCollection
func (*RouteCollection) SetApp ¶
func (c *RouteCollection) SetApp(app inter.App)
func (*RouteCollection) Where ¶
func (c *RouteCollection) Where(parameter, regex string) *RouteCollection
Set a group of global where patterns on the routes.
func (*RouteCollection) WhereMulti ¶
func (c *RouteCollection) WhereMulti(constraints map[string]string) *RouteCollection
type RouteOptions ¶
type RouteOptions struct {
// contains filtered or unexported fields
}
func (RouteOptions) Constraints ¶
func (r RouteOptions) Constraints() map[string]string
func (RouteOptions) Destination ¶
func (r RouteOptions) Destination() string
func (RouteOptions) Prefixes ¶
func (r RouteOptions) Prefixes() []string
func (RouteOptions) Status ¶
func (r RouteOptions) Status() int
Click to show internal directories.
Click to hide internal directories.