chef

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2015 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PathIsCookbook

func PathIsCookbook(cookbookPath string) bool

Types

type BerksCookbook

type BerksCookbook struct {
	Branch   string `json:"branch"`
	Name     string `json:"name"`
	Git      string `json:"git"`
	Path     string `json:"path"`
	Ref      string `json:"ref"`
	Revision string `json:"revision"`
	Tag      string `json:"tag"`
}

func (*BerksCookbook) String

func (c *BerksCookbook) String() string

type BerksFile

type BerksFile struct {
	Cookbooks map[string]BerksCookbook
}

func BerksFromFile

func BerksFromFile(f string) (BerksFile, error)

Read a berkshelf file and return a berks struct

func (*BerksFile) Append

func (b *BerksFile) Append(f string, deps []BerksCookbook) []string

Append Dependencies to a Berksfile

func (*BerksFile) Parse

func (b *BerksFile) Parse(r io.Reader)

Parse the Berksfile

type Cookbook

type Cookbook struct {
	*fastfood.Helpers
	Berks        BerksFile
	Dependencies map[string]CookbookDependency
	Name         string
	Path         string
	Target       OSTarget
	Year         int
}

func NewCookbook

func NewCookbook(cookbookPath string, name string) Cookbook

Returns a new empty cookbook

func NewCookbookFromPath

func NewCookbookFromPath(cookbookPath string) (Cookbook, error)

Given a cookbook path, return a cookbook struct pre-populated

func (*Cookbook) AppendDependencies

func (c *Cookbook) AppendDependencies(dependencies map[string]CookbookDependency) []string

Returns a list of dependencies that were written

func (*Cookbook) ParseMetadata

func (c *Cookbook) ParseMetadata(r io.Reader)

type CookbookDependency added in v0.3.0

type CookbookDependency struct {
	Name    string
	Options []string
}

func (*CookbookDependency) String added in v0.3.0

func (d *CookbookDependency) String() string

type OSTarget

type OSTarget struct {
	Distro  string
	Version string
}

type Options

type Options struct {
	BerksDeps    map[string]BerksCookbook      `json:"berks_dependencies"`
	Dependencies map[string]CookbookDependency `json:"dependencies"`
	Directories  []string                      `json:"directories"`
	Files        map[string]string             `json:"files"`
	Partials     []string
}

func Merge

func Merge(global Options, local Options) Options

Merge Two stencils together giving local a higher priority

func NewOptions

func NewOptions(conf []byte) (Options, error)

Given the framework information create the framework stencil

Jump to

Keyboard shortcuts

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