rules

package
v0.0.0-...-4ef8731 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

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

func (PersistentRuleWriter) WriteRule

func (receiver PersistentRuleWriter) WriteRule(ruleType string, matcherType string, ruleContent string, runbookId string) error

type RegexRuleCreator

type RegexRuleCreator func(string) rules.RegexMatcher

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL