filters

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const FilterClassifier = "classifier"
View Source
const FilterRegex = "regex"

Variables

This section is empty.

Functions

func ClassifierFilterConfigMeta

func ClassifierFilterConfigMeta() config.FieldGroup

func RegexFilterConfigMeta

func RegexFilterConfigMeta() config.FieldGroup

Types

type ClassifierFilter

type ClassifierFilter struct {
	// contains filtered or unexported fields
}

func NewClassifierFilter

func NewClassifierFilter(configJSON string, a *state.AgentConfig) (*ClassifierFilter, error)

func (*ClassifierFilter) Apply

func (f *ClassifierFilter) Apply(job *types.Job) (bool, error)

func (*ClassifierFilter) IsTrigger

func (f *ClassifierFilter) IsTrigger() bool

func (*ClassifierFilter) Name

func (f *ClassifierFilter) Name() string

type ClassifierFilterConfig

type ClassifierFilterConfig struct {
	Name         string `json:"name"`
	Model        string `json:"model,omitempty"`
	APIURL       string `json:"api_url,omitempty"`
	Description  string `json:"description"`
	AllowOnMatch bool   `json:"allow_on_match"`
	IsTrigger    bool   `json:"is_trigger"`
}

type RegexFilter

type RegexFilter struct {
	// contains filtered or unexported fields
}

func NewRegexFilter

func NewRegexFilter(configJSON string) (*RegexFilter, error)

func (*RegexFilter) Apply

func (f *RegexFilter) Apply(job *types.Job) (bool, error)

func (*RegexFilter) IsTrigger

func (f *RegexFilter) IsTrigger() bool

func (*RegexFilter) Name

func (f *RegexFilter) Name() string

type RegexFilterConfig

type RegexFilterConfig struct {
	Name         string `json:"name"`
	Pattern      string `json:"pattern"`
	AllowOnMatch bool   `json:"allow_on_match"`
	IsTrigger    bool   `json:"is_trigger"`
}

Jump to

Keyboard shortcuts

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