reference

package
v20.10.21+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 10 Imported by: 1,411

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrDoesNotExist is returned if a reference is not found in the
	// store.
	ErrDoesNotExist notFoundError = "reference does not exist"
)

Functions

This section is empty.

Types

type Association

type Association struct {
	Ref reference.Named
	ID  digest.Digest
}

An Association is a tuple associating a reference with an image ID.

type Store

type Store interface {
	References(id digest.Digest) []reference.Named
	ReferencesByName(ref reference.Named) []Association
	AddTag(ref reference.Named, id digest.Digest, force bool) error
	AddDigest(ref reference.Canonical, id digest.Digest, force bool) error
	Delete(ref reference.Named) (bool, error)
	Get(ref reference.Named) (digest.Digest, error)
}

Store provides the set of methods which can operate on a reference store.

func NewReferenceStore

func NewReferenceStore(jsonPath string) (Store, error)

NewReferenceStore creates a new reference store, tied to a file path where the set of references are serialized in JSON format.

Jump to

Keyboard shortcuts

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