exproute

package
v0.0.0-...-a5469ec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 29, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Expression based request router, supports functions and combinations of functions in form

<What to match><Matching verb> and || and && operators.

Index

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 (e *ExpRouter) AddLocation(expr string, l location.Location) error

func (*ExpRouter) GetLocationByExpression

func (e *ExpRouter) GetLocationByExpression(expr string) location.Location

func (*ExpRouter) GetLocationById

func (e *ExpRouter) GetLocationById(id string) location.Location

func (*ExpRouter) RemoveLocationByExpression

func (e *ExpRouter) RemoveLocationByExpression(expr string) error

func (*ExpRouter) RemoveLocationById

func (e *ExpRouter) RemoveLocationById(id string) error

func (*ExpRouter) Route

func (e *ExpRouter) Route(req request.Request) (location.Location, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL