Categorygithub.com/markgibbons/chefapi_client
repositorypackage
0.0.0-20200503181130-4e6b78320cfc
Repository: https://github.com/markgibbons/chefapi_client.git
Documentation: pkg.go.dev

# README

Chefapi_client

The chefapi_client code is imported by other chefapi go modules. It sets up a go-chef/chef Client with the correct base url, depending on the desired use, adds credentials and handles TLS certificates.

Use

import "github/MarkGibbons/chefapi_client

Functions

  • Client() Creates a client. This client is suitable for global Chef Server API REST calls.
  • Clients(Org string) Creates a client for Chef Server API REST calls for the specified organization.

Both Client and ClientOrg expect environment variables to be defined in order to specify the credentials needed to talk to the Chef Infra Server.

VariablePurposeRequired
CHEFAPICHEFUSERSpecify the Chef user nameYes
CHEFAPIKEYFILEFile containing the user's private Chef keyYes
CHEFAPICHRURLThe Chef Server URLYes
CHEFAPICERTFILESSL Certificate for the Chef Server, used for self signed certificatesNo