Help us shape the future of Go! Take the 2026 Go Developer Survey

image

package
v1.25.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DockerTagMaxSize = 128
)

Functions

func BuildPublishImage added in v1.24.0

func BuildPublishImage(kind, sourceDir string) (v1.Image, error)

func CheckPushPermissions

func CheckPushPermissions(ctx context.Context, image string) error

func CheckPushPermissionsRef added in v1.14.0

func CheckPushPermissionsRef(ctx context.Context, ref name.Reference) error

CheckPushPermissionsRef is CheckPushPermissions for a pre-parsed name.Reference, letting callers that need non-default parsing options (e.g. pkg/snapshot's insecure-registry override for local test fixtures) supply their own reference instead of going through this package's secure-by-default name.ParseReference.

func GetImage

func GetImage(ctx context.Context, image string) (v1.Image, error)

func GetImageConfig

func GetImageConfig(
	ctx context.Context,
	image string,
) (*v1.ConfigFile, v1.Image, error)

func GetImageConfigForArch

func GetImageConfigForArch(
	ctx context.Context,
	image, arch string,
) (*v1.ConfigFile, v1.Image, error)

func GetImageForArch

func GetImageForArch(ctx context.Context, image, arch string) (v1.Image, error)

func GetImagePlatforms added in v1.3.1

func GetImagePlatforms(ctx context.Context, image string) ([]string, error)

GetImagePlatforms returns the "os/arch" platforms a remote image reference supports. Multi-arch indexes return every entry; single-image manifests fall back to the config file's OS/Architecture.

func GetKeychain

func GetKeychain(ctx context.Context) (authn.Keychain, error)

func IsValidDockerTag

func IsValidDockerTag(tag string) bool

func ParsePublishReference added in v1.24.0

func ParsePublishReference(registry, namespace, id, version string) (name.Reference, error)

func PushPublishImage added in v1.24.0

func PushPublishImage(kind string, ref name.Reference, img v1.Image) error

func ResolvePublishVersion added in v1.24.0

func ResolvePublishVersion(version string) string

func SanitizeRegistryError added in v1.1.0

func SanitizeRegistryError(err error) error

func ValidatePublishDir added in v1.24.0

func ValidatePublishDir(target string) error

func ValidateTags

func ValidateTags(tags []string) error

func WritePublishedMetadata added in v1.24.0

func WritePublishedMetadata(w io.Writer, metadata any) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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