expression

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2026 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TagModeAdd    = "add"
	TagModeRemove = "remove"
	TagModeFull   = "full"
)

Variables

This section is empty.

Functions

func CheckTorrentAllMatch

func CheckTorrentAllMatch(ctx context.Context, t *config.Torrent, expressions []CompiledExpression) (bool, error)

func CheckTorrentAllMatchWithReason added in v1.14.0

func CheckTorrentAllMatchWithReason(ctx context.Context, t *config.Torrent, expressions []CompiledExpression) (bool, []string, error)

func CheckTorrentSingleMatch

func CheckTorrentSingleMatch(ctx context.Context, t *config.Torrent, expressions []CompiledExpression) (bool, error)

func CheckTorrentSingleMatchWithReason added in v1.14.0

func CheckTorrentSingleMatchWithReason(ctx context.Context, t *config.Torrent, expressions []CompiledExpression) (bool, string, error)

Types

type CompiledExpression added in v1.14.0

type CompiledExpression struct {
	Program *vm.Program
	Text    string
}

type Expressions

type Expressions struct {
	Ignores []CompiledExpression
	Removes []CompiledExpression
	Pauses  []CompiledExpression
	Labels  []*LabelExpression
	Tags    []*TagExpression
}

func Compile

func Compile(filter *config.FilterConfiguration) (*Expressions, error)

type LabelExpression

type LabelExpression struct {
	Name    string
	Updates []CompiledExpression
}

type TagExpression

type TagExpression struct {
	Name     string
	Mode     string
	UploadKb *int
	Updates  []CompiledExpression
}

Jump to

Keyboard shortcuts

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