Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Injection ¶ added in v0.6.0
Injection represents parameters that can be injected into proxied requests
type Mapping ¶
type Mapping struct { Active bool `json:"active"` Before string `json:"before"` From string `json:"from"` Inject Injection `json:"injection"` MappingID string `json:"mappingID"` Origin string `json:"origin"` Proxy bool `json:"proxy"` Regexp string `json:"regexp"` Tags []string `json:"tags"` To string `json:"to"` }
Mapping represents a mapping that can be active or not
func GetMappings ¶
GetMappings get all mappings or load them if not loaded so far
func (*Mapping) GetVariables ¶ added in v0.7.0
GetVariables returns all the variables set in a mapping
func (*Mapping) Match ¶ added in v0.6.2
func (mapping *Mapping) Match(req *http.Request) *MatchResult
Match tests if the mapping matches the specific request. If it does, it will return a match result with the new path where to go. Otherwise it will return nil.
type MatchResult ¶
MatchResult stores the result for a mapping that matched a request
Click to show internal directories.
Click to hide internal directories.