cf

package
v0.0.0-...-7c9d587 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildClientConfigFromEnvironment

func BuildClientConfigFromEnvironment(env []string) (map[string]gocf.Config, error)

BuildClientConfigFromEnvironment looks at environment variables then creates a client configuration for each foundation and returns a map, mapping the foundation name to the config

func BuildClientsFromEnvironment

func BuildClientsFromEnvironment(env []string) (map[string]IClient, error)

BuildClientsFromEnvironment looks at environment variables then instantiates a client for each foundation and returns a map, mapping the foundation name to client

Types

type Client

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

Client is the concrete implemnetation of Client

func (*Client) GetBuildpacks

func (client *Client) GetBuildpacks() (map[string]gocf.Buildpack, error)

GetBuildpacks returns a map of buildpack GUID to buildpack details

func (*Client) GetOrgs

func (client *Client) GetOrgs() (map[string]gocf.Org, error)

GetOrgs returns a map of org GUID to org details

func (*Client) GetSpaces

func (client *Client) GetSpaces() (map[string]gocf.Space, error)

GetSpaces returns a map of space GUID to space details

func (*Client) ListApps

func (client *Client) ListApps() ([]gocf.App, error)

ListApps returns the currently deployed apps

func (*Client) ReAuth

func (client *Client) ReAuth() error

Reauthenticates the client with the api

type IClient

type IClient interface {
	ReAuth() error
	ListApps() ([]gocf.App, error)
	GetBuildpacks() (map[string]gocf.Buildpack, error)
	GetOrgs() (map[string]gocf.Org, error)
	GetSpaces() (map[string]gocf.Space, error)
}

IClient is an interface forthe Cloud Foundry API

Jump to

Keyboard shortcuts

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