Documentation
¶
Overview ¶
Package filterprocessor docs
Index ¶
Constants ¶
View Source
const PluginName = "filter_processor"
PluginName to use when configuring.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // <code>search-inner</code> configures the filter processor to recursively search inner transactions for expressions. SearchInner bool `yaml:"search-inner"` // <code>omit-group-transactions</code> configures the filter processor to return the matched transaction without its grouped transactions. OmitGroupTransactions bool `yaml:"omit-group-transactions"` /* <code>filters</code> are a list of SubConfig objects with an operation acting as the string key in the map filters: - [any,all,none]: expression: "" expression-type: "" tag: "" */ Filters []map[string][]SubConfig `yaml:"filters"` }
Config configuration for the filter processor
type FilterProcessor ¶
type FilterProcessor struct { FieldFilters []fields.Filter // contains filtered or unexported fields }
FilterProcessor filters transactions by a variety of means
func (*FilterProcessor) Close ¶
func (a *FilterProcessor) Close() error
Close a no-op for this processor
func (*FilterProcessor) Init ¶
func (a *FilterProcessor) Init(ctx context.Context, _ data.InitProvider, cfg plugins.PluginConfig, logger *log.Logger) error
Init initializes the filter processor
func (*FilterProcessor) Metadata ¶
func (a *FilterProcessor) Metadata() plugins.Metadata
Metadata returns metadata
type SubConfig ¶
type SubConfig struct { /* <code>tag</code> is the tag of the struct to analyze.<br/> It can be of the form `txn.*` where the specific ending is determined by the field you wish to filter on.<br/> It can also be a field in the ApplyData. */ FilterTag string `yaml:"tag"` /* <code>expression-type</code> is the type of comparison applied between the field, identified by the tag, and the expression.<br/> <ul> <li>regex</li> <li>less-than</li> <li>less-than-equal</li> <li>greater-than</li> <li>great-than-equal</li> <li>equal</li> <li>not-equal</li> </ul> */ ExpressionType expression.Type `yaml:"expression-type"` // <code>expression</code> is the user-supplied part of the search or comparison. Expression string `yaml:"expression"` }
SubConfig is the configuration needed for each additional filter
Click to show internal directories.
Click to hide internal directories.