parse

package
Version: v3.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

nolint most of these validate and parse functions have been taken from projectatomic/docker and modified for cri-o

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FilterArgumentsIntoFilters

func FilterArgumentsIntoFilters(filters []string) (url.Values, error)

func GetAllLabels

func GetAllLabels(labelFile, inputLabels []string) (map[string]string, error)

GetAllLabels retrieves all labels given a potential label file and a number of labels provided from the command line.

func MatchesJSONFormat

func MatchesJSONFormat(s string) bool

MatchesJSONFormat test CLI --format string to be a JSON request

func ValidURL

func ValidURL(urlStr string) error

ValidURL checks a string urlStr is a url or not

func ValidateDomain

func ValidateDomain(val string) (string, error)

func ValidateExtraHost

func ValidateExtraHost(val string) (string, error)

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

func ValidateFileName(filename string) error

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.

type Protocol

type Protocol int32
const (
	Protocol_TCP Protocol = 0
	Protocol_UDP Protocol = 1
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL