sources

package
v0.0.79 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package sources contains logic for loading a bundle from a source of bundles

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBundleNotFound is returned when the specified bundle is not found
	ErrBundleNotFound = errors.New("bundle not found")
)

Functions

This section is empty.

Types

type BundleSource

type BundleSource interface {
	// GetBundle fetches a bundle from the source by namespace and name
	// ErrBundleNotFound is returned if the bundle cannot be found
	GetBundle(id mindpak.BundleID) (reader.BundleReader, error)
	// ListBundles lists all bundles known to this source
	ListBundles() ([]mindpak.BundleID, error)
}

BundleSource contains methods for retrieving bundles. Implementations may load the Bundle from disk, an OCI registry, or any other place where bundles may be present. Bundles are returned as instances of the BundleReader interface.

func NewSourceFromTarGZ

func NewSourceFromTarGZ(path string) (BundleSource, error)

NewSourceFromTarGZ creates a singleBundleSource from a .tar.gz file

Jump to

Keyboard shortcuts

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