rules

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection struct {
	ByCategory map[string][]*Rule
	ByID       map[string]*Rule
	Skip       map[string]bool
}

type FileRule

type FileRule struct {
	ID         string   `yaml:"id"`
	ApplyOn    []string `yaml:"applyOn"`
	Categories []string `yaml:"categories"`
	Regex      string   `yaml:"regex"`
}

type FileRules

type FileRules struct {
	Rules []FileRule `yaml:"rules"`
}

type Rule

type Rule struct {
	ID         string
	ApplyOn    []string
	Categories []string
	Regex      *regexp.Regexp
	IsChecked  bool
}

type RuleService

type RuleService interface {
	GetCategoryRules(category models.CategoryTitle) []*Rule
}

func NewRulesService

func NewRulesService() (RuleService, error)

Jump to

Keyboard shortcuts

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