Documentation ¶
Overview ¶
Package environment provides... environments. They're like roles, but more so, except without run lists. They're a convenient way to share many attributes and cookbook version constraints among many servers.
Index ¶
- func GetList() []string
- func MakeDefaultEnvironment()
- type ChefEnvironment
- func (e *ChefEnvironment) AllCookbookHash(num_versions interface{}) map[string]interface{}
- func (e *ChefEnvironment) Delete() error
- func (e *ChefEnvironment) DocId() string
- func (e *ChefEnvironment) Flatten() []string
- func (e *ChefEnvironment) GetName() string
- func (e *ChefEnvironment) Index() string
- func (e *ChefEnvironment) RecipeList() []string
- func (e *ChefEnvironment) Save() error
- func (e *ChefEnvironment) URLType() string
- func (e *ChefEnvironment) UpdateFromJson(json_env map[string]interface{}) util.Gerror
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeDefaultEnvironment ¶
func MakeDefaultEnvironment()
Creates the default environment on startup
Types ¶
type ChefEnvironment ¶
type ChefEnvironment struct { Name string `json:"name"` ChefType string `json:"chef_type"` JsonClass string `json:"json_class"` Description string `json:"description"` Default map[string]interface{} `json:"default_attributes"` Override map[string]interface{} `json:"override_attributes"` CookbookVersions map[string]string `json:"cookbook_versions"` }
func Get ¶
func Get(env_name string) (*ChefEnvironment, error)
func NewFromJson ¶
func NewFromJson(json_env map[string]interface{}) (*ChefEnvironment, util.Gerror)
Create a new environment from JSON uploaded to the server.
func (*ChefEnvironment) AllCookbookHash ¶
func (e *ChefEnvironment) AllCookbookHash(num_versions interface{}) map[string]interface{}
Gets a list of the cookbooks and their versions available to this environment.
func (*ChefEnvironment) Delete ¶
func (e *ChefEnvironment) Delete() error
func (*ChefEnvironment) DocId ¶
func (e *ChefEnvironment) DocId() string
func (*ChefEnvironment) Flatten ¶
func (e *ChefEnvironment) Flatten() []string
func (*ChefEnvironment) GetName ¶
func (e *ChefEnvironment) GetName() string
func (*ChefEnvironment) Index ¶
func (e *ChefEnvironment) Index() string
func (*ChefEnvironment) RecipeList ¶
func (e *ChefEnvironment) RecipeList() []string
Gets a list of recipes available to this environment.
func (*ChefEnvironment) Save ¶
func (e *ChefEnvironment) Save() error
func (*ChefEnvironment) URLType ¶
func (e *ChefEnvironment) URLType() string
func (*ChefEnvironment) UpdateFromJson ¶
func (e *ChefEnvironment) UpdateFromJson(json_env map[string]interface{}) util.Gerror
Updates an existing environment from JSON uploaded to the server.
Click to show internal directories.
Click to hide internal directories.