content

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStoreCorrupted = errors.New("local artifact store corrupted")

ErrStoreCorrupted indicates that the local artifact store is in an inconsistent or partially missing state (e.g. missing tar, refs or metadata). Callers may safely attempt to re-fetch the artifact from the remote source.

Functions

This section is empty.

Types

type ArtifactMetadata

type ArtifactMetadata struct {
	Digest      string            `json:"digest"`
	Reference   string            `json:"reference"`
	Size        int64             `json:"size"`
	StoredAt    time.Time         `json:"stored_at"`
	Labels      map[string]string `json:"labels,omitempty"`
	Annotations map[string]string `json:"annotations,omitempty"`
}

ArtifactMetadata contains metadata about stored artifacts

type Opt

type Opt func(*Store)

func WithBaseDir

func WithBaseDir(baseDir string) Opt

type Store

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

Store manages the local content store for artifacts

func NewStore

func NewStore(opts ...Opt) (*Store, error)

NewStore creates a new content store

func (*Store) DeleteArtifact

func (s *Store) DeleteArtifact(identifier string) error

DeleteArtifact removes an artifact from the store

func (*Store) GetArtifact added in v1.8.2

func (s *Store) GetArtifact(identifier string) (string, error)

func (*Store) GetArtifactImage

func (s *Store) GetArtifactImage(identifier string) (v1.Image, error)

GetArtifactImage loads an artifact by digest or reference and returns it as a v1.Image

func (*Store) GetArtifactMetadata

func (s *Store) GetArtifactMetadata(identifier string) (*ArtifactMetadata, error)

GetArtifactMetadata returns metadata for an artifact by digest or reference

func (*Store) GetArtifactPath

func (s *Store) GetArtifactPath(identifier string) (string, error)

GetArtifactPath returns the file path for an artifact by digest or reference

func (*Store) ListArtifacts

func (s *Store) ListArtifacts() ([]ArtifactMetadata, error)

ListArtifacts returns a list of all stored artifacts

func (*Store) StoreArtifact

func (s *Store) StoreArtifact(img v1.Image, reference string) (string, error)

StoreArtifact stores an artifact with the given reference and returns its digest

Jump to

Keyboard shortcuts

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