cfconfig

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	API               string
	SSLSkipValidation bool
	Username          string
	Password          string
	UAAClientID       string
	UAAClientSecret   string
	AccessToken       string

	// Initially provision all services instances into one CF space
	OrganizationGUID string
	SpaceGUID        string
	BindingAppName   string

	HTTPClient *http.Client

	// Marketplace is the cache of services/plans offered by the target Cloud Foundry
	Marketplace []brokerapi.Service

	// AppGUID for the empty binding app (see cfconfig.CreateBindingApp)
	BindingAppGUID string
}

Config contains the initial configuration for a target Cloud Foundry environment

func NewConfigFromEnvVars

func NewConfigFromEnvVars() (config *Config)

NewConfigFromEnvVars constructs a Config from environment variables

func (*Config) Client

func (config *Config) Client() (cfclient *cf.Client, err error)

func (*Config) CreateBindingApp

func (config *Config) CreateBindingApp()

CreateBindingApp creates a dummy Cloud Foundry application within the target space. If application already exists, it does nothing.

func (*Config) DiscoverMarketplace

func (config *Config) DiscoverMarketplace()

DiscoverMarketplace fetches all Services & Plans and constructs this OSBAPI /v2/catalog of provided services

When written, it was assumed this function was only run once during start up. So it exits the application rather than return an error.

Jump to

Keyboard shortcuts

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