bosh

package
v4.9.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DIRECTOR_USERNAME    = "admin"
	DIRECTOR_INTERNAL_IP = "10.0.0.6"
)
View Source
const VERSION_DEV_BUILD = "[DEV BUILD]"

Variables

This section is empty.

Functions

func Asset

func Asset(name string) ([]byte, error)

Asset loads and returns the asset for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetDir

func AssetDir(name string) ([]string, error)

AssetDir returns the file names below a certain directory embedded in the file by go-bindata. For example if you run go-bindata on data/... and data contains the following hierarchy:

data/
  foo.txt
  img/
    a.png
    b.png

then AssetDir("data") would return []string{"foo.txt", "img"} AssetDir("data/img") would return []string{"a.png", "b.png"} AssetDir("foo.txt") and AssetDir("notexist") would return an error AssetDir("") will return []string{"data"}.

func AssetInfo

func AssetInfo(name string) (os.FileInfo, error)

AssetInfo loads and returns the asset info for the given name. It returns an error if the asset could not be found or could not be loaded.

func AssetNames

func AssetNames() []string

AssetNames returns the names of the assets.

func MustAsset

func MustAsset(name string) []byte

MustAsset is like Asset but panics when Asset would return an error. It simplifies safe initialization of global variables.

func RestoreAsset

func RestoreAsset(dir, name string) error

RestoreAsset restores an asset under the given directory

func RestoreAssets

func RestoreAssets(dir, name string) error

RestoreAssets restores an asset under the given directory recursively

Types

type AWSYAML

type AWSYAML struct {
	AZ                    string   `yaml:"az,omitempty"`
	SubnetID              string   `yaml:"subnet_id,omitempty"`
	AccessKeyID           string   `yaml:"access_key_id,omitempty"`
	SecretAccessKey       string   `yaml:"secret_access_key,omitempty"`
	IAMInstanceProfile    string   `yaml:"iam_instance_profile,omitempty"`
	DefaultKeyName        string   `yaml:"default_key_name,omitempty"`
	DefaultSecurityGroups []string `yaml:"default_security_groups,omitempty"`
	Region                string   `yaml:"region,omitempty"`
	PrivateKey            string   `yaml:"private_key,flow,omitempty"`
	KMSKeyARN             string   `yaml:"kms_key_arn,omitempty"`
}

type AzureYAML

type AzureYAML struct {
	VNetName             string `yaml:"vnet_name,omitempty"`
	SubnetName           string `yaml:"subnet_name,omitempty"`
	SubscriptionID       string `yaml:"subscription_id,omitempty"`
	TenantID             string `yaml:"tenant_id,omitempty"`
	ClientID             string `yaml:"client_id,omitempty"`
	ClientSecret         string `yaml:"client_secret,omitempty"`
	ResourceGroupName    string `yaml:"resource_group_name,omitempty"`
	StorageAccountName   string `yaml:"storage_account_name,omitempty"`
	DefaultSecurityGroup string `yaml:"default_security_group,omitempty"`
}

type BOSHVersionError

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

func NewBOSHVersionError

func NewBOSHVersionError(err error) BOSHVersionError

func (BOSHVersionError) Error

func (b BOSHVersionError) Error() string

type CIDRBlock

type CIDRBlock struct {
	CIDRSize int
	// contains filtered or unexported fields
}

func ParseCIDRBlock

func ParseCIDRBlock(cidrBlock string) (CIDRBlock, error)

func (CIDRBlock) GetFirstIP

func (c CIDRBlock) GetFirstIP() IP

func (CIDRBlock) GetLastIP

func (c CIDRBlock) GetLastIP() IP

type Client

type Client interface {
	UpdateCloudConfig(yaml []byte) error
	Info() (Info, error)
}

func NewClient

func NewClient(httpClient *http.Client, credhub bool, directorAddress, username, password, caCert string) Client

type ClientProvider

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

func NewClientProvider

func NewClientProvider(socks5Proxy socks5Proxy) ClientProvider

func (ClientProvider) Client

func (c ClientProvider) Client(jumpbox storage.Jumpbox, directorAddress, directorUsername, directorPassword, directorCACert string) (Client, error)

func (ClientProvider) Dialer

func (c ClientProvider) Dialer(jumpbox storage.Jumpbox) (proxy.Dialer, error)

func (ClientProvider) HTTPClient

func (ClientProvider) HTTPClient(dialer proxy.Dialer, directorCACert []byte) *http.Client

type Cmd

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

func NewCmd

func NewCmd(stderr io.Writer) Cmd

func (Cmd) Run

func (c Cmd) Run(stdout io.Writer, workingDirectory string, args []string) error

type CreateEnvError

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

func NewCreateEnvError

func NewCreateEnvError(boshState map[string]interface{}, err error) CreateEnvError

func (CreateEnvError) BOSHState

func (b CreateEnvError) BOSHState() map[string]interface{}

func (CreateEnvError) Error

func (b CreateEnvError) Error() string

type CreateEnvInput

type CreateEnvInput struct {
	Manifest  string
	Variables string
	State     map[string]interface{}
}

