config

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: Apache-2.0 Imports: 12 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthHeaderBuilder

type AuthHeaderBuilder interface {
	AddAuthHeader(request *http.Request, logger *log.Logger) error
}

type BOSHAuthentication

type BOSHAuthentication struct {
	Basic UserCredentials
	UAA   BOSHUAAAuthentication
}

func (BOSHAuthentication) Validate

func (a BOSHAuthentication) Validate() error

type BOSHUAAAuthentication

type BOSHUAAAuthentication struct {
	ID     string `yaml:"client_id"`
	Secret string `yaml:"client_secret"`
}

func (BOSHUAAAuthentication) IsSet

func (cc BOSHUAAAuthentication) IsSet() bool

type Bosh

type Bosh struct {
	URL            string
	TrustedCert    string `yaml:"root_ca_cert"`
	Authentication BOSHAuthentication
}

func (Bosh) NewAuthHeaderBuilder added in v0.17.2

func (boshConfig Bosh) NewAuthHeaderBuilder(boshInfo boshdirector.Info, disableSSLCertVerification bool) (boshdirector.AuthHeaderBuilder, error)

func (Bosh) Validate

func (b Bosh) Validate() error

type Broker

type Broker struct {
	Port                       int
	Username                   string
	Password                   string
	DisableSSLCertVerification bool `yaml:"disable_ssl_cert_verification"`
	StartUpBanner              bool `yaml:"startup_banner"`
	ShutdownTimeoutSecs        int  `yaml:"shutdown_timeout_in_seconds"`
	DisableCFStartupChecks     bool `yaml:"disable_cf_startup_checks"`
}

func (Broker) Validate

func (b Broker) Validate() error

type BrokerAPI added in v0.18.0

type BrokerAPI struct {
	URL            string             `yaml:"url"`
	Authentication BOSHAuthentication `yaml:"authentication"`
}

type CF

type CF struct {
	URL            string
	TrustedCert    string `yaml:"root_ca_cert"`
	Authentication UAAAuthentication
}

func (CF) NewAuthHeaderBuilder

func (cf CF) NewAuthHeaderBuilder(disableSSLCertVerification bool) (AuthHeaderBuilder, error)

func (CF) Validate

func (cf CF) Validate() error

type ClientCredentials

type ClientCredentials struct {
	ID     string `yaml:"client_id"`
	Secret string `yaml:"secret"`
}

func (ClientCredentials) IsSet

func (cc ClientCredentials) IsSet() bool

type Config

type Config struct {
	Broker            Broker
	Bosh              Bosh
	CF                CF
	CredHub           CredHub           `yaml:"credhub"`
	ServiceAdapter    ServiceAdapter    `yaml:"service_adapter"`
	ServiceDeployment ServiceDeployment `yaml:"service_deployment"`
	ServiceCatalog    ServiceOffering   `yaml:"service_catalog"`
}

func Parse

func Parse(configFilePath string) (Config, error)

func (Config) HasCredHub added in v0.17.2

func (c Config) HasCredHub() bool

func (Config) Validate

func (c Config) Validate() error

type CredHub added in v0.17.2

type CredHub struct {
	APIURL            string `yaml:"api_url"`
	ClientID          string `yaml:"client_id"`
	ClientSecret      string `yaml:"client_secret"`
	CaCert            string `yaml:"ca_cert"`
	InternalUAACaCert string `yaml:"internal_uaa_ca_cert"`
}

type DashboardClient

type DashboardClient struct {
	ID          string
	Secret      string
	RedirectUri string `yaml:"redirect_uri"`
}

type Errand added in v0.18.0

type Errand struct {
	Name      string   `yaml:"name"`
	Instances []string `yaml:"instances"`
}

type LifecycleErrands

type LifecycleErrands struct {
	PostDeploy Errand `yaml:"post_deploy"`
	PreDelete  string `yaml:"pre_delete"`
}

type Plan

type Plan struct {
	ID               string `yaml:"plan_id"`
	Name             string
	Free             *bool
	Bindable         *bool
	Description      string
	Metadata         PlanMetadata
	Quotas           Quotas `yaml:"quotas,omitempty"`
	Properties       serviceadapter.Properties
	InstanceGroups   []serviceadapter.InstanceGroup `yaml:"instance_groups,omitempty"`
	Update           *serviceadapter.Update         `yaml:"update,omitempty"`
	LifecycleErrands *LifecycleErrands              `yaml:"lifecycle_errands,omitempty"`
}

