validation

package
v3.9.0-0.35.0+incompat... Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseDomainName

func ParseDomainName(image string) (string, string, error)

ParseDomainName parses a docker image reference into its domain component, if any, and everything after the domain. An empty string is returned if there is no domain component. This function will first validate that image is a valid reference, returning an error if it is not.

Examples inputs and results for the domain component:

"busybox"                      -> domain is ""
"foo/busybox"                  -> domain is ""
"localhost/foo/busybox"        -> domain is "localhost"
"localhost:5000/foo/busybox"   -> domain is "localhost:5000"
"gcr.io/busybox"               -> domain is "gcr.io"
"gcr.io/foo/busybox"           -> domain is "gcr.io"
"docker.io/busybox"            -> domain is "docker.io"
"docker.io/library/busybox"    -> domain is "docker.io"
"library/busybox:v1"           -> domain is ""

func Validate

func Validate(config *api.ImageQualifyConfig) field.ErrorList

Types

This section is empty.

Jump to

Keyboard shortcuts

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