Documentation
¶
Index ¶
- func NewStore(opts artifact.StoreOptions) (artifact.Backend, error)
- type Metadata
- type Store
- func (s *Store) Delete(ctx context.Context, name string) error
- func (s *Store) Download(ctx context.Context, name string) (io.ReadCloser, *artifact.Metadata, error)
- func (s *Store) Exists(ctx context.Context, name string) (bool, error)
- func (s *Store) GetMetadata(ctx context.Context, name string) (*artifact.Metadata, error)
- func (s *Store) List(ctx context.Context, query artifact.Query) ([]artifact.ArtifactInfo, error)
- func (s *Store) Name() string
- func (s *Store) Upload(ctx context.Context, name string, data io.Reader, size int64, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
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.
func (*Store) Delete ¶
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) GetMetadata ¶
GetMetadata retrieves metadata for an artifact without downloading the content.
Click to show internal directories.
Click to hide internal directories.