Documentation ¶
Index ¶
- func NewSortedSet() *sortedSet
- func ValidateConfigMapKey(key string) error
- func ValidateEnvVarName(name string) error
- func ValidateFunctionName(name string) error
- func ValidateLabelKey(key string) error
- func ValidateLabelValue(value string) error
- func ValidateSecretKey(key string) error
- type ErrInvalidConfigMapKey
- type ErrInvalidEnvVarName
- type ErrInvalidFunctionName
- type ErrInvalidLabel
- type ErrInvalidSecretKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSortedSet ¶
func NewSortedSet() *sortedSet
func ValidateConfigMapKey ¶
ValidateConfigMapKey validatest that the input ConfigMap key is valid. It must must consist of alphabetic characters, digits, '_', '-', or '.', regex used for validation is '[-._a-zA-Z0-9]+'
func ValidateEnvVarName ¶
ValidateEnvVarName validatest that the input name is a valid Kubernetes Environment Variable name. It must must consist of alphabetic characters, digits, '_', '-', or '.', and must not start with a digit (e.g. 'my.env-name', or 'MY_ENV.NAME', or 'MyEnvName1', regex used for validation is '[-._a-zA-Z][-._a-zA-Z0-9]*'
func ValidateFunctionName ¶
ValidateFunctionName validates that the input name is a valid function name, ie. valid DNS-1035 label. It must consist of lower case alphanumeric characters or '-' and start with an alphabetic character and end with an alphanumeric character. (e.g. 'my-name', or 'abc-1', regex used for validation is '[a-z]([-a-z0-9]*[a-z0-9])?')
func ValidateLabelKey ¶
ValidateLabelKey validates that the input name is a valid Kubernetes key. Valid label names have two segments: an optional prefix and name, separated by a slash (/). The name segment is required and must be 63 characters or less, beginning and ending with an alphanumeric character ([a-z0-9A-Z]) with dashes (-), underscores (_), dots (.), and alphanumerics between. The prefix is optional. If specified, the prefix must be a DNS subdomain: a series of DNS labels separated by dots (.), not longer than 253 characters in total, followed by a slash (/).
func ValidateLabelValue ¶
ValidateLabelValue ensures that the input is a Kubernetes label value Valid label values must be 63 characters or less (can be empty), unless empty, must begin and end with an alphanumeric character ([a-z0-9A-Z]), could contain dashes (-), underscores (_), dots (.), and alphanumerics between. Label values may also come from the environment and therefore, could be enclosed with {{}} Treat this as a special case.
func ValidateSecretKey ¶
ValidateSecretKey validatest that the input Secret key is valid. It must must consist of alphabetic characters, digits, '_', '-', or '.', regex used for validation is '[-._a-zA-Z0-9]+'
Types ¶
type ErrInvalidConfigMapKey ¶
type ErrInvalidConfigMapKey error
ErrInvalidConfigMapKey indicates the key specified for ConfigMap did not pass validation.
type ErrInvalidEnvVarName ¶
type ErrInvalidEnvVarName error
ErrInvalidEnvVarName indicates the name did not pass env var name validation.
type ErrInvalidFunctionName ¶
type ErrInvalidFunctionName error
ErrInvalidName indicates the name did not pass function name validation.
type ErrInvalidLabel ¶
type ErrInvalidLabel error
ErrInvalidLabel indicates the name did not pass label key validation, or the value did not pass label value validation.
type ErrInvalidSecretKey ¶
type ErrInvalidSecretKey error
ErrInvalidSecretKey indicates the key specified for ConfigMap did not pass validation.