func (Plan) AdapterPlan

func (p Plan) AdapterPlan(globalProperties serviceadapter.Properties) serviceadapter.Plan

func (Plan) PostDeployErrand

func (p Plan) PostDeployErrand() string

func (Plan) PostDeployErrandInstances added in v0.18.0

func (p Plan) PostDeployErrandInstances() []string

func (Plan) PreDeleteErrand

func (p Plan) PreDeleteErrand() string

type PlanCost

type PlanCost struct {
	Amount map[string]float64 `yaml:"amount"`
	Unit   string             `yaml:"unit"`
}

type PlanMetadata

type PlanMetadata struct {
	DisplayName string     `yaml:"display_name"`
	Bullets     []string   `yaml:"bullets,omitempty"`
	Costs       []PlanCost `yaml:"costs"`
}

type Plans

type Plans []Plan

func (Plans) FindByID

func (p Plans) FindByID(id string) (Plan, bool)

type Quotas

type Quotas struct {
	ServiceInstanceLimit *int `yaml:"service_instance_limit,omitempty"`
}

type ServiceAdapter

type ServiceAdapter struct {
	Path string
}

type ServiceDeployment

type ServiceDeployment struct {
	Releases serviceadapter.ServiceReleases
	Stemcell serviceadapter.Stemcell
}

func (ServiceDeployment) Validate

func (s ServiceDeployment) Validate() error

type ServiceInstancesAPI added in v0.18.0

type ServiceInstancesAPI struct {
	URL            string             `yaml:"url"`
	Authentication BOSHAuthentication `yaml:"authentication"`
}

type ServiceMetadata

type ServiceMetadata struct {
	DisplayName         string `yaml:"display_name"`
	ImageURL            string `yaml:"image_url"`
	LongDescription     string `yaml:"long_description"`
	ProviderDisplayName string `yaml:"provider_display_name"`
	DocumentationURL    string `yaml:"documentation_url"`
	SupportURL          string `yaml:"support_url"`
	Shareable           bool   `yaml:"shareable"`
}

type ServiceOffering

type ServiceOffering struct {
	ID               string
	Name             string `yaml:"service_name"`
	Description      string `yaml:"service_description"`
	Bindable         bool
	PlanUpdatable    bool     `yaml:"plan_updatable"`
	Requires         []string `yaml:"requires,omitempty"`
	Metadata         ServiceMetadata
	DashboardClient  *DashboardClient `yaml:"dashboard_client,omitempty"`
	Tags             []string
	GlobalProperties serviceadapter.Properties `yaml:"global_properties"`
	GlobalQuotas     Quotas                    `yaml:"global_quotas"`
	Plans            Plans
}

func (ServiceOffering) FindPlanByID

func (s ServiceOffering) FindPlanByID(id string) (Plan, bool)

func (ServiceOffering) HasLifecycleErrands

func (s ServiceOffering) HasLifecycleErrands() bool

func (ServiceOffering) Validate added in v0.18.0

func (s ServiceOffering) Validate() error

type UAAAuthentication

type UAAAuthentication struct {
	URL               string            `yaml:"url"`
	ClientCredentials ClientCredentials `yaml:"client_credentials"`
	UserCredentials   UserCredentials   `yaml:"user_credentials"`
}

func (UAAAuthentication) IsSet

func (a UAAAuthentication) IsSet() bool

func (UAAAuthentication) Validate

func (a UAAAuthentication) Validate() error

type UpgradeAllInstanceErrandConfig added in v0.18.0

type UpgradeAllInstanceErrandConfig struct {
	BrokerAPI           BrokerAPI           `yaml:"broker_api"`
	ServiceInstancesAPI ServiceInstancesAPI `yaml:"service_instances_api"`
	PollingInterval     int                 `yaml:"polling_interval"`
}

type UserCredentials

type UserCredentials struct {
	Username string
	Password string
}

func (UserCredentials) IsSet

func (c UserCredentials) IsSet() bool

Jump to

Keyboard shortcuts

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