puppetca

package
v0.0.0-...-c3faf55 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is a Puppet CA client

func NewClient

func NewClient(baseURL, keyStr, certStr, caStr string) (c Client, err error)

NewClient returns a new Client

func (*Client) Delete

func (c *Client) Delete(path, env string, headers map[string]string) (string, error)

Delete performs a DELETE request

func (*Client) DeleteCertByName

func (c *Client) DeleteCertByName(nodename, env string) error

DeleteCertByName deletes the certificate of a given node

func (*Client) Do

func (c *Client) Do(req *http.Request, headers map[string]string) (string, error)

Do performs an HTTP request

func (*Client) Get

func (c *Client) Get(path, env string, headers map[string]string) (string, error)

Get performs a GET request

func (*Client) GetCertByName

func (c *Client) GetCertByName(nodename, env string) (string, error)

GetCertByName returns the certificate of a node by its name

func (*Client) GetRequest

func (c *Client) GetRequest(nodename, env string) (string, error)

GetRequest return a submitted CSR if any

func (*Client) Put

func (c *Client) Put(path, env, data string, headers map[string]string) (string, error)

Put performs a PUT request

func (*Client) SignRequest

func (c *Client) SignRequest(nodename, env string) error

SignRequest signs a CSR

func (*Client) SubmitRequest

func (c *Client) SubmitRequest(nodename, pem, env string) error

SubmitRequest submits a CSR

Jump to

Keyboard shortcuts

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