Documentation
¶
Overview ¶
Package validation provides core type validation functionality
Index ¶
Constants ¶
This section is empty.
Variables ¶
var IsDigest = validation.By(checkIsDigest)
IsDigest makes sure the digest.Digest is a validly formatted digest
var IsMediaType = validation.By(checkIsMediaType)
IsMediaType checkes to make sure it in the correct format of a media type
var IsPortablePath = validation.By(checkIsPortablePath)
IsPortablePath makes sure it is a portable path
var IsRelativePath = validation.By(checkIsRelativePath)
IsRelativePath makes sure it is a relative path
var KubernetesAnnotations = validation.By(func(value any) error { return apivalidation.ValidateAnnotations(value.(map[string]string), field.NewPath("")).ToAggregate() })
KubernetesAnnotations ensures that the keys and values conform to the Kubernetes rules for annotations
var KubernetesLabels = validation.By(func(value any) error { return v1validation.ValidateLabels(value.(map[string]string), field.NewPath("")).ToAggregate() })
KubernetesLabels ensures that the labels keys and value conform to the Kubernetes rules for labels
var NoTrailingSlash = validation.By(checkNoTrailingSlash)
NoTrailingSlash makes sure the has no trailing slash
var TrailingSlash = validation.By(checkTrailingSlash)
TrailingSlash makes sure the has a trailing slash
var TrailingSlashInPart = validation.WithContext(checkTrailingSlashWithContext)
TrailingSlashInPart ensure the trailing slash is there iff the part is a archive part based on the manifest in the context
Functions ¶
func ContextWithManifest ¶
ContextWithManifest addes the provides manifest to the context (for validation purposes)
func ManifestFromContext ¶
ManifestFromContext returns the database instance customized for this request
func ValidateManifest ¶
ValidateManifest validates a bottle Manifest for correctness
Types ¶
This section is empty.