bundle

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package bundle provides primitives for bundling apps for portability.

Index

Constants

View Source
const (
	// AppSourceName is the required name to be used for the source file. This
	// is needed so we know what we're searching for in the archive. Note, we
	// rename an app filename from a manifest when we create the bundle to
	// ensure it can be unpacked. We could get around this if we loaded all
	// files in the bundle, though we risk abuse with really large bundles.
	AppSourceName = "app.star"
	// AppBundleName is the standard name for a created bundle.
	AppBundleName = "bundle.tar.gz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppBundle

type AppBundle struct {
	Source   []byte
	Manifest *manifest.Manifest
}

AppBundle represents the unpacked bundle in our system.

func InitFromPath

func InitFromPath(dir string) (*AppBundle, error)

InitFromPath translates a directory containing an app manifest and source into an AppBundle.

func LoadBundle

func LoadBundle(in io.Reader) (*AppBundle, error)

LoadBundle loads a compressed archive into an AppBundle.

func (*AppBundle) WriteBundle

func (ab *AppBundle) WriteBundle(out io.Writer) error

WriteBundle writes a compressed archive to the provided writer.

func (*AppBundle) WriteBundleToPath

func (b *AppBundle) WriteBundleToPath(dir string) error

WriteBundleToPath is a helper to be able to write the bundle to a provided directory.

Jump to

Keyboard shortcuts

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