Documentation ¶
Index ¶
- Variables
- type ACBuild
- func (a *ACBuild) AddAnnotation(name, value string) (err error)
- func (a *ACBuild) AddDependency(imageName, imageId string, labels types.Labels, size uint) (err error)
- func (a *ACBuild) AddEnv(name, value string) (err error)
- func (a *ACBuild) AddLabel(name, value string) (err error)
- func (a *ACBuild) AddMount(name, path string, readOnly bool) (err error)
- func (a *ACBuild) AddPort(name, protocol string, port, count uint, socketActivated bool) (err error)
- func (a *ACBuild) Begin(start string, insecure bool) (err error)
- func (a *ACBuild) Copy(from, to string) (err error)
- func (a *ACBuild) End() error
- func (a *ACBuild) RemoveAnnotation(name string) (err error)
- func (a *ACBuild) RemoveDependency(imageName string) (err error)
- func (a *ACBuild) RemoveEnv(name string) (err error)
- func (a *ACBuild) RemoveLabel(name string) (err error)
- func (a *ACBuild) RemoveMount(name string) (err error)
- func (a *ACBuild) RemovePort(name string) (err error)
- func (a *ACBuild) Run(cmd []string, insecure bool) (err error)
- func (a *ACBuild) SetExec(cmd []string) (err error)
- func (a *ACBuild) SetGroup(group string) (err error)
- func (a *ACBuild) SetName(name string) (err error)
- func (a *ACBuild) SetUser(user string) (err error)
- func (a *ACBuild) Write(output string, overwrite, sign bool, gpgflags []string) (err error)
Constants ¶
This section is empty.
Variables ¶
var AppcVersion = schema.AppContainerVersion
var Version = "0.0.0+was-not-built-correctly"
Functions ¶
This section is empty.
Types ¶
type ACBuild ¶
type ACBuild struct { ContextPath string LockPath string CurrentACIPath string DepStoreTarPath string DepStoreExpandedPath string OverlayTargetPath string OverlayWorkPath string Debug bool // contains filtered or unexported fields }
ACBuild contains all the information for a current build. Once an ACBuild has been created, the functions available on it will perform different actions in the build, like updating a dependency or writing a finished ACI.
func NewACBuild ¶
NewACBuild returns a new ACBuild struct with sane defaults for all of the different paths
func (*ACBuild) AddAnnotation ¶
AddAnnotation will add an annotation with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the annotation already exists its value will be updated to the new value.
func (*ACBuild) AddDependency ¶
func (a *ACBuild) AddDependency(imageName, imageId string, labels types.Labels, size uint) (err error)
AddDependency will add a dependency with the given name, id, labels, and size to the untarred ACI stored at a.CurrentACIPath. If the dependency already exists its fields will be updated to the new values.
func (*ACBuild) AddEnv ¶
AddEnv will add an environment variable with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the environment variable already exists its value will be updated to the new value.
func (*ACBuild) AddLabel ¶
AddLabel will add a label with the given name and value to the untarred ACI stored at a.CurrentACIPath. If the label already exists its value will be updated to the new value.
func (*ACBuild) AddMount ¶
AddMount will add a mount point with the given name and path to the untarred ACI stored at a.CurrentACIPath. If the mount point already exists its value will be updated to the new value. readOnly signifies whether or not the mount point should be read only.
func (*ACBuild) AddPort ¶
func (a *ACBuild) AddPort(name, protocol string, port, count uint, socketActivated bool) (err error)
AddPort will add a port with the given name, protocol, port, and count to the untarred ACI stored at a.CurrentACIPath. If the port already exists its value will be updated to the new value. socketActivated signifies whether or not the application will be socket activated via this port.
func (*ACBuild) Begin ¶
Begin will start a new build, storing the untarred ACI the build operates on at a.CurrentACIPath. If start is the empty string, the build will begin with an empty ACI, otherwise the ACI stored at start will be used at the starting point.
func (*ACBuild) Copy ¶
Copy will copy the directory/file at from to the path to inside the untarred ACI at a.CurrentACIPath.
func (*ACBuild) End ¶
End will stop the current build. An error will be returned if no build is in progress.
func (*ACBuild) RemoveAnnotation ¶
RemoveAnnotation will remove the annotation with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemoveDependency ¶
RemoveDependency will remove the dependency with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) RemoveEnv ¶
RemoveEnv will remove the environment variable with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) RemoveLabel ¶
RemoveLabel will remove the label with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemoveMount ¶
RemoveMount will remove the mount point with the given name from the untarred ACI stored at a.CurrentACIPath
func (*ACBuild) RemovePort ¶
RemovePort will remove the port with the given name from the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) Run ¶
Run will execute the given command in the ACI being built. a.CurrentACIPath is where the untarred ACI is stored, a.DepStoreTarPath is the directory to download dependencies into, a.DepStoreExpandedPath is where the dependencies are expanded into, a.OverlayWorkPath is the work directory used by overlayfs, and insecure signifies whether downloaded images should be fetched over http or https.
func (*ACBuild) SetExec ¶
SetExec sets the exec command for the untarred ACI stored at a.CurrentACIPath.
func (*ACBuild) SetGroup ¶
SetGroup sets the group the pod will run as in the untarred ACI stored at a.CurrentACIPath.