dhi

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package dhi provides utilities for mapping container image references to Docker Hardened Images (dhi.io) equivalents.

Index

Constants

View Source
const (
	// Registry is the DHI registry hostname
	Registry = "dhi.io"
	// DockerHubDomain is the canonical Docker Hub domain
	DockerHubDomain = "docker.io"
	// LibraryPrefix is the path prefix for official Docker Hub images
	LibraryPrefix = "library/"
)

Variables

View Source
var ErrNotEligible = errors.New("image not eligible for DHI mapping")

ErrNotEligible is returned when an image reference cannot be mapped to DHI.

Functions

func CanMapToDHI

func CanMapToDHI(ref reference.Named) bool

CanMapToDHI returns true if the reference is a docker.io library image that may have a DHI equivalent. Only official images (docker.io/library/*) are eligible for DHI mapping.

func MapToDHI

func MapToDHI(ref reference.Named) (reference.Named, error)

MapToDHI converts a docker.io library reference to its dhi.io equivalent. Example: docker.io/library/alpine:3.18 -> dhi.io/alpine:3.18 Returns ErrNotEligible if the reference cannot be mapped (use CanMapToDHI to check first).

Types

This section is empty.

Jump to

Keyboard shortcuts

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