content

package
v0.0.0-...-3a64f8a Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2016 License: MIT Imports: 11 Imported by: 0

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

func Customize(pathToSlash, pathToConfigDir string) error

ImageCustomize treating image customization according to XML config files Returns error or nil

func ProcessHooks

func ProcessHooks(pathToHooksDir string, hookArgs ...string) error

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

type Packages

type Packages struct {
	XMLName xml.Name  `xml:"packages"`
	Pkgs    []Package `xml:"package"`
}

Represents a slice of packages

type Service

type Service struct {
	Name   string `xml:"name"`
	Type   string `xml:"type"`
	Action string `xml:"action"`
	Status string `xml:"status"`
	Chroot bool   `xml:"chroot"`
}

Represents services

type Services

type Services struct {
	XMLName xml.Name  `xml:"services"`
	Srvcs   []Service `xml:"service"`
}

Represents a slice of services

Jump to

Keyboard shortcuts

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