Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Rule ¶
type Rule struct { ID int64 Service string Priority int64 MatcherRegex []*regexp.Regexp IdentityRegex *regexp.Regexp Template template.Template TemplateBytes []byte Timeout time.Duration ResponseStatus int IsReadOnly bool }
Rule describes rules how to mock requests
type Rules ¶
type Rules []Rule
Rules is collection type for Rule structures
func ConvertRules ¶
func ConvertRules(rules config.RuleConfigs) (Rules, error)
ConvertRules converts config to rules domain object
func (Rules) MatchRegex ¶
MatchRegex returns first rule matching its regex
func (Rules) MatchService ¶
MatchService returns slice of Rules matching given service name
Click to show internal directories.
Click to hide internal directories.