Documentation ¶
Overview ¶
Package validator provides functions to validate labels, annotations, namespaces and configmap/secret keys using apimachinery functions.
Index ¶
- type KustValidator
- func (v *KustValidator) ErrIfInvalidKey(k string) error
- func (v *KustValidator) IsEnvVarName(k string) error
- func (v *KustValidator) MakeAnnotationNameValidator() func([]string) error
- func (v *KustValidator) MakeAnnotationValidator() func(map[string]string) error
- func (v *KustValidator) MakeLabelNameValidator() func([]string) error
- func (v *KustValidator) MakeLabelValidator() func(map[string]string) error
- func (v *KustValidator) ValidateNamespace(s string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KustValidator ¶
type KustValidator struct{}
KustValidator validates Labels and annotations by apimachinery
func NewKustValidator ¶
func NewKustValidator() *KustValidator
NewKustValidator returns a KustValidator object
func (*KustValidator) ErrIfInvalidKey ¶
func (v *KustValidator) ErrIfInvalidKey(k string) error
func (*KustValidator) IsEnvVarName ¶
func (v *KustValidator) IsEnvVarName(k string) error
func (*KustValidator) MakeAnnotationNameValidator ¶
func (v *KustValidator) MakeAnnotationNameValidator() func([]string) error
MakeAnnotationNameValidator returns a MapValidatorFunc using apimachinery.
func (*KustValidator) MakeAnnotationValidator ¶
func (v *KustValidator) MakeAnnotationValidator() func(map[string]string) error
MakeAnnotationValidator returns a MapValidatorFunc using apimachinery.
func (*KustValidator) MakeLabelNameValidator ¶
func (v *KustValidator) MakeLabelNameValidator() func([]string) error
MakeLabelNameValidator returns a ArrayValidatorFunc using apimachinery.
func (*KustValidator) MakeLabelValidator ¶
func (v *KustValidator) MakeLabelValidator() func(map[string]string) error
MakeLabelValidator returns a MapValidatorFunc using apimachinery.
func (*KustValidator) ValidateNamespace ¶
func (v *KustValidator) ValidateNamespace(s string) []string
ValidateNamespace validates a string is a valid namespace using apimachinery.
Click to show internal directories.
Click to hide internal directories.