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) UserData() string
- func (conf *SCloudConfig) UserDataBase64() string
- type SPhoneHome
- type SUser
- type SWriteFile
- type TSudoPolicy
Constants ¶
View Source
const ( CLOUD_CONFIG_HEADER = "#cloud-config\n" USER_SUDO_NOPASSWD = TSudoPolicy("sudo_nopasswd") USER_SUDO = TSudoPolicy("sudo") USER_SUDO_DENY = TSudoPolicy("sudo_deny") USER_SUDO_NONE = TSudoPolicy("") )
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 int }
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) UserData ¶
func (conf *SCloudConfig) UserData() string
func (*SCloudConfig) UserDataBase64 ¶
func (conf *SCloudConfig) UserDataBase64() string
type SPhoneHome ¶
type SPhoneHome struct {
Url string
}
type SUser ¶
type SUser struct { Name string Passwd string LockPassword string SshAuthorizedKeys []string Sudo string }
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 ¶
type TSudoPolicy ¶
type TSudoPolicy string
Click to show internal directories.
Click to hide internal directories.