container

package
v0.3.16 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImageTagIsValid

func ImageTagIsValid(tagName string) bool

ImageTagIsValid ensures that a given image tag is compliant with the OCI spec

func ModifyImageRepository

func ModifyImageRepository(imageName, repositoryName string) (string, error)

ModifyImageRepository takes an imageName (e.g., repository/image:tag), and returns an image name with updated repository

func ModifyImageTag

func ModifyImageTag(imageName, tagName string) (string, error)

ModifyImageTag takes an imageName (e.g., repository/image:tag), and returns an image name with updated tag

func SemverToOCIImageTag

func SemverToOCIImageTag(version string) string

SemverToOCIImageTag is a helper function that replaces all non-allowed symbols in tag strings with underscores. Image tag can only contain lowercase and uppercase letters, digits, underscores, periods and dashes. Current usage is for CI images where all of symbols except '+' are valid, but function is for generic usage where input can't be always pre-validated. Taken from k8s.io/cmd/kubeadm/app/util

Types

type Image

type Image struct {
	Repository string
	Name       string
	Tag        string
	Digest     string
}

Image type represents the container image details

func ImageFromString

func ImageFromString(image string) (Image, error)

ImageFromString parses a docker image string into three parts: repo, tag and digest.

func (Image) String

func (i Image) String() string

Jump to

Keyboard shortcuts

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