Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NormalizeURL ¶ added in v1.6.0
NormalizeURL normalizes image repository URLs. Notably, hostnames docker.io and index.docker.io, if present, are dropped. The optional /library prefix for official images from Docker Hub, if included, is also dropped. Valid, non-Docker Hub repository URLs will be returned unchanged.
This is useful for the purposes of comparison and also in cases where a canonical representation of a repository URL is needed. Any URL that cannot be normalized will be returned as-is.
func ValidatePlatformConstraint ¶
ValidatePlatformConstraint returns a boolean indicating whether the provided platform constraint string is valid.
Types ¶
type Credentials ¶
type Credentials struct { // Username identifies a principal, which combined with the value of the // Password field, can be used for reading from some image repository. Username string // Password, when combined with the principal identified by the Username // field, can be used for reading from some image repository. Password string }
Credentials represents the credentials for connecting to a private image repository.
type Selector ¶ added in v0.4.0
type Selector interface { // MatchesTag returns a boolean value indicating whether or not the Selector // would consider an image with the specified tag eligible for selection. MatchesTag(string) bool // Select selects images from a container image repository. Select(context.Context) ([]kargoapi.DiscoveredImageReference, error) }
Selector is an interface for selecting images from a container image repository.
func NewSelector ¶ added in v0.4.0
func NewSelector( sub kargoapi.ImageSubscription, creds *Credentials, ) (Selector, error)
NewSelector returns some implementation of the Selector interface that selects images from a container image repository based on the provided subscription.