utils

package
v1.8.0-rc2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2025 License: Apache-2.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
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 ValidateEverestResourceName

func ValidateEverestResourceName(s, name string) error

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

func ValidateRFC1035(s, name string) error

ValidateRFC1035 names to be RFC-1035 compatible https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#rfc-1035-label-names

func ValidateURL

func ValidateURL(urlStr string) bool

ValidateURL checks if the given string is a valid URL.

Types

This section is empty.

Directories

Path Synopsis
Package must provides a function to panic if an error is not nil.
Package must provides a function to panic if an error is not nil.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL