Documentation ¶
Index ¶
Constants ¶
View Source
const ( ACTION_CREATE = "create" ACTION_UPLOAD = "upload" ACTION_REMOVE = "remove" ACTION_START = "start" ACTION_STOP = "stop" ACTION_RESTART = "restart" ACTION_RELOAD = "reload" ACTION_APPEND = "append" ACTION_REPLACE = "replace" ACTION_INSTALL = "install" )
View Source
const ( SVC_STATUS_ON = "on" SVC_STATUS_OFF = "off" )
View Source
const ( SVC_TYPE_SYSV = "sysv" SVC_TYPE_UPSTART = "upstart" )
View Source
const ( PKG_TYPE_RPM = "rpm" PKG_TYPE_DEB = "deb" )
View Source
const ( ITEM_TYPE_FILE = "file" ITEM_TYPE_DIR = "directory" ITEM_TYPE_LINK = "link" )
View Source
const ( PRE_SCRIPTS = iota POST_SCRIPTS )
View Source
const ( INJ_TYPE_FILE = iota INJ_TYPE_DIR INJ_TYPE_QUIT )
View Source
const SLASH = "/"
View Source
const SWAP_LABEL = "SWAP"
Variables ¶
This section is empty.
Functions ¶
func Customize ¶
ImageCustomize treating image customization according to XML config files Returns error or nil
func ProcessHooks ¶
ProcessHooks is intended for executing appropriate hooks. The hooks must contain the following prefix : [0-9]+_ If arguments are being passed to the function, they will be passed tp the hooks as well Example: 01_pre_deploy 02_deploy 03_post_deploy 04_clean
Types ¶
type FileContent ¶
type FileContent struct { Path string `xml:"path"` BkpName string `xml:"bkp_name"` Action string `xml:"action"` OldPattern string `xml:"old_pattern"` NewPattern string `xml:"new_pattern"` }
Represents a file content
type FilesContent ¶
type FilesContent struct { XMLName xml.Name `xml:"files"` FContent []FileContent `xml:"file"` }
Represents a slice of files to modify
type InjectItem ¶
type InjectItem struct { Name string `xml:"name"` BkpName string `xml:"bkp_name"` Action string `xml:"action"` Type string `xml:"type"` Location string `xml:"location"` Permissions os.FileMode `xml:"permissions"` UID int `xml:"owner_id"` GID int `xml:"group_id"` }
Represents Item to inject
type InjectItems ¶
type InjectItems struct { XMLName xml.Name `xml:"items"` InjItems []InjectItem `xml:"item"` }
Represents a slice of Items for injection
type Package ¶
type Package struct { Name string `xml:"name"` Type string `xml:"type"` Action string `xml:"action"` Chroot bool `xml:"chroot"` }
Represents packages
Click to show internal directories.
Click to hide internal directories.