registry

package
v0.0.0-...-b0d2a77 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound = errors.New("not found")
)

Functions

This section is empty.

Types

type OCIRegistry

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

OCIRegistry connects to remote OCI container registries.

func (*OCIRegistry) SHA256

func (r *OCIRegistry) SHA256(image, tag string) (string, error)

SHA256 returns an image SHA256 digest suitable for pinning the image.

`docker pull ghcr.io/mikepartelow/bumper:main.v1.2.3@{{ sha256 ) }}`

func (*OCIRegistry) Tags

func (r *OCIRegistry) Tags(image string) ([]string, error)

Tags returns a list of container tags found on image.

func (*OCIRegistry) URL

func (r *OCIRegistry) URL() string

URL returns the URL passed to New()

type Registry

type Registry interface {
	SHA256(image, tag string) (string, error)
	Tags(image string) ([]string, error)
	URL() string
}

Registry queries a container registry for information about images.

func New

func New(url string) Registry

New returns a new Registry hosted at url.

url is everything prior to the image name. For `ghcr.io/mikepartelow/bumper`, the Registry url is `ghcr.io/mikepartelow/`

Jump to

Keyboard shortcuts

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