client

package
v0.0.0-...-2f10430 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2015 License: BSD-2-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package client implements the a Go client for CFSSL API commands.

Index

Constants

View Source
const (
	// StrategyInvalid indicates any strategy that is unsupported
	// or returned when no strategy is applicable.
	StrategyInvalid = iota

	// StrategyOrderedList is a sequential list of servers: if the
	// first server cannot be reached, the next is used. The
	// client will proceed in this manner until the list of
	// servers is exhausted, and then an error is returned.
	StrategyOrderedList
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Remote

type Remote interface {
	AuthSign(req, id []byte, provider auth.Provider) ([]byte, error)
	Sign(jsonData []byte) ([]byte, error)
	Info(jsonData []byte) (*info.Resp, error)
}

A Remote points to at least one (but possibly multiple) remote CFSSL instances.

func NewGroup

func NewGroup(remotes []string, strategy Strategy) (Remote, error)

NewGroup will use the collection of remotes specified with the given strategy.

func NewServer

func NewServer(addr string) Remote

NewServer sets up a new server target. The address should be the DNS name (or "name:port") of the remote CFSSL instance. If no port is specified, the CFSSL default port (8888) is used. If the name is a comma-separated list of hosts, an ordered group will be returned.

type SignResult

type SignResult struct {
	Certificate []byte `json:"certificate"`
}

SignResult is the result of signing a CSR.

type Strategy

type Strategy int

Strategy is the means by which the server to use as a remote should be selected.

func StrategyFromString

func StrategyFromString(s string) Strategy

StrategyFromString takes a string describing a

Jump to

Keyboard shortcuts

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