content

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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) 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