Documentation ¶
Index ¶
- type SCloudConfig
- func (c *SCloudConfig) AddConfig(name, cfg string)
- func (c *SCloudConfig) AddPartition(dev, mtpath, fs string)
- func (c *SCloudConfig) AddSwap(dev string)
- func (c *SCloudConfig) AddUnits(name string, mask, enable, runtime *bool, content, command string, ...)
- func (c *SCloudConfig) AddUser(name, passwd string, pubkeys []string, nohash bool)
- func (c *SCloudConfig) AddWriteFile(spath, content, prem, owner string, base64 bool)
- func (c *SCloudConfig) HasUser(name string) bool
- func (c *SCloudConfig) HasWriteFile(spath string) bool
- func (c *SCloudConfig) SetEtcHosts(line string)
- func (c *SCloudConfig) SetHostname(hn string)
- func (c *SCloudConfig) SetTimezone(tz string)
- func (c *SCloudConfig) String() string
- func (c *SCloudConfig) YunionInit()
- type SUnitDropins
- type SUnits
- type SUser
- type SWriteFile
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SCloudConfig ¶
type SCloudConfig struct { Hostname string `yaml:"hostname,omitempty"` Users []SUser `yaml:"users,omitempty"` Coreos map[string]interface{} `yaml:"coreos,omitempty"` WriteFiles []SWriteFile `yaml:"write_files,omitempty"` ManageEtcHosts string `yaml:"manage_etc_hosts,omitempty"` }
func NewCloudConfig ¶
func NewCloudConfig() *SCloudConfig
func (*SCloudConfig) AddConfig ¶
func (c *SCloudConfig) AddConfig(name, cfg string)
func (*SCloudConfig) AddPartition ¶
func (c *SCloudConfig) AddPartition(dev, mtpath, fs string)
func (*SCloudConfig) AddSwap ¶
func (c *SCloudConfig) AddSwap(dev string)
func (*SCloudConfig) AddUnits ¶
func (c *SCloudConfig) AddUnits(name string, mask, enable, runtime *bool, content, command string, dropins *SUnitDropins)
func (*SCloudConfig) AddUser ¶
func (c *SCloudConfig) AddUser(name, passwd string, pubkeys []string, nohash bool)
func (*SCloudConfig) AddWriteFile ¶
func (c *SCloudConfig) AddWriteFile(spath, content, prem, owner string, base64 bool)
func (*SCloudConfig) HasUser ¶
func (c *SCloudConfig) HasUser(name string) bool
func (*SCloudConfig) HasWriteFile ¶
func (c *SCloudConfig) HasWriteFile(spath string) bool
func (*SCloudConfig) SetEtcHosts ¶
func (c *SCloudConfig) SetEtcHosts(line string)
func (*SCloudConfig) SetHostname ¶
func (c *SCloudConfig) SetHostname(hn string)
func (*SCloudConfig) SetTimezone ¶
func (c *SCloudConfig) SetTimezone(tz string)
func (*SCloudConfig) String ¶
func (c *SCloudConfig) String() string
func (*SCloudConfig) YunionInit ¶
func (c *SCloudConfig) YunionInit()
type SUnitDropins ¶
type SUser ¶
type SWriteFile ¶
type SWriteFile struct { Path string `yaml:"path,omitempty"` Content string `yaml:"content,omitempty"` Permissions string `yaml:"permissions,omitempty"` Owner string `yaml:"owner,omitempty"` Encoding string `yaml:"encoding,omitempty"` }
func NewWriteFile ¶
func NewWriteFile(spath, content, perm, owner string, isbase64 bool) SWriteFile
Click to show internal directories.
Click to hide internal directories.