extractor

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OCIFileExtractor

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

func New

func New(searchPaths []string, opts ...OCIFileExtractorOpts) (*OCIFileExtractor, error)

func (*OCIFileExtractor) ExtractFrom

func (o *OCIFileExtractor) ExtractFrom(uri string) (path string, err error)

ExtractFrom locates and extracts a file from the given OCI image. The first located file will be extracted to the configured store directory and its path will be returned, or an error if the file was not found. The underlying OCI image is not retained.

type OCIFileExtractorOpts

type OCIFileExtractorOpts func(o *OCIFileExtractor)

func WithContext

func WithContext(ctx context.Context) OCIFileExtractorOpts

func WithFS

func WithFS(fs vfs.FS) OCIFileExtractorOpts

func WithLocal

func WithLocal(local bool) OCIFileExtractorOpts

func WithOCIUnpacker

func WithOCIUnpacker(u OCIUnpacker) OCIFileExtractorOpts

func WithStore

func WithStore(store string) OCIFileExtractorOpts

type OCIUnpacker

type OCIUnpacker interface {
	// Unpack unpacks the file system of a given OCI image to the specified destination
	// and returns its digest
	Unpack(ctx context.Context, uri, dest string, local bool) (digest string, err error)
}

Jump to

Keyboard shortcuts

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