type CreateEnvOutput

type CreateEnvOutput struct {
	State map[string]interface{}
}

type DeleteEnvError

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

func NewDeleteEnvError

func NewDeleteEnvError(boshState map[string]interface{}, err error) DeleteEnvError

func (DeleteEnvError) BOSHState

func (b DeleteEnvError) BOSHState() map[string]interface{}

func (DeleteEnvError) Error

func (b DeleteEnvError) Error() string

type DeleteEnvInput

type DeleteEnvInput struct {
	Manifest  string
	Variables string
	State     map[string]interface{}
}

type Executor

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

func NewExecutor

func NewExecutor(cmd command, tempDir func(string, string) (string, error), readFile func(string) ([]byte, error),
	unmarshalJSON func([]byte, interface{}) error,
	marshalJSON func(interface{}) ([]byte, error), writeFile func(string, []byte, os.FileMode) error) Executor

func (Executor) CreateEnv

func (e Executor) CreateEnv(createEnvInput CreateEnvInput) (CreateEnvOutput, error)

func (Executor) DeleteEnv

func (e Executor) DeleteEnv(deleteEnvInput DeleteEnvInput) error

func (Executor) DirectorInterpolate

func (e Executor) DirectorInterpolate(interpolateInput InterpolateInput) (InterpolateOutput, error)

func (Executor) JumpboxInterpolate

func (e Executor) JumpboxInterpolate(interpolateInput InterpolateInput) (JumpboxInterpolateOutput, error)

func (Executor) Version

func (e Executor) Version() (string, error)

type GCPYAML

type GCPYAML struct {
	Zone           string   `yaml:"zone,omitempty"`
	Network        string   `yaml:"network,omitempty"`
	Subnetwork     string   `yaml:"subnetwork,omitempty"`
	Tags           []string `yaml:"tags,omitempty"`
	ProjectID      string   `yaml:"project_id,omitempty"`
	CredentialJSON string   `yaml:"gcp_credentials_json,omitempty"`
}

type IP

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

func ParseIP

func ParseIP(ip string) (IP, error)

func (IP) Add

func (i IP) Add(offset int) IP

func (IP) String

func (i IP) String() string

func (IP) Subtract

func (i IP) Subtract(offset int) IP

type Info

type Info struct {
	Name    string `json:"name"`
	UUID    string `json:"uuid"`
	Version string `json:"version"`
}

type InterpolateInput

type InterpolateInput struct {
	IAAS                  string
	DeploymentVars        string
	JumpboxDeploymentVars string
	BOSHState             map[string]interface{}
	Variables             string
	OpsFile               string
}

type InterpolateOutput

type InterpolateOutput struct {
	Variables string
	Manifest  string
}

type JumpboxInterpolateOutput

type JumpboxInterpolateOutput struct {
	Variables string
	Manifest  string
}

type Manager

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

func NewManager

func NewManager(executor executor, logger logger, socks5Proxy socks5Proxy) *Manager

func (*Manager) CreateDirector

func (m *Manager) CreateDirector(state storage.State, terraformOutputs map[string]interface{}) (storage.State, error)

func (*Manager) CreateJumpbox

func (m *Manager) CreateJumpbox(state storage.State, terraformOutputs map[string]interface{}) (storage.State, error)

func (*Manager) Delete

func (m *Manager) Delete(state storage.State, terraformOutputs map[string]interface{}) error

func (*Manager) DeleteJumpbox

func (m *Manager) DeleteJumpbox(state storage.State, terraformOutputs map[string]interface{}) error

func (*Manager) GetDeploymentVars

func (m *Manager) GetDeploymentVars(state storage.State, terraformOutputs map[string]interface{}) string

func (*Manager) GetJumpboxDeploymentVars

func (m *Manager) GetJumpboxDeploymentVars(state storage.State, terraformOutputs map[string]interface{}) string

func (*Manager) Version

func (m *Manager) Version() (string, error)

type ManagerCreateError

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

func NewManagerCreateError

func NewManagerCreateError(state storage.State, err error) ManagerCreateError

func (ManagerCreateError) Error

func (b ManagerCreateError) Error() string

func (ManagerCreateError) State

func (b ManagerCreateError) State() storage.State

type ManagerDeleteError

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

func NewManagerDeleteError

func NewManagerDeleteError(state storage.State, err error) ManagerDeleteError

func (ManagerDeleteError) Error

func (b ManagerDeleteError) Error() string

func (ManagerDeleteError) State

func (b ManagerDeleteError) State() storage.State

type SSHKeyDeleter

type SSHKeyDeleter struct {
}

func NewSSHKeyDeleter

func NewSSHKeyDeleter() SSHKeyDeleter

func (SSHKeyDeleter) Delete

func (SSHKeyDeleter) Delete(state storage.State) (storage.State, error)

type SSHKeyGetter

type SSHKeyGetter struct{}

func NewSSHKeyGetter

func NewSSHKeyGetter() SSHKeyGetter

func (SSHKeyGetter) Get

func (j SSHKeyGetter) Get(state storage.State) (string, error)

Jump to

Keyboard shortcuts

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