Documentation ¶
Index ¶
- Constants
- func FormatStr(str string) string
- func SyncStatusWithService(b *DCSBroker, instanceID string, serviceID string, planID string, ...) (*instances.Instance, error, error)
- type BindingCredential
- type DCSBroker
- func (b *DCSBroker) Bind(instanceID, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error)
- func (b *DCSBroker) Deprovision(instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)
- func (b *DCSBroker) GetPlanSchemas(serviceID string, planID string, metadata *brokerapi.ServicePlanMetadata) (*brokerapi.PlanSchemas, error)
- func (b *DCSBroker) LastOperation(instanceID string, operationData database.OperationDetails) (brokerapi.LastOperation, error)
- func (b *DCSBroker) Provision(instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
- func (b *DCSBroker) Unbind(instanceID, bindingID string, details brokerapi.UnbindDetails) error
- func (b *DCSBroker) Update(instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)
- type MetadataParameters
- type ProvisionParameters
- type UpdateParameters
Constants ¶
View Source
const ( // AddtionalParamUsername for username AddtionalParamUsername string = "username" // AddtionalParamPassword for password AddtionalParamPassword string = "password" // AddtionalParamRequest for request AddtionalParamRequest string = "request" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BindingCredential ¶
type BindingCredential struct { IP string `json:"host,omitempty"` Port int `json:"port,omitempty"` UserName string `json:"username,omitempty"` Password string `json:"password,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` }
BindingCredential represent dcs binding credential
func BuildBindingCredential ¶
func BuildBindingCredential( ip string, port int, username string, password string, name string, servicetype string) (BindingCredential, error)
BuildBindingCredential from different dcs instance
type DCSBroker ¶
type DCSBroker struct { CloudCredentials config.CloudCredentials Catalog config.Catalog Logger lager.Logger }
DCSBroker define
func (*DCSBroker) Bind ¶
func (b *DCSBroker) Bind(instanceID, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error)
Bind implematation
func (*DCSBroker) Deprovision ¶
func (b *DCSBroker) Deprovision(instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)
Deprovision implematation
func (*DCSBroker) GetPlanSchemas ¶ added in v0.1.2
func (b *DCSBroker) GetPlanSchemas(serviceID string, planID string, metadata *brokerapi.ServicePlanMetadata) (*brokerapi.PlanSchemas, error)
GetPlanSchemas implematation
func (*DCSBroker) LastOperation ¶
func (b *DCSBroker) LastOperation(instanceID string, operationData database.OperationDetails) (brokerapi.LastOperation, error)
LastOperation implematation
func (*DCSBroker) Provision ¶
func (b *DCSBroker) Provision(instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
Provision implematation
func (*DCSBroker) Unbind ¶
func (b *DCSBroker) Unbind(instanceID, bindingID string, details brokerapi.UnbindDetails) error
Unbind implematation
func (*DCSBroker) Update ¶
func (b *DCSBroker) Update(instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)
Update implematation
type MetadataParameters ¶
type MetadataParameters struct { Engine string `json:"engine,omitempty"` EngineVersion string `json:"engine_version,omitempty"` SpecCode string `json:"speccode,omitempty"` ChargingType string `json:"charging_type,omitempty"` Capacity int `json:"capacity,omitempty"` VPCID string `json:"vpc_id,omitempty"` SubnetID string `json:"subnet_id,omitempty"` SecurityGroupID string `json:"security_group_id,omitempty"` AvailabilityZones []string `json:"availability_zones,omitempty"` }
MetadataParameters represent plan metadata parameters in config
type ProvisionParameters ¶
type ProvisionParameters struct { Capacity int `json:"capacity,omitempty" bson:"capacity,omitempty"` VPCID string `json:"vpc_id,omitempty" bson:"vpc_id,omitempty"` SubnetID string `json:"subnet_id,omitempty" bson:"subnet_id,omitempty"` SecurityGroupID string `json:"security_group_id,omitempty" bson:"security_group_id,omitempty"` AvailabilityZones []string `json:"availability_zones,omitempty" bson:"availability_zones,omitempty"` Username string `json:"username,omitempty" bson:"username,omitempty"` Password string `json:"password,omitempty" bson:"password,omitempty"` Name string `json:"name,omitempty" bson:"name,omitempty"` Description string `json:"description,omitempty" bson:"description,omitempty"` BackupStrategySavedays int `json:"backup_strategy_savedays,omitempty" bson:"backup_strategy_savedays,omitempty"` BackupStrategyBackupType string `json:"backup_strategy_backup_type,omitempty" bson:"backup_strategy_backup_type,omitempty"` BackupStrategyBackupAt []int `json:"backup_strategy_backup_at,omitempty" bson:"backup_strategy_backup_at,omitempty"` BackupStrategyBeginAt string `json:"backup_strategy_begin_at,omitempty" bson:"backup_strategy_begin_at,omitempty"` BackupStrategyPeriodType string `json:"backup_strategy_period_type,omitempty" bson:"backup_strategy_period_type,omitempty"` MaintainBegin string `json:"maintain_begin,omitempty" bson:"maintain_begin,omitempty"` MaintainEnd string `json:"maintain_end,omitempty" bson:"maintain_end,omitempty"` UnknownFields map[string]interface{} `json:"-" bson:",inline"` }
ProvisionParameters represent provision parameters
func (*ProvisionParameters) MarshalJSON ¶ added in v0.1.1
func (f *ProvisionParameters) MarshalJSON() ([]byte, error)
func (*ProvisionParameters) UnmarshalJSON ¶ added in v0.1.1
func (f *ProvisionParameters) UnmarshalJSON(b []byte) error
Collect unknown fields into "UnknownFields"
type UpdateParameters ¶
type UpdateParameters struct { Name string `json:"name,omitempty" bson:"name,omitempty"` Description *string `json:"description,omitempty" bson:"description,omitempty"` BackupStrategySavedays int `json:"backup_strategy_savedays,omitempty" bson:"backup_strategy_savedays,omitempty"` BackupStrategyBackupType string `json:"backup_strategy_backup_type,omitempty" bson:"backup_strategy_backup_type,omitempty"` BackupStrategyBackupAt []int `json:"backup_strategy_backup_at,omitempty" bson:"backup_strategy_backup_at,omitempty"` BackupStrategyBeginAt string `json:"backup_strategy_begin_at,omitempty" bson:"backup_strategy_begin_at,omitempty"` BackupStrategyPeriodType string `json:"backup_strategy_period_type,omitempty" bson:"backup_strategy_period_type,omitempty"` MaintainBegin string `json:"maintain_begin,omitempty" bson:"maintain_begin,omitempty"` MaintainEnd string `json:"maintain_end,omitempty" bson:"maintain_end,omitempty"` SecurityGroupID string `json:"security_group_id,omitempty" bson:"security_group_id,omitempty"` NewCapacity int `json:"new_capacity,omitempty" bson:"new_capacity,omitempty"` OldPassword *string `json:"old_password,omitempty" bson:"old_password,omitempty"` NewPassword *string `json:"new_password,omitempty" bson:"new_password,omitempty"` }
UpdateParameters represent update parameters
func (*UpdateParameters) MarshalJSON ¶ added in v0.1.2
func (f *UpdateParameters) MarshalJSON() ([]byte, error)
func (*UpdateParameters) UnmarshalJSON ¶ added in v0.1.2
func (f *UpdateParameters) UnmarshalJSON(b []byte) error
Click to show internal directories.
Click to hide internal directories.