director

package
v0.0.0-...-77965aa Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

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 represents a low-level wrapper for bosh director

func NewClient

func NewClient(creds Credentials) (*Client, error)

NewClient returns a new client

func (*Client) Cleanup

func (client *Client) Cleanup() error

Cleanup removes tempfiles

func (*Client) PathInWorkingDir

func (client *Client) PathInWorkingDir(filename string) string

PathInWorkingDir returns a path for the file in the directos' working directory

func (*Client) RunAuthenticatedCommand

func (client *Client) RunAuthenticatedCommand(stdout, stderr io.Writer, args ...string) error

RunAuthenticatedCommand runs a command against the bosh director, after authenticating

func (*Client) RunCommand

func (client *Client) RunCommand(stdout, stderr io.Writer, args ...string) error

RunCommand runs a command against the bosh director https://github.com/cloudfoundry/bosh-cli/blob/master/main.go

func (*Client) SaveFileToWorkingDir

func (client *Client) SaveFileToWorkingDir(filename string, contents []byte) (string, error)

SaveFileToWorkingDir saves thegiven file to the temporary director working directory

type Credentials

type Credentials struct {
	Username string
	Password string
	Host     string
	CACert   string
}

Credentials represent credentials for connecting to bosh director

type IClient

type IClient interface {
	RunCommand(stdout, stderr io.Writer, args ...string) error
	RunAuthenticatedCommand(stdout, stderr io.Writer, args ...string) error
	SaveFileToWorkingDir(path string, contents []byte) (string, error)
	PathInWorkingDir(filename string) string
	Cleanup() error
}

IClient represents a bosh director client

Jump to

Keyboard shortcuts

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