mirror of
https://github.com/kataras/iris.git
synced 2026-01-08 20:41:57 +00:00
Give read access to the current route, a feature that many of you asked for
Former-commit-id: 39295ac1331ee08d3047c84f5c8ea152bce96781
This commit is contained in:
18
context/route.go
Normal file
18
context/route.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package context
|
||||
|
||||
// RouteReadOnly allows decoupled access to the current route
|
||||
// inside the context.
|
||||
type RouteReadOnly interface {
|
||||
// Name returns the route's name.
|
||||
Name() string
|
||||
// String returns the form of METHOD, SUBDOMAIN, TMPL PATH.
|
||||
String() string
|
||||
// Path returns the route's original registered path.
|
||||
Path() string
|
||||
|
||||
// IsOnline returns true if the route is marked as "online" (state).
|
||||
IsOnline() bool
|
||||
|
||||
// ResolvePath returns the formatted path's %v replaced with the args.
|
||||
ResolvePath(args ...string) string
|
||||
}
|
||||
Reference in New Issue
Block a user