validation

package
v0.0.0-...-cab1b77 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HostnameMatchSpecCandidates

func HostnameMatchSpecCandidates(hostname string) []string

HostnameMatchSpecCandidates returns a list of match specs that would match the provided hostname Returns nil if len(hostname) == 0

func HostnameMatches

func HostnameMatches(hostname string, matchSpec string) bool

HostnameMatches returns true if the given hostname is matched by the given matchSpec

func ValidateCertInfo

func ValidateCertInfo(certInfo configv1.CertInfo, required bool, fldPath *field.Path) field.ErrorList

func ValidateDir

func ValidateDir(path string, fldPath *field.Path) field.ErrorList

func ValidateFile

func ValidateFile(path string, fldPath *field.Path) field.ErrorList

func ValidateHostPort

func ValidateHostPort(value string, fldPath *field.Path) field.ErrorList

func ValidateSecureURL

func ValidateSecureURL(urlString string, fldPath *field.Path) (*url.URL, field.ErrorList)

func ValidateURL

func ValidateURL(urlString string, fldPath *field.Path) (*url.URL, field.ErrorList)

Types

type ValidationResults

type ValidationResults struct {
	Warnings field.ErrorList
	Errors   field.ErrorList
}

func ValidateHTTPServingInfo

func ValidateHTTPServingInfo(info configv1.HTTPServingInfo, fldPath *field.Path) ValidationResults

func ValidateNamedCertificates

func ValidateNamedCertificates(fldPath *field.Path, namedCertificates []configv1.NamedCertificate) ValidationResults

func ValidateServingInfo

func ValidateServingInfo(info configv1.ServingInfo, certificatesRequired bool, fldPath *field.Path) ValidationResults

func (*ValidationResults) AddErrors

func (r *ValidationResults) AddErrors(errors ...*field.Error)

func (*ValidationResults) AddWarnings

func (r *ValidationResults) AddWarnings(warnings ...*field.Error)

func (*ValidationResults) Append

func (r *ValidationResults) Append(additionalResults ValidationResults)

Jump to

Keyboard shortcuts

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