Documentation ¶
Index ¶
Constants ¶
View Source
const CurrentRuleSetVersion = "1"
Variables ¶
View Source
var ( ErrURLMissing = errors.New("url property not present") ErrURLType = errors.New("bad url type") ErrStrategyType = errors.New("bad strategy type") ErrUnsupportedStrategy = errors.New("unsupported strategy") )
View Source
var ErrEmptyRuleSet = errors.New("empty rule set")
Functions ¶
func DecodeConfig ¶
Types ¶
type Matcher ¶
type Matcher struct { URL string `json:"url" yaml:"url"` Strategy string `json:"strategy" yaml:"strategy"` }
func (*Matcher) UnmarshalJSON ¶
type Rule ¶
type Rule struct { ID string `json:"id" yaml:"id"` RuleMatcher Matcher `json:"match" yaml:"match"` Upstream string `json:"upstream" yaml:"upstream"` Methods []string `json:"methods" yaml:"methods"` Execute []config.MechanismConfig `json:"execute" yaml:"execute"` ErrorHandler []config.MechanismConfig `json:"on_error" yaml:"on_error"` }
func (*Rule) DeepCopyInto ¶
Click to show internal directories.
Click to hide internal directories.