image

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DockerCertsDir

func DockerCertsDir() string

func ParseSchemelessURL added in v1.1.1

func ParseSchemelessURL(schemelessURL string) (*url.URL, error)

ParseSchemelessURL parses a schemeless url and returns a url.URL url.Parse require a scheme, but ours don't have schemes. Adding a scheme to make url.Parse happy, then clear out the resulting scheme.

func PolicyConfPath

func PolicyConfPath() string

func RegistriesConfPath

func RegistriesConfPath() string

func RegistryCertsDir

func RegistryCertsDir() string

func SplitURL added in v1.1.1

func SplitURL(url *url.URL) (parts []string, port string)

SplitURL splits the host name into parts, as well as the port

func URLsMatch added in v1.1.1

func URLsMatch(globURL *url.URL, targetURL *url.URL) (bool, error)

URLsMatch checks whether the given target url matches the glob url, which may have glob wild cards in the host name.

Examples:

globURL=*.docker.io, targetURL=blah.docker.io => match
globURL=*.docker.io, targetURL=not.right.io   => no match

Note that we don't support wildcards in ports and paths yet.

func URLsMatchStr added in v1.1.1

func URLsMatchStr(glob string, target string) (bool, error)

URLsMatchStr is wrapper for URLsMatch, operating on strings instead of URLs.

Types

type Facade

type Facade struct {
	// contains filtered or unexported fields
}

func FacadeSingleton

func FacadeSingleton() *Facade

func (*Facade) GetCompatibleArchitecturesSet

func (i *Facade) GetCompatibleArchitecturesSet(ctx context.Context, imageReference string, skipCache bool, secrets [][]byte) (architectures sets.Set[string], err error)

func (*Facade) StoreGlobalPullSecret

func (i *Facade) StoreGlobalPullSecret(pullSecret []byte)

type ICache

type ICache interface {
	// GetCompatibleArchitecturesSet takes an image reference. a list of secrets and the client to the cluster and
	// returns a set of architectures that are compatible with the image reference.
	GetCompatibleArchitecturesSet(ctx context.Context, imageReference string, skipCache bool, secrets [][]byte) (sets.Set[string], error)
}

type IRegistryInspector

type IRegistryInspector interface {
	ICache
	// contains filtered or unexported methods
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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