Documentation
¶
Overview ¶
Package ref is used to define references. References default to remote registry references (registry:port/repo:tag). Schemes can be included in front of the reference for different reference types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EqualRegistry ¶
EqualRegistry compares the registry between two references.
func EqualRepository ¶
EqualRepository compares the repository between two references.
Types ¶
type Ref ¶
type Ref struct { Scheme string // Scheme is the type of reference, "reg" or "ocidir". Reference string // Reference is the unparsed string or common name. Registry string // Registry is the server for the "reg" scheme. Repository string // Repository is the path on the registry for the "reg" scheme. Tag string // Tag is a mutable tag for a reference. Digest string // Digest is an immutable hash for a reference. Path string // Path is the directory of the OCI Layout for "ocidir". }
Ref is a reference to a registry/repository. Direct access to the contents of this struct should not be assumed.
func NewHost ¶ added in v0.5.4
NewHost returns a Reg for a registry hostname or equivalent. The ocidir schema equivalent is the path.
func (Ref) AddDigest ¶ added in v0.8.3
AddDigest returns a ref with the requested digest set. The tag will NOT be unset and the reference value will be reset.
func (Ref) CommonName ¶
CommonName outputs a parsable name from a reference.
func (Ref) IsSet ¶ added in v0.5.4
IsSet returns true if needed values are defined for a specific reference.
func (Ref) IsSetRepo ¶ added in v0.5.5
IsSetRepo returns true when the ref includes values for a specific repository.
func (Ref) SetDigest ¶ added in v0.5.4
SetDigest returns a ref with the requested digest set. The tag will be unset and the reference value will be reset.