Documentation
¶
Index ¶
- Variables
- func EnsureHostportFormatted(hostport string) string
- func FilterIPs(ctx context.Context, ips, cidrs []string) ([]string, error)
- func GetBaseImageName(name string) string
- func IPv6Check(ip string) bool
- func ParseHostportIP(hostport string) string
- func ReplaceImageRegistry(image, registry string) string
- func ValidateCIDRs(ctx context.Context, cidrs []string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DNS1123LabelRegex = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?$`) DNS1123DomainRegex = regexp.MustCompile(`^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$`) )
Functions ¶
func EnsureHostportFormatted ¶
EnsureHostportFormatted ensures IPv6 hostport is in correct format
func FilterIPs ¶
FilterIPs takes a list of IPs and CIDRs and returns the sorted list of IPs that are contained by one or more of the CIDRs
func GetBaseImageName ¶
GetBaseImageName accepts a container image name and return just the base image.
func ParseHostportIP ¶
ParseHostportIP returns just the IP address part of the given input IP address and strips any port information
func ReplaceImageRegistry ¶
ReplaceImageRegistry accepts a container image name and a registry name (FQDN[:port]/[subdir]*) and returns the same image name with the supplied registry.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.