packager

package
v0.25.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

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

func NewExporter

func NewExporter(source, dest, logsDir string, l loader.BundleLoader, c imagestore.Constructor) (*Exporter, error)

NewExporter returns an *Exporter given information about where a bundle lives, where the compressed bundle should be exported to. It also sets up a docker client to work with images.

func (*Exporter) Export

func (ex *Exporter) Export() error

Export prepares an artifacts directory containing all of the necessary images, packages the bundle along with the artifacts in a gzipped tar file, and saves that file to the file path specified as destination. If the any part of the destination path doesn't, it will be created. exist

func (*Exporter) Logs

func (ex *Exporter) Logs() string

type Importer

type Importer struct {
	Source      string
	Destination string
	Loader      loader.BundleLoader
}

Importer is responsible for importing a file

func NewImporter

func NewImporter(source, destination string, load loader.BundleLoader) *Importer

NewImporter creates a new secure *Importer

source is the filesystem path to the archive. destination is the directory to unpack the contents. load is a loader.BundleLoader preconfigured for loading bundles.

func (*Importer) Import

func (im *Importer) Import() error

Import decompresses a bundle from Source (location of the compressed bundle) and properly places artifacts in the correct location(s)

func (*Importer) Unzip

func (im *Importer) Unzip() (string, *bundle.Bundle, error)

Unzip decompresses a bundle from Source (location of the compressed bundle) and returns the path of the bundle and the bundle itself.

Jump to

Keyboard shortcuts

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