iris/context/route.go
kataras 5ffc7911cd Add a TODO on the latest HISTORY.md entry
Also disable version updater on Iris benchmark source code files. It may runs ever faster than before if you started the benchmarks immediately after the banner  👍


Former-commit-id: a55dc1e0b658d7386229c32ba6953b1ea60f2872
2017-08-24 15:40:06 +03:00

33 lines
916 B
Go

package context
// RouteReadOnly allows decoupled access to the current route
// inside the context.
type RouteReadOnly interface {
// Name returns the route's name.
Name() string
// Method returns the route's method.
Method() string
// Subdomains returns the route's subdomain.
Subdomain() string
// Path returns the route's original registered path.
Path() string
// String returns the form of METHOD, SUBDOMAIN, TMPL PATH.
String() string
// IsOnline returns true if the route is marked as "online" (state).
IsOnline() bool
// StaticPath returns the static part of the original, registered route path.
// if /user/{id} it will return /user
// if /user/{id}/friend/{friendid:int} it will return /user too
// if /assets/{filepath:path} it will return /assets.
StaticPath() string
// ResolvePath returns the formatted path's %v replaced with the args.
ResolvePath(args ...string) string
}