Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DynamicMapping ¶
type DynamicMapping struct {
Active bool `json:"active"`
From string `json:"from"`
Inject Injection `json:"injection"`
MappingID string `json:"mappingID"`
Origin string `json:"origin"`
Proxy bool `json:"proxy"`
Regexp string `json:"regexp"`
To string `json:"to"`
}
DynamicMapping represents a mapping that can be active or not
func GetMappings ¶
func GetMappings() ([]DynamicMapping, error)
GetMappings get all mappings or load them if not loaded so far
func (*DynamicMapping) Match ¶
func (mapping *DynamicMapping) Match(req *http.Request) *MatchResult
Match tests if the mapping matches the specific request. If it does, it will return a match result, otherwise it will return nil.
func (*DynamicMapping) Validate ¶ added in v0.6.0
func (mapping *DynamicMapping) Validate() error
Validate makes sure that the a mapping is correctly setup
type Injection ¶ added in v0.6.0
Injection represents parameters that can be injected into proxied requests
type Mapping ¶
type Mapping struct {
From string `json:"from"`
Inject Injection `json:"inject"`
MappingID string `json:"mappingID"`
Origin string `json:"origin"`
Proxy bool `json:"proxy"`
Regexp string `json:"regexp"`
To string `json:"to"`
}
Mapping represents a mapping configuration loaded from some file.
type MatchResult ¶
type MatchResult struct {
Mapping DynamicMapping
NewPath string
Parts []string
}
MatchResult stores the result for a mapping that matched a request
Click to show internal directories.
Click to hide internal directories.