Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 ¶
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 ¶
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
Click to show internal directories.
Click to hide internal directories.