iris/context/route.go
kataras 8b3c44b0a3 Give read access to the current route, a feature that many of you asked for
Former-commit-id: 39295ac1331ee08d3047c84f5c8ea152bce96781
2017-08-23 16:46:55 +03:00

19 lines
530 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
// 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
}