Documentation
¶
Index ¶
- Constants
- type CloudConfig
- func (c *CloudConfig) AddCommand(cmd ...string)
- func (c *CloudConfig) AddCommands(cmds ...[]string)
- func (c *CloudConfig) AddFile(f File)
- func (c *CloudConfig) AddPackages(pkgs ...string)
- func (c *CloudConfig) AddScript(p, s string)
- func (c *CloudConfig) AddShellCommand(cmd string)
- func (c *CloudConfig) Encode() (string, error)
- func (c *CloudConfig) RunScript(name, s string)
- type File
Constants ¶
View Source
const ( Header = "#cloud-config" Shell = "/bin/bash" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudConfig ¶
type CloudConfig struct { Commands []interface{} `json:"runcmd"` Packages []string `json:"packages"` WriteFiles []File `json:"write_files"` }
func DecodeCloudConfig ¶
func DecodeCloudConfig(s string) (*CloudConfig, error)
func New ¶
func New() *CloudConfig
func (*CloudConfig) AddCommand ¶
func (c *CloudConfig) AddCommand(cmd ...string)
func (*CloudConfig) AddCommands ¶
func (c *CloudConfig) AddCommands(cmds ...[]string)
func (*CloudConfig) AddFile ¶
func (c *CloudConfig) AddFile(f File)
func (*CloudConfig) AddPackages ¶
func (c *CloudConfig) AddPackages(pkgs ...string)
func (*CloudConfig) AddScript ¶
func (c *CloudConfig) AddScript(p, s string)
func (*CloudConfig) AddShellCommand ¶
func (c *CloudConfig) AddShellCommand(cmd string)
func (*CloudConfig) Encode ¶
func (c *CloudConfig) Encode() (string, error)
func (*CloudConfig) RunScript ¶
func (c *CloudConfig) RunScript(name, s string)
Click to show internal directories.
Click to hide internal directories.