mod_tag

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2026 License: Apache-2.0 Imports: 14 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ModTag = "mod_tag"
)

Variables

This section is empty.

Functions

func TagRuleCheck

func TagRuleCheck(tagRuleFile *TagRuleFile) error

Types

type ConfModTag

type ConfModTag struct {
	Basic struct {
		DataPath string // path of rule data
	}

	Log struct {
		OpenDebug bool
	}
}

func ConfLoad

func ConfLoad(filePath string, confRoot string) (*ConfModTag, error)

func (*ConfModTag) Check

func (cfg *ConfModTag) Check(confRoot string) error

type ModuleTag

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

func NewModuleTag

func NewModuleTag() *ModuleTag

func (*ModuleTag) Init

func (*ModuleTag) Name

func (m *ModuleTag) Name() string

type ProductRuleList

type ProductRuleList map[string]TagRuleList // product => list of tag rule list

type ProductRuleRawList

type ProductRuleRawList map[string]RuleRawList // product => raw rule list

type RuleRawList

type RuleRawList []TagRuleRaw

type TagParam

type TagParam struct {
	TagName  string `json:"TagName"`
	TagValue string `json:"TagValue"`
}

type TagRule

type TagRule struct {
	Cond  condition.Condition
	Param TagParam
	Last  bool // if true, not to check the next rule in the list if the condition is satisfied
}

type TagRuleConf

type TagRuleConf struct {
	Version string          // version
	Config  ProductRuleList // product -> rule list
}

func TagRuleFileLoad

func TagRuleFileLoad(filename string) (*TagRuleConf, error)

type TagRuleFile

type TagRuleFile struct {
	Version string             // version
	Config  ProductRuleRawList // product -> raw rule list
}

type TagRuleList

type TagRuleList []TagRule

type TagRuleRaw

type TagRuleRaw struct {
	Cond  string   // condition
	Param TagParam // tag param
	Last  bool     // if true, not to check the next rule in the list if the condition is satisfied
}

type TagRuleTable

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

func NewTagRuleTable

func NewTagRuleTable() *TagRuleTable

func (*TagRuleTable) Search

func (t *TagRuleTable) Search(product string) (TagRuleList, bool)

func (*TagRuleTable) Update

func (t *TagRuleTable) Update(ruleConf *TagRuleConf)

Jump to

Keyboard shortcuts

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