metadata

package
v0.0.0-...-2d45578 Latest Latest
Warning

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

Go to latest
Published: May 1, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fetch

func Fetch(conf config.Config) (metadata string, err error)

func Json

func Json(metadata string, key string) (j string, err error)

Types

type Authentication

type Authentication struct {
	AccessKeyId string   `json:"accessKeyId"`
	Buckets     []string `json:"buckets"`
	Password    string   `json:"password"`
	SecretKey   string   `json:"secretKey"`
	Type        string   `json:"type"`
	Uris        []string `json:"uris"`
	Username    string   `json:"username"`
	RoleName    string   `json:"roleName"`
}

type Command

type Command struct {
	Command             string            `json:"command"`
	Env                 map[string]string `json:"env"`
	Cwd                 string            `json:"cwd"`
	Test                string            `json:"test"`
	IgnoreErrors        JavaScriptBoolean `json:"ignoreErrors"`
	WaitAfterCompletion JavaScriptBoolean `json:"waitAfterCompletion"`
}

type Config

type Config struct {
	Packages map[string]*Package `json:"packages"`
	Groups   map[string]*Group   `json:"groups"`
	Users    map[string]*User    `json:"users"`
	Sources  map[string]string   `json:"sources"`
	Files    map[string]*File    `json:"files"`
	Commands map[string]*Command `json:"commands"`
	Services *ServiceManager     `json:"services"`
}

Arranged in order of execution

type Configs

type Configs struct {
	Configs map[string]*Config `json:"AWS::CloudFormation::Init"`
}

To fetch the map of configs when configSets != nil

type File

type File struct {
	Content        string                     `json:"content"`
	Source         string                     `json:"source"`
	Encoding       string                     `json:"encoding"`
	Group          string                     `json:"group"`
	Owner          string                     `json:"owner"`
	Mode           string                     `json:"mode"`
	Authentication string                     `json:"authentication"`
	Context        map[string]json.RawMessage `json:"context"`
}

type Group

type Group struct {
	Gid string `json:"gid"`
}

type Init

type Init struct {
	ConfigSets map[string][]interface{} `json:"configSets"`
	Configs    map[string]*Config       `json:"-"`
}

Skips Configs which will be picked up on the second run

type JavaScriptBoolean

type JavaScriptBoolean bool

func (*JavaScriptBoolean) UnmarshalJSON

func (bit *JavaScriptBoolean) UnmarshalJSON(data []byte) error

type Metadata

type Metadata struct {
	Authentication map[string]*Authentication `json:"AWS::CloudFormation::Authentication"`
	Init           *Init                      `json:"AWS::CloudFormation::Init"`
}

func Parse

func Parse(metadata string) (m Metadata, err error)

type Package

type Package struct {
	Msi      map[string]string   `json:"msi"`
	Rpm      map[string]string   `json:"rpm"`
	Yum      map[string][]string `json:"yum"`
	Apt      map[string][]string `json:"apt"`
	Python   map[string][]string `json:"python"`
	RubyGems map[string][]string `json:"rubygems"`
}

type Service

type Service struct {
	EnsureRunning JavaScriptBoolean   `json:"ensureRunning"`
	Enabled       JavaScriptBoolean   `json:"enabled"`
	Files         []string            `json:"files"`
	Sources       []string            `json:"sources"`
	Packages      map[string][]string `json:"packages"`
	Commands      []string            `json:"commands"`
}

type ServiceManager

type ServiceManager struct {
	SysVInit map[string]*Service `json:"sysvinit"`
	Windows  map[string]*Service `json:"windows"`
}

type User

type User struct {
	Uid     string   `json:"uid"`
	Groups  []string `json:"groups"`
	HomeDir string   `json:"homeDir"`
}

Jump to

Keyboard shortcuts

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