bundle

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToTarBundle added in v0.6.0

func ToTarBundle(fs afero.Fs, path string, destination string, overwrite bool) (string, error)

ToTarBundle takes a path to operator files and creates a tgz of those files with the destination and name provided

func Untar added in v0.6.0

func Untar(fs afero.Fs, path string, r io.Reader) error

Untar takes a destination path and a reader; a tar reader loops over the tarfile creating the file structure at 'path' along the way, and writing any files

Types

type Bundle

type Bundle interface {
	// transformed server view
	GetCRDs() (*PackageCRDs, error)
	// working with local package files
	GetPkgFiles() (*PackageFiles, error)
}

Bundle is an abstraction of the collection of files that makes up a package. It is anything we can retrieve the PackageCRDs from.

func NewBundle

func NewBundle(fs afero.Fs, path string) (Bundle, error)

NewBundle creates the implementation of the bundle based on the path. The expectation is the bundle is always local . The path can be relative or absolute location of the bundle.

func NewBundleFromReader

func NewBundleFromReader(r io.Reader) Bundle

NewBundleFromReader is a bundle from a reader. This should only be used when a file cache isn't used.

type PackageCRDs

type PackageCRDs struct {
	Operator        *v1alpha1.Operator
	OperatorVersion *v1alpha1.OperatorVersion
	Instance        *v1alpha1.Instance
}

PackageCRDs is collection of CRDs that are used when installing operator during installation, package format is converted to this structure

type PackageFiles

type PackageFiles struct {
	Templates map[string]string
	Operator  *bundle.Operator
	Params    []v1alpha1.Parameter
}

PackageFiles represents the raw operator package format the way it is found in the tgz package bundles

type PackageFilesDigest added in v0.6.0

type PackageFilesDigest struct {
	PkgFiles *PackageFiles
	Digest   string
}

PackageFilesDigest is a tuple of data used to return the package files AND the digest of a tarball

func GetFilesDigest added in v0.6.0

func GetFilesDigest(fs afero.Fs, paths []string) []*PackageFilesDigest

GetFilesDigest maps []string of paths to the [] Operators

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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