// readme

cinc-api

A modern, idiomatic Go client for the Chef Infra / CINC Server API.

Install

go get github.com/cinc-project/cinc-api

Usage

key, _ := cinc.LoadKeyFile("/etc/chef/client.pem")
c, err := cinc.NewClient(cinc.Config{
    ServerURL:  "https://chef.example.com",
    Org:        "myorg",
    ClientName: "node1",
    Key:        key,
})
node, _, err := c.Nodes.Get(context.Background(), "web01")

Status

Authentication uses the Chef v1.3 SHA-256 signed-header protocol. The following endpoint families are implemented:

ServicePathMethods
c.ACLs/<object>/<name>/_aclGetTarget / SetTargetPermission / Grant / Revoke on an ACLTarget (ObjectACL, OrgACL, UserACL); Get / SetPermission, GetOrg / SetOrgPermission and GetUser / SetUserPermission
c.Associations/organizations/O/users, /association_requests, /users/U/...Members…