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: 0

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