Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowedLabels ¶
type AllowedLabels struct {
// contains filtered or unexported fields
}
AllowedLabels allows labels to be validated against a set of allowed labels. The zero value is ready to use and denies all labels.
func (*AllowedLabels) Add ¶
func (l *AllowedLabels) Add(key, value string) error
Add adds a new allowed label. The key and value are anchored regular expressions. An error is returned if the regular expressions are invalid or the key is empty.
func (*AllowedLabels) String ¶
func (l *AllowedLabels) String() string
func (*AllowedLabels) Validate ¶
func (l *AllowedLabels) Validate(lbls map[string]string) error
Validate validates all labels against the allowed labels.
func (*AllowedLabels) ValidateLabel ¶
func (l *AllowedLabels) ValidateLabel(key, value string) error
ValidateLabel validates a single label against the allowed labels.
Click to show internal directories.
Click to hide internal directories.