blob

package
v0.0.0-...-18cb69e Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: Apache-2.0 Imports: 10 Imported by: ? modules, 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

View Source
var (
	ErrNotBlobIndex = fmt.Errorf("provider not a blob index")
)

Functions

func LoadIndexFromFile

func LoadIndexFromFile(path string) (content.Provider, error)

LoadBlobIndex loads an JSON file that is an index of all of the blobs in a OCI image index.

This is useful in Bazel so you don't need to repackage all of the entries in an OCI Layout.

Types

type Index

type Index struct {
	Blobs map[digest.Digest]string
}

BlobIndex is a mapping from digest to a filepath

func MergeIndex

func MergeIndex(providers ...content.Provider) (*Index, error)

func (*Index) Clone

func (bi *Index) Clone() *Index

func (*Index) Merge

func (bi *Index) Merge(bim *Index)

func (*Index) ReaderAt

func (bi *Index) ReaderAt(ctx context.Context, desc ocispec.Descriptor) (content.ReaderAt, error)

func (*Index) Rel

func (bi *Index) Rel(rel string) (*Index, error)

Rel creates a new index with all paths relative to the provided path.

This is used in Bazel when using path vs short_path.

func (*Index) WriteTo

func (bi *Index) WriteTo(writer io.Writer) error

WriteTo writes the index to a stream.

func (*Index) WriteToFile

func (bi *Index) WriteToFile(path string) error

WriteToFile writes the index to a file.

Jump to

Keyboard shortcuts

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