Documentation ¶
Overview ¶
Package registry groups all container registry related types and helpers in one place.
Index ¶
Constants ¶
const (
// RegistryDocker exists to prevent an import loop between the resources and this package.
RegistryDocker = "docker.io"
)
Variables ¶
This section is empty.
Functions ¶
func RewriteImage ¶
RewriteImage will apply the given overwriteRegistry to a given docker image reference.
Types ¶
type ImageRewriter ¶
ImageRewriter is a function that takes a Docker image reference (for example "docker.io/repo/image:tag@sha256:abc123") and potentially changes the registry to point to a local registry. It's a distinct type from WithOverwriteFunc as it does not just work on a registry, but a full image reference.
func GetImageRewriterFunc ¶
func GetImageRewriterFunc(overwriteRegistry string) ImageRewriter
GetImageRewriterFunc returns a ImageRewriter that will apply the given overwriteRegistry to a given docker image reference.
type WithOverwriteFunc ¶
WithOverwriteFunc is a function that takes a string and either returns that string or a defined override value.
func GetOverwriteFunc ¶
func GetOverwriteFunc(overwriteRegistry string) WithOverwriteFunc
GetOverwriteFunc returns a WithOverwriteFunc based on the given override value. Deprecated: This function should not be used anymore. Use the much more flexible GetImageRewriterFunc instead.