Documentation
¶
Index ¶
- Variables
- func IsBase64Encoded(s string) bool
- func IsEverestObjectInUse(obj client.Object) bool
- func IsEverestReadOnlyObject(obj client.Object) bool
- func ValidateDNSName(dnsName string) []string
- func ValidateEverestResourceName(s, name string) error
- func ValidateRFC1035(s, name string) error
- func ValidateURL(urlStr string) bool
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNameNotRFC1035Compatible appears when some of the provided names are not RFC1035 compatible. ErrNameNotRFC1035Compatible = func(fieldName string) error { return fmt.Errorf(`'%s' is not RFC 1035 compatible. The name should contain only lowercase alphanumeric characters or '-', start with an alphabetic character, end with an alphanumeric character`, fieldName, ) } // ErrNameTooLong when the given fieldName is too long. ErrNameTooLong = func(fieldName string) error { return fmt.Errorf("'%s' can be at most 22 characters long", fieldName) } )
Functions ¶
func IsBase64Encoded ¶ added in v1.10.0
IsBase64Encoded checks if the given string is a valid base64 encoded string.
func IsEverestObjectInUse ¶
IsEverestObjectInUse Checks whether the Everest object is in use. Returns true in case "everest.percona.com/in-use-protection" finalizer is present.
func IsEverestReadOnlyObject ¶
IsEverestReadOnlyObject Checks whether the Everest object is in use. Returns true in case "everest.percona.com/readonly-protection" finalizer is present.
func ValidateDNSName ¶ added in v1.10.0
ValidateDNSName checks if the given string is a valid DNS name.
func ValidateEverestResourceName ¶
ValidateEverestResourceName names to be RFC-1035 compatible https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names. It has an additional limitation at most 22 characters.
func ValidateRFC1035 ¶
ValidateRFC1035 names to be RFC-1035 compatible https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names
func ValidateURL ¶
ValidateURL checks if the given string is a valid URL.
Types ¶
This section is empty.