cloudconfig

package
v0.0.0-...-b3ee267 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 28, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

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)

type File

type File struct {
	Content     string `json:"content"`
	Owner       string `json:"owner"`
	Path        string `json:"path"`
	Permissions string `json:"permissions"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL