Documentation
¶
Index ¶
- type Layout
- func (l *Layout) AddOCI(ctx context.Context, oci artifacts.OCI, ref string) (ocispec.Descriptor, error)
- func (l *Layout) AddOCICollection(ctx context.Context, collection artifacts.OCICollection) ([]ocispec.Descriptor, error)
- func (l *Layout) Copy(ctx context.Context, ref string, to target.Target, toRef string) (ocispec.Descriptor, error)
- func (l *Layout) CopyAll(ctx context.Context, to target.Target, toMapper func(string) (string, error)) ([]ocispec.Descriptor, error)
- func (l *Layout) Flush(ctx context.Context) error
- func (l *Layout) Identify(ctx context.Context, desc ocispec.Descriptor) string
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
func (*Layout) AddOCI ¶
func (l *Layout) AddOCI(ctx context.Context, oci artifacts.OCI, ref string) (ocispec.Descriptor, error)
AddOCI adds an artifacts.OCI to the store
The method to achieve this is to save artifact.OCI to a temporary directory in an OCI layout compatible form. Once saved, the entirety of the layout is copied to the store (which is just a registry). This allows us to not only use strict types to define generic content, but provides a processing pipeline suitable for extensibility. In the future we'll allow users to define their own content that must adhere either by artifact.OCI or simply an OCI layout.
func (*Layout) AddOCICollection ¶
func (l *Layout) AddOCICollection(ctx context.Context, collection artifacts.OCICollection) ([]ocispec.Descriptor, error)
AddOCICollection .
func (*Layout) Copy ¶
func (l *Layout) Copy(ctx context.Context, ref string, to target.Target, toRef string) (ocispec.Descriptor, error)
Copy will copy a given reference to a given target.Target
This is essentially a wrapper around oras.Copy, but locked to this content store
func (*Layout) CopyAll ¶
func (l *Layout) CopyAll(ctx context.Context, to target.Target, toMapper func(string) (string, error)) ([]ocispec.Descriptor, error)
CopyAll performs bulk copy operations on the stores oci layout to a provided target.Target
func (*Layout) Flush ¶
Flush is a fancy name for delete-all-the-things, in this case it's as trivial as deleting oci-layout content
This can be a highly destructive operation if the store's directory happens to be inline with other non-store contents To reduce the blast radius and likelihood of deleting things we don't own, Flush explicitly deletes oci-layout content only
Click to show internal directories.
Click to hide internal directories.