Documentation ¶
Index ¶
Constants ¶
const ( START = "start" RESTART = "restart" STOP = "stop" RELOAD = "reload" ZAP = "zap" )
Constants for service states
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AlpineData ¶
type AlpineData struct { RootPasswd string `yaml:"password"` MOTD string `yaml:"motd"` Network *NetworkSettings `yaml:"network"` Packages *PackagesConfig `yaml:"packages"` DRP *DRProvision `yaml:"dr_provision"` SSHDConfig *SSHD `yaml:"sshd"` Groups MultiString `yaml:"groups"` Users []User `yaml:"users"` RunCMD []MultiString `yaml:"runcmd"` WriteFiles []WriteFile `yaml:"write_files"` TimeZone string `yaml:"timezone"` Keymap string `yaml:"keymap"` UnLift bool `yaml:"unlift"` ScratchDisk string `yaml:"scratch_disk"` Disks []Disk `yaml:"disks"` MTA *MTAConfiguration `yaml:"mta"` }
AlpineData is the main alpine-data yaml specification
func InitAlpineData ¶
func InitAlpineData() *AlpineData
InitAlpineData initializes alpine-data with sane defaults
type DRProvision ¶
type DRProvision struct { InstallRunner bool `yaml:"install_runner"` AssetsURL string `yaml:"assets_url"` Token string `yaml:"token"` Endpoint string `yaml:"endpoint"` UUID string `yaml:"uuid"` }
DRProvision is used for installing and configuring drpcli
type Disk ¶
type Disk struct { Device string `yaml:"device"` FileSystemType string `yaml:"filesystem"` MountPoint string `yaml:"mountpoint"` }
Disk specifies a disk that should be formatted and mounted (without partitioning, LUKS encrypted).
type Lift ¶
type Lift struct { DataURL string RequestHeaders http.Header Data *AlpineData }
Lift contains all configuration
type MTAConfiguration ¶
type MTAConfiguration struct { Root string `yaml:"root"` Server string `yaml:"server"` UseTLS bool `yaml:"use_tls"` UseSTARTTLS bool `yaml:"use_starttls"` User string `yaml:"user"` Password string `yaml:"password"` AuthMethod string `yaml:"authmethod"` RewriteDomain string `yaml:"rewrite_domain"` FromLineOverride bool `yaml:"fromline_override"` }
MTAConfiguration contains all information for setting up a mail transfer agent (mail forwarding)
type MultiString ¶
type MultiString []string
MultiString is a type alias, needed for unmarshalling
func (*MultiString) UnmarshalYAML ¶
func (ms *MultiString) UnmarshalYAML(unmarshal func(interface{}) error) error
UnmarshalYAML is a custom unmarshalling function for parsing yaml values that contains one or more string (either string or array of strings) but always returning []string (aliased with MultiString)
type NTPConfiguration ¶
type NTPConfiguration struct { Pools MultiString `yaml:"pools"` Servers MultiString `yaml:"servers"` }
NTPConfiguration is used for configuring chronyd
type NetworkSettings ¶
type NetworkSettings struct { HostName string `yaml:"hostname"` InterfaceOpts string `yaml:"interfaces"` ResolvConf *ResolvConfiguration `yaml:"resolv_conf"` Proxy string `yaml:"proxy"` NTP *NTPConfiguration `yaml:"ntp"` }
NetworkSettings contains all network settings lift should apply
type PackagesConfig ¶
type PackagesConfig struct { Repositories MultiString `yaml:"repositories"` Update bool `yaml:"update"` Upgrade bool `yaml:"upgrade"` Install MultiString `yaml:"install"` Uninstall MultiString `yaml:"uninstall"` }
PackagesConfig contains specification for the `packages:` block.
type ResolvConfiguration ¶
type ResolvConfiguration struct { NameServers MultiString `yaml:"nameservers"` SearchDomains MultiString `yaml:"search_domains"` Domain string `yaml:"domain"` }
ResolvConfiguration contains the DNS spec
type SSHD ¶
type SSHD struct { Port int `yaml:"port"` ListenAddress string `yaml:"listen_address"` AuthorizedKeys []string `yaml:"authorized_keys"` PermitRootLogin bool `yaml:"permit_root_login"` PermitEmptyPasswords bool `yaml:"permit_empty_passwords"` PasswordAuthentication bool `yaml:"password_authentication"` }
SSHD specifies the `sshd` entry
type User ¶
type User struct { Name string `yaml:"name"` Description string `yaml:"gecos"` HomeDir string `yaml:"homedir"` Shell string `yaml:"shell"` NoCreateHomeDir bool `yaml:"no_create_homedir"` PrimaryGroup string `yaml:"primary_group"` Groups MultiString `yaml:"groups"` System bool `yaml:"system"` SSHAuthorizedKeys []string `yaml:"ssh_authorized_keys"` Password string `yaml:"passwd"` }
User specifies a specific OS user
type WriteFile ¶
type WriteFile struct { Encoding string `yaml:"encoding"` Content string `yaml:"content"` ContentURL string `yaml:"content-url"` Path string `yaml:"path"` Owner string `yaml:"owner"` Permissions string `yaml:"permissions"` }
WriteFile allows for specifying files and their content that should be created on first boot.