Documentation ¶
Index ¶
- func LoadPriorityRuleConfigFromMongodb(client *mongodb.MongoClient) (*rules.PriorityMatcherConfig, error)
- type ContainsRuleCreator
- type ExactRuleCreator
- type PersistentRuleReader
- func (p PersistentRuleReader) FindOneRule(ruleType string, matcherType string, ruleContent string) (*model.RuleEntity, error)
- func (p PersistentRuleReader) FindRule(ruleType string, matcherType string) (*[]model.RuleEntity, error)
- func (p PersistentRuleReader) ListRules() (*[]model.RuleEntity, error)
- func (p PersistentRuleReader) ReadContainsMatchers(ruleType string, ruleCreator ContainsRuleCreator) (*map[string]rules.ContainsMatcher, error)
- func (p PersistentRuleReader) ReadEqualsMatchers(ruleType string, ruleCreator ExactRuleCreator) (*map[string]rules.EqualsMatcher, error)
- func (p PersistentRuleReader) ReadRegexMatchers(ruleType string, ruleCreator RegexRuleCreator) (*map[string]rules.RegexMatcher, error)
- type PersistentRuleWriter
- type RegexRuleCreator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadPriorityRuleConfigFromMongodb ¶
func LoadPriorityRuleConfigFromMongodb(client *mongodb.MongoClient) (*rules.PriorityMatcherConfig, error)
Types ¶
type ContainsRuleCreator ¶
type ContainsRuleCreator func(string) rules.ContainsMatcher
type ExactRuleCreator ¶
type ExactRuleCreator func(string) rules.EqualsMatcher
type PersistentRuleReader ¶
type PersistentRuleReader struct {
Mongo *mongodb.MongoClient
}
func (PersistentRuleReader) FindOneRule ¶
func (p PersistentRuleReader) FindOneRule(ruleType string, matcherType string, ruleContent string) (*model.RuleEntity, error)
func (PersistentRuleReader) FindRule ¶
func (p PersistentRuleReader) FindRule(ruleType string, matcherType string) (*[]model.RuleEntity, error)
func (PersistentRuleReader) ListRules ¶
func (p PersistentRuleReader) ListRules() (*[]model.RuleEntity, error)
func (PersistentRuleReader) ReadContainsMatchers ¶
func (p PersistentRuleReader) ReadContainsMatchers(ruleType string, ruleCreator ContainsRuleCreator) (*map[string]rules.ContainsMatcher, error)
func (PersistentRuleReader) ReadEqualsMatchers ¶
func (p PersistentRuleReader) ReadEqualsMatchers(ruleType string, ruleCreator ExactRuleCreator) (*map[string]rules.EqualsMatcher, error)
func (PersistentRuleReader) ReadRegexMatchers ¶
func (p PersistentRuleReader) ReadRegexMatchers(ruleType string, ruleCreator RegexRuleCreator) (*map[string]rules.RegexMatcher, error)
type PersistentRuleWriter ¶
type PersistentRuleWriter struct {
Mongo *mongodb.MongoClient
}
func (PersistentRuleWriter) DeleteRule ¶
func (receiver PersistentRuleWriter) DeleteRule(ruleId string) error
type RegexRuleCreator ¶
type RegexRuleCreator func(string) rules.RegexMatcher
Click to show internal directories.
Click to hide internal directories.