Versions in this module Expand all Collapse all v0 v0.1.1 Dec 9, 2015 v0.1.0 Sep 7, 2015 Changes in this version + const ChefVersion + func Base64BlockEncode(content []byte, limit int) []string + func CheckResponse(r *http.Response) error + func GenerateSignature(priv *rsa.PrivateKey, data string) (enc []byte, err error) + func HashStr(toHash string) string + func JSONReader(v interface{}) (r io.Reader, err error) + func PrivateKeyFromString(key []byte) (*rsa.PrivateKey, error) + type ACL map[string]ACLitems + func NewACL(acltype string, actors, groups ACLitem) (acl *ACL) + type ACLService struct + func (a *ACLService) Get(subkind string, name string) (acl ACL, err error) + func (a *ACLService) Put(subkind, name string, acltype string, item *ACL) (err error) + type ACLitem []string + type ACLitems struct + Actors ACLitem + Groups ACLitem + type ApiClient struct + Admin bool + Certificate string + ChefType string + ClientName string + JsonClass string + Name string + OrgName string + PrivateKey string + PublicKey string + Uri string + Validator bool + type ApiClientCreateResult struct + PrivateKey string + Uri string + type ApiClientListResult map[string]string + func (c ApiClientListResult) String() (out string) + type ApiClientService struct + func (e *ApiClientService) Create(clientName string, admin bool) (data *ApiClientCreateResult, err error) + func (e *ApiClientService) Delete(name string) (err error) + func (e *ApiClientService) Get(name string) (client ApiClient, err error) + func (e *ApiClientService) List() (data ApiClientListResult, err error) + type ApiNewClient struct + Admin bool + Name string + type AuthConfig struct + ClientName string + PrivateKey *rsa.PrivateKey + func (ac AuthConfig) SignRequest(request *http.Request) error + type Body struct + func (body *Body) Buffer() *bytes.Buffer + func (body *Body) ContentType() string + func (body *Body) Hash() (h string) + type Client struct + ACLs *ACLService + Auth *AuthConfig + BaseURL *url.URL + Clients *ApiClientService + Cookbooks *CookbookService + DataBags *DataBagService + Environments *EnvironmentService + Nodes *NodeService + Roles *RoleService + Sandboxes *SandboxService + Search *SearchService + func NewClient(cfg *Config) (*Client, error) + func (c *Client) Do(req *http.Request, v interface{}) (*http.Response, error) + func (c *Client) NewRequest(method string, requestUrl string, body io.Reader) (*http.Request, error) + type Config struct + BaseURL string + Key string + Name string + SkipSSL bool + Timeout time.Duration + type Cookbook struct + Attributes []CookbookItem + ChefType string + CookbookName string + Definitions []CookbookItem + Files []CookbookItem + Frozen bool + JsonClass string + Libraries []CookbookItem + Metadata CookbookMeta + Name string + Providers []CookbookItem + Recipes []CookbookItem + Resources []CookbookItem + RootFiles []CookbookItem + Templates []CookbookItem + Version string + type CookbookItem struct + Checksum string + Name string + Path string + Specificity string + Url string + type CookbookListResult map[string]CookbookVersions + func (c CookbookListResult) String() (out string) + type CookbookMeta struct + Attributes map[string]interface{} + Conflicts map[string]string + Depends map[string]string + Description string + Groupings map[string]interface{} + License string + LongDescription string + Maintainer string + MaintainerEmail string + Name string + Platforms map[string]string + Provides map[string]string + Reccomends map[string]string + Recipes map[string]string + Replaces map[string]string + Suggests map[string]string + Version string + type CookbookService struct + func (c *CookbookService) Delete(name, version string) (err error) + func (c *CookbookService) Get(name string) (data CookbookVersion, err error) + func (c *CookbookService) GetAvailableVersions(name, numVersions string) (data CookbookListResult, err error) + func (c *CookbookService) GetVersion(name, version string) (data Cookbook, err error) + func (c *CookbookService) List() (CookbookListResult, error) + func (c *CookbookService) ListAvailableVersions(numVersions string) (data CookbookListResult, err error) + type CookbookVersion struct + Url string + Version string + type CookbookVersions struct + Url string + Versions []CookbookVersion + type DataBag struct + ChefType string + JsonClass string + Name string + type DataBagCreateResult struct + URI string + type DataBagItem interface + type DataBagListResult map[string]string + func (d DataBagListResult) String() (out string) + type DataBagService struct + func (d *DataBagService) Create(databag *DataBag) (result *DataBagCreateResult, err error) + func (d *DataBagService) CreateItem(databagName string, databagItem DataBagItem) (err error) + func (d *DataBagService) Delete(name string) (result *DataBag, err error) + func (d *DataBagService) DeleteItem(databagName, databagItem string) (err error) + func (d *DataBagService) GetItem(databagName, databagItem string) (item DataBagItem, err error) + func (d *DataBagService) List() (data *DataBagListResult, err error) + func (d *DataBagService) ListItems(name string) (data *DataBagListResult, err error) + func (d *DataBagService) UpdateItem(databagName, databagItemId string, databagItem DataBagItem) (err error) + type Environment struct + Attributes interface{} + ChefType string + CookbookVersions map[string]string + DefaultAttributes interface{} + Description string + JsonClass string + Name string + OverrideAttributes interface{} + type EnvironmentCookbookResult map[string]CookbookVersions + type EnvironmentResult map[string]string + func (e EnvironmentResult) String() (out string) + type EnvironmentService struct + func (e *EnvironmentService) Create(environment *Environment) (data *EnvironmentResult, err error) + func (e *EnvironmentService) Get(name string) (data *Environment, err error) + func (e *EnvironmentService) List() (data *EnvironmentResult, err error) + func (e *EnvironmentService) ListCookbooks(name string, numVersions string) (data EnvironmentCookbookResult, err error) + func (e *EnvironmentService) Put(environment *Environment) (data *Environment, err error) + type ErrorResponse struct + Response *http.Response + func (r *ErrorResponse) Error() string + type Node struct + AutomaticAttributes map[string]interface{} + ChefType string + DefaultAttributes map[string]interface{} + Environment string + JsonClass string + Name string + NormalAttributes map[string]interface{} + OverrideAttributes map[string]interface{} + RunList []string + func NewNode(name string) (node Node) + type NodeResult struct + Uri string + type NodeService struct + func (e *NodeService) Delete(name string) (err error) + func (e *NodeService) Get(name string) (node Node, err error) + func (e *NodeService) List() (data map[string]string, err error) + func (e *NodeService) Post(node Node) (data *NodeResult, err error) + func (e *NodeService) Put(n Node) (node Node, err error) + type Role struct + ChefType string + DefaultAttributes interface{} + Description string + JsonClass string + Name string + OverrideAttributes interface{} + RunList RunList + type RoleCreateResult map[string]string + func (e RoleCreateResult) String() (out string) + type RoleListResult map[string]string + func (e RoleListResult) String() (out string) + type RoleService struct + func (e *RoleService) Create(role *Role) (data *RoleCreateResult, err error) + func (e *RoleService) Get(name string) (data *Role, err error) + func (e *RoleService) List() (data *RoleListResult, err error) + func (e *RoleService) Put(role *Role) (data *Role, err error) + type RunList []string + type Sandbox struct + Checksums []string + Completed bool + CreationTime time.Time + ID string + Name string + type SandboxItem struct + Upload bool + Url string + type SandboxPostResponse struct + Checksums map[string]SandboxItem + ID string + Uri string + type SandboxRequest struct + Checksums map[string]interface{} + type SandboxService struct + func (s SandboxService) Post(sums []string) (data SandboxPostResponse, err error) + func (s SandboxService) Put(id string) (box Sandbox, err error) + type SearchQuery struct + Index string + Query string + Rows int + SortBy string + Start int + func (q SearchQuery) Do(client *Client) (res SearchResult, err error) + func (q SearchQuery) DoPartial(client *Client, params map[string]interface{}) (res SearchResult, err error) + func (q SearchQuery) String() string + type SearchResult struct + Rows []interface{} + Start int + Total int + type SearchService struct + func (e SearchService) Exec(idx, statement string) (res SearchResult, err error) + func (e SearchService) Indexes() (data map[string]string, err error) + func (e SearchService) NewQuery(idx, statement string) (query SearchQuery, err error) + func (e SearchService) PartialExec(idx, statement string, params map[string]interface{}) (res SearchResult, err error)