config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 8, 2019 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadContents

func ReadContents(poc string) (string, bool, error)

ReadContents from file path

Types

type BackDatabase

type BackDatabase struct {
	DatabaseType     string `json:"database_type"`
	DatabaseHost     string `json:"database_host"`
	DatabasePort     string `json:"database_port"`
	DatabaseName     string `json:"database_name"`
	DatabaseUsername string `json:"database_username"`
	DatabasePassword string `json:"database_password"`
}

BackDatabase for broker

func (BackDatabase) Validate

func (c BackDatabase) Validate() error

Validate BackDatabase

type BrokerConfig

type BrokerConfig struct {
	LogLevel string `json:"log_level"`
	Username string `json:"username"`
	Password string `json:"password"`
}

BrokerConfig for broker

func (BrokerConfig) Validate

func (c BrokerConfig) Validate() error

Validate BrokerConfig

type Catalog

type Catalog struct {
	Services []brokerapi.Service `json:"services"`
}

Catalog define

func (Catalog) FindService

func (c Catalog) FindService(serviceid string) (brokerapi.Service, error)

FindService from config

func (Catalog) FindServicePlan

func (c Catalog) FindServicePlan(serviceid string, planid string) (brokerapi.ServicePlan, error)

FindServicePlan from config

func (Catalog) Validate

func (c Catalog) Validate() error

Validate catalog

func (Catalog) ValidateAcceptsIncomplete added in v0.1.1

func (c Catalog) ValidateAcceptsIncomplete(asyncAllowed bool) error

We get asyncAllowed in api.go of pivotal-cf/brokerapi like this: asyncAllowed := req.FormValue("accepts_incomplete") == "true"

func (Catalog) ValidateOrgSpecGUID added in v0.1.1

func (c Catalog) ValidateOrgSpecGUID(organization_guid string, space_guid string) error

func (Catalog) ValidateService

func (c Catalog) ValidateService(s brokerapi.Service) error

ValidateService from file

func (Catalog) ValidateServicePlan

func (c Catalog) ValidateServicePlan(sp brokerapi.ServicePlan) error

ValidateServicePlan from file

type CloudCredentials

type CloudCredentials struct {
	AccessKey        string `json:"access_key"`
	SecretKey        string `json:"secret_key"`
	CACertFile       string `json:"cacert_file"`
	ClientCertFile   string `json:"cert"`
	ClientKeyFile    string `json:"key"`
	DomainID         string `json:"domain_id"`
	DomainName       string `json:"domain_name"`
	EndpointType     string `json:"endpoint_type"`
	IdentityEndpoint string `json:"auth_url"`
	Insecure         bool   `json:"insecure"`
	Password         string `json:"password"`
	Region           string `json:"region"`
	TenantID         string `json:"tenant_id"`
	TenantName       string `json:"tenant_name"`
	Token            string `json:"token"`
	Username         string `json:"user_name"`
	UserID           string `json:"user_id"`

	OpenStackClient *gophercloud.ProviderClient
	CloudClient     *golangsdk.ProviderClient
}

CloudCredentials define

func (*CloudCredentials) DCSV1Client

func (c *CloudCredentials) DCSV1Client() (*golangsdk.ServiceClient, error)

DCSV1Client return dcs v1 client

func (*CloudCredentials) DMSV1Client

func (c *CloudCredentials) DMSV1Client() (*golangsdk.ServiceClient, error)

DMSV1Client return dms v1 client

func (*CloudCredentials) NetworkingV2Client

func (c *CloudCredentials) NetworkingV2Client() (*gophercloud.ServiceClient, error)

NetworkingV2Client return native networking v2 client

func (*CloudCredentials) OBSClient

func (c *CloudCredentials) OBSClient() (*obs.ObsClient, error)

OBSClient return obs client

func (*CloudCredentials) RDSV1Client

func (c *CloudCredentials) RDSV1Client() (*golangsdk.ServiceClient, error)

RDSV1Client return rds v1 client

func (*CloudCredentials) Validate

func (c *CloudCredentials) Validate() error

Validate CloudCredentials

type Config

type Config struct {
	BrokerConfig     BrokerConfig     `json:"broker_config"`
	BackDatabase     BackDatabase     `json:"back_database"`
	CloudCredentials CloudCredentials `json:"cloud_credentials"`
	Catalog          Catalog          `json:"catalog"`
}

Config for all

func LoadConfig

func LoadConfig(configFile string) (config Config, err error)

LoadConfig from file

Jump to

Keyboard shortcuts

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