rule

package
v0.52.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2026 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RuleStorNameChosen     = "CHOSEN"
	RuleDirPathNewForAlbum = "NEW-FOR-ALBUM" // create a new directory for album files
)

Variables

This section is empty.

Functions

This section is empty.

Types

type RuleClass

type RuleClass[InputType any] interface {
	Type() RuleType
	Match(input InputType) (bool, error)
	StorageName() string
	StoragePath() string
}

type RuleFileNameRegex

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

func NewRuleFileNameRegex

func NewRuleFileNameRegex(storName, storPath, regexStr string) (*RuleFileNameRegex, error)

func (RuleFileNameRegex) Match

func (r RuleFileNameRegex) Match(input tfile.TGFile) (bool, error)

func (RuleFileNameRegex) StorageName

func (r RuleFileNameRegex) StorageName() string

func (RuleFileNameRegex) StoragePath

func (r RuleFileNameRegex) StoragePath() string

func (RuleFileNameRegex) Type

func (r RuleFileNameRegex) Type() RuleType

type RuleMediaType added in v0.26.0

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

func NewRuleMediaType added in v0.26.0

func NewRuleMediaType(storName, storPath string, matchAlbum bool) (*RuleMediaType, error)

func (RuleMediaType) Match added in v0.26.0

func (r RuleMediaType) Match(input bool) (bool, error)

func (RuleMediaType) StorageName added in v0.26.0

func (r RuleMediaType) StorageName() string

func (RuleMediaType) StoragePath added in v0.26.0

func (r RuleMediaType) StoragePath() string

func (RuleMediaType) Type added in v0.26.0

func (r RuleMediaType) Type() RuleType

type RuleMessageRegex

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

func NewRuleMessageRegex

func NewRuleMessageRegex(storName, storPath, regexStr string) (*RuleMessageRegex, error)

func (RuleMessageRegex) Match

func (r RuleMessageRegex) Match(input string) (bool, error)

func (RuleMessageRegex) StorageName

func (r RuleMessageRegex) StorageName() string

func (RuleMessageRegex) StoragePath

func (r RuleMessageRegex) StoragePath() string

func (RuleMessageRegex) Type

func (r RuleMessageRegex) Type() RuleType

type RuleType added in v0.30.0

type RuleType string
const (
	FileNameRegex RuleType = "FILENAME-REGEX"
	MessageRegex  RuleType = "MESSAGE-REGEX"
	IsAlbum       RuleType = "IS-ALBUM"
)

func Values added in v0.30.0

func Values() []RuleType

func (RuleType) String added in v0.30.0

func (r RuleType) String() string

Jump to

Keyboard shortcuts

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