Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Classification ¶
type Classification struct {
Masked bool
Protected bool
// VarType is "env_var" or "file".
VarType string
}
Classification holds the result of classifying a GitLab CI/CD variable.
type Classifier ¶
type Classifier struct {
// contains filtered or unexported fields
}
Classifier classifies variables using merged built-in and user rules.
func New ¶
func New(userRules Rules) *Classifier
New creates a Classifier by merging built-in rules with user-provided rules. User rules are appended to built-in rules (both patterns and excludes). All patterns are pre-normalized to uppercase for case-insensitive matching.
func NewEmpty ¶
func NewEmpty() *Classifier
NewEmpty creates a Classifier with no patterns at all (not even built-ins). Use this when auto-classification must be fully disabled.
func (*Classifier) Classify ¶
func (c *Classifier) Classify(key, value, environment string) Classification
Classify determines the classification of a variable given its key, value, and deployment environment.
Click to show internal directories.
Click to hide internal directories.