packages

package
v0.0.0-...-cf6c366 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPackage

func IsPackage(path string) (bool, error)

IsPackage returns true if the given path is a whalebrew package

Types

type Package

type Package struct {
	Name        string   `yaml:"-"`
	Environment []string `yaml:"environment,omitempty"`
	Image       string   `yaml:"image"`
	Volumes     []string `yaml:"volumes,omitempty"`
	Ports       []string `yaml:"ports,omitempty"`
	Networks    []string `yaml:"networks,omitempty"`
	WorkingDir  string   `yaml:"working_dir,omitempty"`
}

Package represents a Whalebrew package

func LoadPackageFromPath

func LoadPackageFromPath(path string) (*Package, error)

LoadPackageFromPath reads a package from the given path

func NewPackageFromImage

func NewPackageFromImage(image string, imageInspect types.ImageInspect) (*Package, error)

NewPackageFromImage creates a package from a given image name, inspecting the image to fetch the package configuration

func (*Package) ImageInspect

func (pkg *Package) ImageInspect() (*types.ImageInspect, error)

ImageInspect inspects the image associated with this package

func (*Package) PreinstallMessage

func (pkg *Package) PreinstallMessage() string

PreinstallMessage returns the preinstall message for the package

type PackageManager

type PackageManager struct {
	InstallPath string
}

PackageManager manages packages at a given path

func NewPackageManager

func NewPackageManager(path string) *PackageManager

NewPackageManager creates a new PackageManager

func (*PackageManager) ForceInstall

func (pm *PackageManager) ForceInstall(pkg *Package) error

ForceInstall installs a package

func (*PackageManager) Install

func (pm *PackageManager) Install(pkg *Package) error

Install installs a package

func (*PackageManager) List

func (pm *PackageManager) List() (map[string]*Package, error)

List lists installed packages

func (*PackageManager) Load

func (pm *PackageManager) Load(name string) (*Package, error)

Load returns an installed package given its package name

func (*PackageManager) Uninstall

func (pm *PackageManager) Uninstall(packageName string) error

Uninstall uninstalls a package

Jump to

Keyboard shortcuts

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