Documentation ¶
Index ¶
Constants ¶
const ChefVersion = "11.12.0"
ChefVersion that we pretend to emulate
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// contains filtered or unexported fields
}
AuthConfig representing a client and a private key used for encryption
func (AuthConfig) SignRequest ¶
func (ac AuthConfig) SignRequest(request *http.Request) error
SignRequest modifies headers of an http.Request
type Client ¶
type Client struct { Auth *AuthConfig BaseURL *url.URL Environments *EnvironmentService Nodes *NodeService // contains filtered or unexported fields }
Client is vessel for public methods used against the chef-server
type Cookbook ¶
type Cookbook struct { *Reader // contains filtered or unexported fields }
Cookbook is the chef-cookbook container
func NewCookbook ¶
NewCookbook is used to create a cookbook from a Reader
type CookbookItem ¶
type CookbookItem struct { Url string `mapstructure:"url"` Path string `mapstructure:"path"` Name string `mapstructure:"name"` Checksum string `mapstructure:"checksum"` Specificity string `mapstructure:"specificity"` }
Each Cookbook lists it's files as a cookbookItem. This structure captures those and makes it easier to work with cook data
type CookbookMeta ¶
type CookbookMeta struct { Name string `mapstructure:"cookbook_name"` Version string `mapstructure:"version"` Description string `mapstructure:"description"` LongDescription string `mapstructure:"long_description"` Maintainer string `mapstructure:"maintainer"` MaintainerEmail string `mapstructure:"maintainer_email"` License string `mapstructure:"license"` Platforms map[string]string `mapstructure:"platforms"` Depends map[string]string `mapstructure:"dependencies"` Reccomends map[string]string `mapstructure:"recommendations"` Suggests map[string]string `mapstructure:"suggestions"` Conflicts map[string]string `mapstructure:"conflicting"` Provides map[string]string `mapstructure:"providing"` Replaces map[string]string `mapstructure:"replacing"` // contains filtered or unexported fields }
CookbookMeta represents a Golang version of cookbook metadata
type Environment ¶
type Environment struct { Name string `json:"name"` Description string `json:"description"` ChefType string `json:"chef_type"` DefaultAttributes interface{} `json:"default_attributes"` OverrideAttributes interface{} `json:"override_attributes"` JsonClass string `json:"json_class"` CookbookVersions interface{} `json:"cookbook_versions"` }
Environment represents the native Go version of the deserialized Environment type
type EnvironmentService ¶
type EnvironmentService struct {
// contains filtered or unexported fields
}
Environment has a Reader, hey presto
func (*EnvironmentService) Get ¶
func (e *EnvironmentService) Get(name string) (*Environment, error)
Get gets an environment from the Chef server.
Chef API docs: http://docs.opscode.com/api_chef_server.html#id17
func (*EnvironmentService) List ¶
func (e *EnvironmentService) List() (data map[string]string, err error)
List lists the environments in the Chef server.
Chef API docs: http://docs.opscode.com/api_chef_server.html#id14
type Node ¶
type Node struct { Name string `json:"name"` Environment string `json:"chef_environment"` ChefType string `json:"chef_type"` AutomaticAttributes map[string]interface{} `json:"automatic"` NormalAttributes map[string]interface{} `json:"normal"` DefaultAttributes map[string]interface{} `json:"default"` OverrideAttributes map[string]interface{} `json:"override"` JsonClass string `json:"json_class"` RunList []string `json:"run_list"` }
Node represents the native Go version of the deserialized Node type
type NodeService ¶
type NodeService struct {
// contains filtered or unexported fields
}
func (*NodeService) Get ¶
func (e *NodeService) Get(name string) (*Node, error)
Get gets a node from the Chef server.
Chef API docs: http://docs.opscode.com/api_chef_server.html#id28
func (*NodeService) List ¶
func (e *NodeService) List() (data map[string]string, err error)
List lists the nodes in the Chef server.
Chef API docs: http://docs.opscode.com/api_chef_server.html#id25