storage

package
v8.4.30+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2021 License: Apache-2.0 Imports: 9 Imported by: 5

Documentation

Index

Constants

View Source
const (
	StateMode  = 0740
	ScriptMode = 0750
)
View Source
const (
	STATE_SCHEMA = 14
	STATE_FILE   = "bbl-state.json"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWS

type AWS struct {
	AccessKeyID     string `json:"-"`
	SecretAccessKey string `json:"-"`
	Region          string `json:"region,omitempty"`
}

type Azure

type Azure struct {
	ClientID       string `json:"-"`
	ClientSecret   string `json:"-"`
	Region         string `json:"region,omitempty"`
	SubscriptionID string `json:"-"`
	TenantID       string `json:"-"`
}

type BOSH

type BOSH struct {
	DirectorName           string                 `json:"directorName"`
	DirectorUsername       string                 `json:"directorUsername"`
	DirectorPassword       string                 `json:"directorPassword"`
	DirectorAddress        string                 `json:"directorAddress"`
	DirectorSSLCA          string                 `json:"directorSSLCA"`
	DirectorSSLCertificate string                 `json:"directorSSLCertificate"`
	DirectorSSLPrivateKey  string                 `json:"directorSSLPrivateKey"`
	Variables              string                 `json:"variables,omitempty"`
	State                  map[string]interface{} `json:"state,omitempty"`
	Manifest               string                 `json:"manifest,omitempty"`
}

func (BOSH) IsEmpty

func (b BOSH) IsEmpty() bool

type GCP

type GCP struct {
	ServiceAccountKey     string   `json:"-"`
	ServiceAccountKeyPath string   `json:"-"`
	ProjectID             string   `json:"-"`
	Zone                  string   `json:"zone,omitempty"`
	Region                string   `json:"region,omitempty"`
	Zones                 []string `json:"zones,omitempty"`
}

func (GCP) Empty

func (g GCP) Empty() bool

type GarbageCollector

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

func NewGarbageCollector

func NewGarbageCollector(fs fs) GarbageCollector

func (GarbageCollector) Remove

func (g GarbageCollector) Remove(dir string) error

type Jumpbox

type Jumpbox struct {
	URL       string                 `json:"url"`
	Variables string                 `json:"variables,omitempty"`
	Manifest  string                 `json:"manifest,omitempty"`
	State     map[string]interface{} `json:"state,omitempty"`
}

func (Jumpbox) GetURLWithJumpboxUser

func (j Jumpbox) GetURLWithJumpboxUser() string

func (Jumpbox) IsEmpty

func (j Jumpbox) IsEmpty() bool

type LB

type LB struct {
	Type   string `json:"type"`
	Cert   string `json:"cert"`
	Key    string `json:"key"`
	Chain  string `json:"chain"`
	Domain string `json:"domain,omitempty"`
}

type Migrator

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

func NewMigrator

func NewMigrator(store store, fs migratorFs) Migrator

func (Migrator) Migrate

func (m Migrator) Migrate(state State) (State, error)

func (Migrator) MigrateCloudConfigDir

func (m Migrator) MigrateCloudConfigDir(bblDir, cloudConfigDir string) error

func (Migrator) MigrateDirectorState

func (m Migrator) MigrateDirectorState(state State, varsDir string) (State, error)

func (Migrator) MigrateDirectorVars

func (m Migrator) MigrateDirectorVars(state State, varsDir string) (State, error)

func (Migrator) MigrateDirectorVarsFile

func (m Migrator) MigrateDirectorVarsFile(varsDir string) error

func (Migrator) MigrateJumpboxState

func (m Migrator) MigrateJumpboxState(state State, varsDir string) (State, error)

func (Migrator) MigrateJumpboxVars

func (m Migrator) MigrateJumpboxVars(state State, varsDir string) (State, error)

func (Migrator) MigrateJumpboxVarsFile

func (m Migrator) MigrateJumpboxVarsFile(varsDir string) error

func (Migrator) MigrateTerraformState

func (m Migrator) MigrateTerraformState(state State, varsDir string) (State, error)

func (Migrator) MigrateTerraformTemplate

func (m Migrator) MigrateTerraformTemplate(terraformDir string) error

func (Migrator) MigrateTerraformVars

func (m Migrator) MigrateTerraformVars(varsDir string) error

type OpenStack

type OpenStack struct {
	AuthURL        string   `json:"-"`
	AZ             string   `json:"-"`
	NetworkID      string   `json:"-"`
	NetworkName    string   `json:"-"`
	Password       string   `json:"-"`
	Username       string   `json:"-"`
	Project        string   `json:"-"`
	Domain         string   `json:"-"`
	Region         string   `json:"-"`
	CACertFile     string   `json:"-"`
	Insecure       string   `json:"-"`
	DNSNameServers []string `json:"-"`
}

type PatchDetector

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

func NewPatchDetector

func NewPatchDetector(path string, logger detectorLogger) PatchDetector

func (PatchDetector) Find

func (p PatchDetector) Find() error

type State

type State struct {
	Version        int       `json:"version"`
	BBLVersion     string    `json:"bblVersion"`
	IAAS           string    `json:"iaas"`
	ID             string    `json:"id"`
	EnvID          string    `json:"envID"`
	AWS            AWS       `json:"aws,omitempty"`
	Azure          Azure     `json:"azure,omitempty"`
	GCP            GCP       `json:"gcp,omitempty"`
	VSphere        VSphere   `json:"vsphere,omitempty"`
	OpenStack      OpenStack `json:"openstack,omitempty"`
	Jumpbox        Jumpbox   `json:"jumpbox,omitempty"`
	BOSH           BOSH      `json:"bosh,omitempty"`
	TFState        string    `json:"tfState"`
	LB             LB        `json:"lb"`
	LatestTFOutput string    `json:"latestTFOutput"`
	StorageBucket  string    `json:"storageBucket,omitempty"`
}

type StateBootstrap

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

func NewStateBootstrap

func NewStateBootstrap(bootstrapLogger bootstrapLogger, bblVersion string) StateBootstrap

func (StateBootstrap) GetState

func (b StateBootstrap) GetState(dir string) (State, error)

type Store

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

func NewStore

func NewStore(dir string, fs fs, garbageCollector garbageCollector) Store

func (Store) GetCloudConfigDir

func (s Store) GetCloudConfigDir() (string, error)

func (Store) GetDirectorDeploymentDir

func (s Store) GetDirectorDeploymentDir() (string, error)

func (Store) GetJumpboxDeploymentDir

func (s Store) GetJumpboxDeploymentDir() (string, error)

func (Store) GetOldBblDir

func (s Store) GetOldBblDir() string

func (Store) GetRuntimeConfigDir

func (s Store) GetRuntimeConfigDir() (string, error)

func (Store) GetStateDir

func (s Store) GetStateDir() string

func (Store) GetTerraformDir

func (s Store) GetTerraformDir() (string, error)

func (Store) GetVarsDir

func (s Store) GetVarsDir() (string, error)

func (Store) Set

func (s Store) Set(state State) error

type VSphere

type VSphere struct {
	Network          string `json:"-"`
	SubnetCIDR       string `json:"-"`
	VCenterCluster   string `json:"-"`
	VCenterUser      string `json:"-"`
	VCenterPassword  string `json:"-"`
	VCenterIP        string `json:"-"`
	VCenterDC        string `json:"-"`
	VCenterRP        string `json:"-"`
	VCenterDS        string `json:"-"`
	VCenterDisks     string `json:"-"`
	VCenterTemplates string `json:"-"`
	VCenterVMs       string `json:"-"`
}

Jump to

Keyboard shortcuts

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