Documentation
¶
Overview ¶
Code generated by "string-enumer -t Match -o match_enumer___generated.go ."; DO NOT EDIT.
Code generated by "string-enumer -t Type -o type_enumer___generated.go ."; DO NOT EDIT.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hint ¶
type Hint struct {
// Pattern to match against the asset's name.
Pattern string `single:"true"`
// Weight used to adjust the score for non-mandatory hints.
Weight unmarshal.Templatable[int]
// Type determines the engine used to match the pattern.
Type Type `validate:"oneof=glob regex globstar startswith endswith contains"`
// Match indicates the type of match.
Match unmarshal.Templatable[Match]
}
Hint represents a pattern used to match asset names. It can be a regular expression or a simple string pattern.
type Hints ¶
type Hints unmarshal.SingleOrSliceType[Hint]
Hints represents a collection of Hint objects used to evaluate asset matches.
type Match ¶
type Match string
Match represents different matching strategies for hints.
func MatchValues ¶
func MatchValues() []Match
MatchValues returns a list of all (valid) Match values
type Type ¶
type Type string
Type represents different pattern matching types for hints.
const ( // Glob indicates that the hint is a glob pattern. Glob Type = "glob" // Regex indicates that the hint is a regular expression. Regex Type = "regex" // GlobStar indicates that the hint is a globstar pattern. GlobStar Type = "globstar" // StartsWith indicates that the hint is a startswith pattern. StartsWith Type = "startswith" // EndsWith indicates that the hint is an endswith pattern. EndsWith Type = "endswith" // Contains indicates that the hint is a contains pattern. Contains Type = "contains" )
Click to show internal directories.
Click to hide internal directories.