Documentation ¶
Index ¶
- Constants
- type SCloudConfig
- func (conf *SCloudConfig) Merge(conf2 *SCloudConfig)
- func (conf *SCloudConfig) MergeBootcmd(cmd string)
- func (conf *SCloudConfig) MergePackage(pkg string)
- func (conf *SCloudConfig) MergeRuncmd(cmd string)
- func (conf *SCloudConfig) MergeUser(u SUser)
- func (conf *SCloudConfig) MergeWriteFile(f SWriteFile, replace bool)
- func (conf *SCloudConfig) RemoveUser(u SUser)
- func (conf *SCloudConfig) UserData() string
- func (conf *SCloudConfig) UserDataBase64() string
- func (conf *SCloudConfig) UserDataEc2() string
- func (conf *SCloudConfig) UserDataPowerShell() string
- func (conf *SCloudConfig) UserDataScript() string
- func (conf *SCloudConfig) UserDataScriptBase64() string
- type SPhoneHome
- type SUser
- type SWriteFile
- type TSshPwauth
- type TSudoPolicy
Constants ¶
View Source
const ( CLOUD_CONFIG_HEADER = "#cloud-config\n" CLOUD_SHELL_HEADER = "#!/usr/bin/env bash\n" CLOUD_POWER_SHELL_HEADER = "#ps1\n" USER_SUDO_NOPASSWD = TSudoPolicy("sudo_nopasswd") USER_SUDO = TSudoPolicy("sudo") USER_SUDO_DENY = TSudoPolicy("sudo_deny") USER_SUDO_NONE = TSudoPolicy("") SSH_PASSWORD_AUTH_ON = TSshPwauth("true") SSH_PASSWORD_AUTH_OFF = TSshPwauth("false") SSH_PASSWORD_AUTH_UNCHANGED = TSshPwauth("unchanged") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SCloudConfig ¶
type SCloudConfig struct { Users []SUser WriteFiles []SWriteFile Runcmd []string Bootcmd []string Packages []string PhoneHome *SPhoneHome DisableRoot int SshPwauth TSshPwauth }
func ParseUserData ¶
func ParseUserData(data string) (*SCloudConfig, error)
func ParseUserDataBase64 ¶
func ParseUserDataBase64(b64data string) (*SCloudConfig, error)
func (*SCloudConfig) Merge ¶
func (conf *SCloudConfig) Merge(conf2 *SCloudConfig)
func (*SCloudConfig) MergeBootcmd ¶
func (conf *SCloudConfig) MergeBootcmd(cmd string)
func (*SCloudConfig) MergePackage ¶
func (conf *SCloudConfig) MergePackage(pkg string)
func (*SCloudConfig) MergeRuncmd ¶
func (conf *SCloudConfig) MergeRuncmd(cmd string)
func (*SCloudConfig) MergeUser ¶
func (conf *SCloudConfig) MergeUser(u SUser)
func (*SCloudConfig) MergeWriteFile ¶
func (conf *SCloudConfig) MergeWriteFile(f SWriteFile, replace bool)
func (*SCloudConfig) RemoveUser ¶
func (conf *SCloudConfig) RemoveUser(u SUser)
func (*SCloudConfig) UserData ¶
func (conf *SCloudConfig) UserData() string
func (*SCloudConfig) UserDataBase64 ¶
func (conf *SCloudConfig) UserDataBase64() string
func (*SCloudConfig) UserDataEc2 ¶
func (conf *SCloudConfig) UserDataEc2() string
func (*SCloudConfig) UserDataPowerShell ¶
func (conf *SCloudConfig) UserDataPowerShell() string
func (*SCloudConfig) UserDataScript ¶
func (conf *SCloudConfig) UserDataScript() string
func (*SCloudConfig) UserDataScriptBase64 ¶
func (conf *SCloudConfig) UserDataScriptBase64() string
type SPhoneHome ¶
type SPhoneHome struct {
Url string
}
type SUser ¶
type SUser struct { Name string PlainTextPasswd string HashedPasswd string LockPasswd bool SshAuthorizedKeys []string Sudo string }
func (*SUser) PowerShellScripts ¶
func (*SUser) ShellScripts ¶
func (*SUser) SudoPolicy ¶
func (u *SUser) SudoPolicy(policy TSudoPolicy) *SUser
type SWriteFile ¶
type SWriteFile struct { Path string Permissions string Owner string Encoding string Content string }
func NewWriteFile ¶
func (*SWriteFile) ShellScripts ¶
func (wf *SWriteFile) ShellScripts() []string
type TSshPwauth ¶
type TSshPwauth string
type TSudoPolicy ¶
type TSudoPolicy string
Click to show internal directories.
Click to hide internal directories.