config

package
v0.0.126 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 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 {
	Environments() []Environment
	ResolveEnvironment(urlOrAlias string) string
	AliasEnvironment(url, alias, caCert string) (Config, error)

	CACert(url string) string

	Credentials(url string) Creds
	SetCredentials(url string, creds Creds) Config
	UnsetCredentials(url 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) AliasEnvironment added in v0.0.96

func (c FSConfig) AliasEnvironment(url, alias, caCert string) (Config, error)

func (FSConfig) CACert

func (c FSConfig) CACert(urlOrAlias string) string

func (FSConfig) Credentials

func (c FSConfig) Credentials(urlOrAlias string) Creds

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) 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