validation

package
v3.9.0-alpha.4+incompa... Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2018 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RepositoryNameComponentAnchoredRegexp = regexp.MustCompile(`^` + RepositoryNameComponentRegexp.String() + `$`)

RepositoryNameComponentAnchoredRegexp is the version of RepositoryNameComponentRegexp which must completely match the content Copied from github.com/docker/distribution/registry/api/v2/names.go v2.1.1

View Source
var RepositoryNameComponentRegexp = regexp.MustCompile(`[a-z0-9]+(?:[._-][a-z0-9]+)*`)

RepositoryNameComponentRegexp restricts registry path component names to start with at least one letter or number, with following parts able to be separated by one period, dash or underscore. Copied from github.com/docker/distribution/registry/api/v2/names.go v2.1.1

View Source
var RepositoryNameRegexp = regexp.MustCompile(`(?:` + RepositoryNameComponentRegexp.String() + `/)*` + RepositoryNameComponentRegexp.String())

RepositoryNameRegexp builds on RepositoryNameComponentRegexp to allow multiple path components, separated by a forward slash. Copied from github.com/docker/distribution/registry/api/v2/names.go v2.1.1

Functions

func ValidateImage

func ValidateImage(image *imageapi.Image) field.ErrorList

ValidateImage tests required fields for an Image.

func ValidateImageSignature

func ValidateImageSignature(signature *imageapi.ImageSignature) field.ErrorList

ValidateImageSignature ensures that given signatures is valid.

func ValidateImageSignatureUpdate

func ValidateImageSignatureUpdate(newImageSignature, oldImageSignature *imageapi.ImageSignature) field.ErrorList

ValidateImageSignatureUpdate ensures that the new ImageSignature is valid.

func ValidateImageStream

func ValidateImageStream(stream *imageapi.ImageStream) field.ErrorList

ValidateImageStream tests required fields for an ImageStream.

func ValidateImageStreamImport

func ValidateImageStreamImport(isi *imageapi.ImageStreamImport) field.ErrorList

func ValidateImageStreamMapping

func ValidateImageStreamMapping(mapping *imageapi.ImageStreamMapping) field.ErrorList

ValidateImageStreamMapping tests required fields for an ImageStreamMapping.

func ValidateImageStreamName

func ValidateImageStreamName(name string, prefix bool) []string

func ValidateImageStreamStatusUpdate

func ValidateImageStreamStatusUpdate(newStream, oldStream *imageapi.ImageStream) field.ErrorList

ValidateImageStreamStatusUpdate tests required fields for an ImageStream status update.

func ValidateImageStreamStatusUpdateWithWhitelister

func ValidateImageStreamStatusUpdateWithWhitelister(
	whitelister whitelist.RegistryWhitelister,
	newStream, oldStream *imageapi.ImageStream,
) field.ErrorList

ValidateImageStreamStatusUpdateWithWhitelister tests required fields for an ImageStream status update. Additionally, it validates each new image reference against registry whitelist.

func ValidateImageStreamTag

func ValidateImageStreamTag(ist *imageapi.ImageStreamTag) field.ErrorList

ValidateImageStreamTag validates a mutation of an image stream tag, which can happen on PUT.

func ValidateImageStreamTagReference

func ValidateImageStreamTagReference(
	whitelister whitelist.RegistryWhitelister,
	insecureRepository bool,
	tagRef imageapi.TagReference,
	fldPath *field.Path,
) field.ErrorList

ValidateImageStreamTagReference ensures that a given tag reference is valid.

func ValidateImageStreamTagUpdate

func ValidateImageStreamTagUpdate(newIST, oldIST *imageapi.ImageStreamTag) field.ErrorList

ValidateImageStreamTagUpdate ensures that only the annotations or the image reference of the IST have changed.

func ValidateImageStreamTagUpdateWithWhitelister

func ValidateImageStreamTagUpdateWithWhitelister(
	whitelister whitelist.RegistryWhitelister,
	newIST, oldIST *imageapi.ImageStreamTag,
) field.ErrorList

ValidateImageStreamTagUpdate ensures that only the annotations or the image reference of the IST have changed. Additionally, it validates image reference against registry whitelist if it changed.

func ValidateImageStreamTagWithWhitelister

func ValidateImageStreamTagWithWhitelister(
	whitelister whitelist.RegistryWhitelister,
	ist *imageapi.ImageStreamTag,
) field.ErrorList

ValidateImageStreamTag validates a mutation of an image stream tag, which can happen on PUT. Additionally, it validates each new image reference against registry whitelist.

func ValidateImageStreamUpdate

func ValidateImageStreamUpdate(newStream, oldStream *imageapi.ImageStream) field.ErrorList

ValidateImageStreamUpdate tests required fields for an ImageStream update.

func ValidateImageStreamUpdateWithWhitelister

func ValidateImageStreamUpdateWithWhitelister(
	whitelister whitelist.RegistryWhitelister,
	newStream, oldStream *imageapi.ImageStream,
) field.ErrorList

ValidateImageStreamUpdateWithWhitelister tests required fields for an ImageStream update. Additionally, it validates each new image reference against registry whitelist.

func ValidateImageStreamWithWhitelister

func ValidateImageStreamWithWhitelister(
	whitelister whitelist.RegistryWhitelister,
	stream *imageapi.ImageStream,
) field.ErrorList

ValidateImageStreamWithWhitelister tests required fields for an ImageStream. Additionally, it validates each new image reference against registry whitelist.

func ValidateImageUpdate

func ValidateImageUpdate(newImage, oldImage *imageapi.Image) field.ErrorList

func ValidateRegistryAllowedForImport

func ValidateRegistryAllowedForImport(whitelister whitelist.RegistryWhitelister, path *field.Path, name, registryHost, registryPort string) field.ErrorList

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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