packager

package
v0.0.0-...-ce92fef Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrDestinationNotDirectory = errors.New("Destination not directory")
)
View Source
var (
	// ErrNoArtifactsDirectory indicates a missing artifacts/ directory
	ErrNoArtifactsDirectory = errors.New("No artifacts/ directory found")
)

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	Source      string
	Destination string
	Thin        bool
	Client      *client.Client
	Context     context.Context
	Logs        string
	Loader      loader.Loader
	Unsigned    bool
}

func NewExporter

func NewExporter(source, dest, logsDir string, l loader.Loader, thin, unsigned bool) (*Exporter, error)

NewExporter returns an *Exporter given information about where a bundle

lives, where the compressed bundle should be exported to,
and what form a bundle should be exported in (thin or thick/full). 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

type Importer

type Importer struct {
	Source      string
	Destination string
	Client      *client.Client
	Loader      loader.Loader
	Verbose     bool
}

Importer is responsible for importing a file

func NewImporter

func NewImporter(source, destination string, load loader.Loader, verbose bool) (*Importer, error)

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.Loader preconfigured for loading secure or insecure 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)

Jump to

Keyboard shortcuts

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