Documentation ¶
Overview ¶
Expression based request router, supports functions and combinations of functions in form
<What to match><Matching verb> and || and && operators.
Index ¶
- Constants
- type ExpRouter
- func (e *ExpRouter) AddLocation(expr string, l location.Location) error
- func (e *ExpRouter) GetLocationByExpression(expr string) location.Location
- func (e *ExpRouter) GetLocationById(id string) location.Location
- func (e *ExpRouter) RemoveLocationByExpression(expr string) error
- func (e *ExpRouter) RemoveLocationById(id string) error
- func (e *ExpRouter) Route(req request.Request) (location.Location, error)
Constants ¶
View Source
const ( TrieRouteFn = "TrieRoute" RegexpRouteFn = "RegexpRoute" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ExpRouter ¶
type ExpRouter struct {
// contains filtered or unexported fields
}
func NewExpRouter ¶
func NewExpRouter() *ExpRouter
func (*ExpRouter) AddLocation ¶
func (*ExpRouter) GetLocationByExpression ¶
func (*ExpRouter) GetLocationById ¶
func (*ExpRouter) RemoveLocationByExpression ¶
func (*ExpRouter) RemoveLocationById ¶
Click to show internal directories.
Click to hide internal directories.