config

package
v0.0.73 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: Apache-2.0 Imports: 5 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 interface {
	Environment() string
	Environments() []Environment
	ResolveEnvironment(urlOrAlias string) string
	SetEnvironment(urlOrAlias, alias, caCert string) Config

	CACert(url string) string

	Credentials(url string) Creds
	SetCredentials(url string, creds Creds) Config
	UnsetCredentials(url string) Config

	Deployment(url string) string
	SetDeployment(url, nameOrPath string) Config

	Save() error
}

type Creds

type Creds struct {
	Username string
	Password string

	// For UAA clients
	Client       string
	ClientSecret string

	// For UAA users
	RefreshToken string
}

func (Creds) Description

func (c Creds) Description() string

func (Creds) IsBasic

func (c Creds) IsBasic() bool

func (Creds) IsBasicComplete

func (c Creds) IsBasicComplete() bool

func (Creds) IsUAA

func (c Creds) IsUAA() bool

func (Creds) IsUAAClient

func (c Creds) IsUAAClient() bool

type Environment

type Environment struct {
	URL   string
	Alias string
}

type FSConfig

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

func NewFSConfigFromPath

func NewFSConfigFromPath(path string, fs boshsys.FileSystem) (FSConfig, error)

func (FSConfig) CACert

func (c FSConfig) CACert(urlOrAlias string) string

func (FSConfig) Credentials

func (c FSConfig) Credentials(urlOrAlias string) Creds

func (FSConfig) Deployment

func (c FSConfig) Deployment(urlOrAlias string) string

func (FSConfig) Environment

func (c FSConfig) Environment() string

func (FSConfig) Environments

func (c FSConfig) Environments() []Environment

func (FSConfig) ResolveEnvironment

func (c FSConfig) ResolveEnvironment(urlOrAlias string) string

func (FSConfig) Save

func (c FSConfig) Save() error

func (FSConfig) SetCredentials

func (c FSConfig) SetCredentials(urlOrAlias string, creds Creds) Config

func (FSConfig) SetDeployment

func (c FSConfig) SetDeployment(urlOrAlias, nameOrPath string) Config

func (FSConfig) SetEnvironment

func (c FSConfig) SetEnvironment(urlOrAlias, alias, caCert string) Config

func (FSConfig) UnsetCredentials

func (c FSConfig) UnsetCredentials(urlOrAlias string) Config

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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