rule

package
v0.5.0-beta Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Filter

func Filter(filter types.Rule, entry *types.Metadata, ed *types.ExtendData, label *types.Labels) bool

func Get

func Get(columnKey string, o map[string]interface{}) string

func InitQuery

func InitQuery(entryStore metastore.DEntry)

Types

type After

type After struct {
	ColumnKey string
	Time      *time.Time
}

func (After) Apply

func (a After) Apply(value map[string]interface{}) bool

type AlwaysFalse

type AlwaysFalse struct{}

func (AlwaysFalse) Apply

func (a AlwaysFalse) Apply(value map[string]interface{}) bool

type Before

type Before struct {
	ColumnKey string
	Time      *time.Time
}

func (Before) Apply

func (b Before) Apply(value map[string]interface{}) bool

type BeginWith

type BeginWith struct {
	ColumnKey string
	Content   string
}

func (BeginWith) Apply

func (b BeginWith) Apply(value map[string]interface{}) bool

type EndWith

type EndWith struct {
	ColumnKey string
	Content   string
}

func (EndWith) Apply

func (b EndWith) Apply(value map[string]interface{}) bool

type Equal

type Equal struct {
	ColumnKey string
	Content   string
}

func (Equal) Apply

func (m Equal) Apply(value map[string]interface{}) bool

type In

type In struct {
	ColumnKey string
	Content   []string
}

func (In) Apply

func (i In) Apply(value map[string]interface{}) bool

type Operation

type Operation interface {
	Apply(value map[string]interface{}) bool
}

func NewRuleOperation

func NewRuleOperation(opType, col, val string) Operation

type Pattern

type Pattern struct {
	ColumnKey string
	Content   string
}

func (Pattern) Apply

func (p Pattern) Apply(value map[string]interface{}) bool

type Query

type Query interface {
	Reset() Query
	Rule(rule types.Rule) Query
	Label(label types.LabelMatch) Query
	Results(ctx context.Context) ([]*types.Metadata, error)
}

func Q

func Q() Query

Jump to

Keyboard shortcuts

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