local

package
v1.235.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 17 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStore

func NewStore(opts artifact.StoreOptions) (artifact.Backend, error)

NewStore creates a new local filesystem artifact backend.

Types

type Metadata

type Metadata = artifact.Metadata

Metadata is an alias for artifact.Metadata used in the local backend.

type Store

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

Store implements the artifact.Backend interface using the local filesystem. It stores each artifact as a single file with a metadata JSON sidecar. Object I/O is delegated to the shared transport in pkg/artifact/blob/local; this type only owns the legacy CI concerns: artifact naming, the metadata sidecar format, and query matching.

func (*Store) Delete

func (s *Store) Delete(ctx context.Context, name string) error

Delete deletes an artifact from the local filesystem. Removes both the artifact file and its metadata sidecar. Idempotent — returns nil if the artifact does not exist.

func (*Store) Download

func (s *Store) Download(ctx context.Context, name string) (io.ReadCloser, *artifact.Metadata, error)

Download downloads a single data stream from the local filesystem. Returns an io.ReadCloser for the file and the metadata sidecar. Callers must close the returned reader when done.

func (*Store) Exists

func (s *Store) Exists(ctx context.Context, name string) (bool, error)

Exists checks if an artifact exists as a file (not directory).

func (*Store) GetMetadata

func (s *Store) GetMetadata(ctx context.Context, name string) (*artifact.Metadata, error)

GetMetadata retrieves metadata for an artifact without downloading the content.

func (*Store) List

func (s *Store) List(ctx context.Context, query artifact.Query) ([]artifact.ArtifactInfo, error)

List lists artifacts matching the given query. Finds metadata sidecar files with a corresponding artifact file (not dir), applies Query filters, and sorts newest first.

func (*Store) Name

func (s *Store) Name() string

Name returns the store type name.

func (*Store) Upload

func (s *Store) Upload(ctx context.Context, name string, data io.Reader, size int64, metadata *Metadata) error

Upload uploads a single data stream to the local filesystem. Writes the data as a single file and the metadata as a JSON sidecar.

Jump to

Keyboard shortcuts

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