Documentation ¶
Overview ¶
nolint most of these validate and parse functions have been taken from projectatomic/docker and modified for cri-o
Index ¶
- func CheckAllLatestAndCIDFile(c *cobra.Command, args []string, ignoreArgLen bool, cidfile bool) error
- func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error)
- func ValidURL(urlStr string) error
- func ValidateDomain(val string) (string, error)
- func ValidateExtraHost(val string) (string, error)
- func ValidateFileName(filename string) error
- type PortMapping
- type Protocol
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckAllLatestAndCIDFile ¶
func CheckAllLatestAndCIDFile(c *cobra.Command, args []string, ignoreArgLen bool, cidfile bool) error
CheckAllLatestAndCIDFile checks that --all and --latest are used correctly. If cidfile is set, also check for the --cidfile flag.
func GetAllLabels ¶
GetAllLabels retrieves all labels given a potential label file and a number of labels provided from the command line.
func ValidateDomain ¶
func ValidateExtraHost ¶
validateExtraHost validates that the specified string is a valid extrahost and returns it. ExtraHost is in the form of name:ip where the ip has to be a valid ip (ipv4 or ipv6). for add-host flag
func ValidateFileName ¶
ValidateFileName returns an error if filename contains ":" as it is currently not supported
Types ¶
type PortMapping ¶
type PortMapping struct { // Protocol of the port mapping. Protocol Protocol `protobuf:"varint,1,opt,name=protocol,proto3,enum=runtime.Protocol" json:"protocol,omitempty"` // Port number within the container. Default: 0 (not specified). ContainerPort int32 `protobuf:"varint,2,opt,name=container_port,json=containerPort,proto3" json:"container_port,omitempty"` // Port number on the host. Default: 0 (not specified). HostPort int32 `protobuf:"varint,3,opt,name=host_port,json=hostPort,proto3" json:"host_port,omitempty"` // Host IP. HostIp string `protobuf:"bytes,4,opt,name=host_ip,json=hostIp,proto3" json:"host_ip,omitempty"` }
PortMapping specifies the port mapping configurations of a sandbox.