Documentation ¶
Index ¶
- Constants
- Variables
- func Validate(c *Configuration) error
- type Compose
- type Configuration
- func (c *Configuration) Configure(remote string) error
- func (c *Configuration) DisableCache()
- func (c *Configuration) DisableInstall()
- func (c *Configuration) DisablePull()
- func (c *Configuration) EnableCache()
- func (c *Configuration) EnableInstall()
- func (c *Configuration) EnablePull()
- func (c *Configuration) Validate() error
- type Install
- type Publish
Constants ¶
View Source
const ( // DefaultDockerEndpoint define the default docker endpoint used in Configuration. DefaultDockerEndpoint = "unix:///var/run/docker.sock" // DefaultComposePull define the default pull option with "docker build". DefaultComposePull = true // DefaultComposeNoCache define the default no-cache option with "docker build". DefaultComposeNoCache = false )
Variables ¶
View Source
var ( // ErrOutputRequired is returned when output isn't defined in the configuration. ErrOutputRequired = errors.New("configuration(output): a path is required") // ErrPathRequired is returned when path isn't defined in the configuration. ErrPathRequired = errors.New("configuration(install): path is required") // ErrImageRequired is returned when path isn't defined in the configuration. ErrImageRequired = errors.New("configuration(install): image is required") // ErrNameRequired is returned when image name isn't defined in the configuration. ErrNameRequired = errors.New("configuration(compose): name is required") // ErrHostnameRequired is returned when registry hostname isn't defined in the configuration. ErrHostnameRequired = errors.New("configuration(publish): hostname is required") // ErrConfigurationEmpty is returned when the configuration is empty. ErrConfigurationEmpty = errors.New("configuration is required") )
Functions ¶
func Validate ¶
func Validate(c *Configuration) error
Validate return an error if the given Configuration has flaw.
Types ¶
type Configuration ¶
type Configuration struct { DockerEndpoint string `yaml:"docker-endpoint"` Install Install Compose Compose Publish Publish }
Configuration contains pack runtime instructions.
func Parse ¶
func Parse(path string) (*Configuration, error)
Parse a file path and inflate a new Configuration
func (*Configuration) Configure ¶
func (c *Configuration) Configure(remote string) error
Configure will analyze the given remote identifier and define the required parameters for Compose and Publish modules.
func (*Configuration) DisableCache ¶
func (c *Configuration) DisableCache()
DisableCache disable cache for Compose module.
func (*Configuration) DisableInstall ¶
func (c *Configuration) DisableInstall()
DisableInstall disable Install module.
func (*Configuration) DisablePull ¶
func (c *Configuration) DisablePull()
DisablePull disable pull for Compose module.
func (*Configuration) EnableCache ¶
func (c *Configuration) EnableCache()
EnableCache enable cache for Compose module.
func (*Configuration) EnableInstall ¶
func (c *Configuration) EnableInstall()
EnableInstall enable Install module.
func (*Configuration) EnablePull ¶
func (c *Configuration) EnablePull()
EnablePull enable pull for Compose module.
func (*Configuration) Validate ¶
func (c *Configuration) Validate() error
Validate is just a wrapper for the static function with the same name. Which mean that it will return an error if the given Configuration has flaw.
Click to show internal directories.
Click to hide internal directories.