chefapi_client

package module
v0.0.0-...-4e6b783 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 3, 2020 License: Apache-2.0 Imports: 8 Imported by: 1

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.

Variable Purpose Required
CHEFAPICHEFUSER Specify the Chef user name Yes
CHEFAPIKEYFILE File containing the user's private Chef key Yes
CHEFAPICHRURL The Chef Server URL Yes
CHEFAPICERTFILE SSL Certificate for the Chef Server, used for self signed certificates No

Documentation

Overview

Test the go-chef/chef chef server api /organizations endpoints against a live server

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *chef.Client

client for the chef server api

func OrgClient

func OrgClient(organization string) *chef.Client

client for the chef server api add organization

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL