Documentation ¶
Index ¶
- func CanUpdate(oldPlan, newPlan ServicePlan, service Service, parameters UpdateParameters) bool
- type BindParameters
- type Catalog
- type Config
- type Cost
- type CredentialsHash
- type DashboardClient
- type ProvisionParameters
- type RDSBroker
- func (b *RDSBroker) Bind(context context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (b *RDSBroker) Deprovision(context context.Context, instanceID string, ...) (brokerapi.DeprovisionServiceSpec, error)
- func (b *RDSBroker) LastOperation(context context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)
- func (b *RDSBroker) Provision(context context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (b *RDSBroker) Services(context context.Context) []brokerapi.Service
- func (b *RDSBroker) Unbind(context context.Context, instanceID, bindingID string, ...) error
- func (b *RDSBroker) Update(context context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
- type RDSProperties
- type Service
- type ServiceMetadata
- type ServicePlan
- type ServicePlanMetadata
- type UpdateParameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanUpdate ¶ added in v1.0.0
func CanUpdate(oldPlan, newPlan ServicePlan, service Service, parameters UpdateParameters) bool
This function does NOT cover every combination. It just picks up the obviously bad combinations.
Types ¶
type BindParameters ¶
type BindParameters struct {
Username string `json:"username"`
}
type Catalog ¶
type Catalog struct {
Services []Service `yaml:"services,omitempty"`
}
As much as it would be nice to use brokerapi.Service here rather than redefining * the whole structure ourselves, the version in brokerapi is specifically * replicating the structure sent to cloud foundry. And we want to add a few more * options for defining the RDS properties. And brokerapi doesn't let us dump it in * metadata. * * TODO: Find a better way
func (Catalog) FindService ¶
func (Catalog) FindServicePlan ¶
func (c Catalog) FindServicePlan(serviceID, planID string) (plan ServicePlan, found bool)
type Config ¶
type Config struct { Region string `yaml:"region"` DBPrefix string `yaml:"db_prefix"` AllowUserProvisionParameters bool `yaml:"allow_user_provision_parameters"` AllowUserUpdateParameters bool `yaml:"allow_user_update_parameters"` AllowUserBindParameters bool `yaml:"allow_user_bind_parameters"` Catalog Catalog `yaml:"catalog"` }
type CredentialsHash ¶ added in v1.0.0
type CredentialsHash struct { Host string `json:"host,omitempty"` Port int64 `json:"port,omitempty"` Name string `json:"name,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` URI string `json:"uri,omitempty"` JDBCURI string `json:"jdbcUrl,omitempty"` }
type DashboardClient ¶
type ProvisionParameters ¶
type ProvisionParameters struct { BackupRetentionPeriod int64 `json:"backup_retention_period"` CharacterSetName string `json:"character_set_name"` PreferredBackupWindow string `json:"preferred_backup_window"` PreferredMaintenanceWindow string `json:"preferred_maintenance_window"` }
Currently the provision parameters are a json.RawMessage in brokerapi * while the update and bind parameters are a map[string]interface{} * There is some interest in changing everything to json.RawMessage * https://github.com/pivotal-cf/brokerapi/issues/36
type RDSBroker ¶
type RDSBroker struct {
// contains filtered or unexported fields
}
func (*RDSBroker) Deprovision ¶
func (b *RDSBroker) Deprovision(context context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)
func (*RDSBroker) LastOperation ¶
func (*RDSBroker) Provision ¶
func (b *RDSBroker) Provision(context context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
type RDSProperties ¶
type RDSProperties struct { DBInstanceClass string `json:"db_instance_class,omitempty" yaml:"db_instance_class,omitempty"` Engine string `json:"engine" yaml:"engine"` EngineVersion string `json:"engine_version,omitempty" yaml:"engine_version,omitempty"` AllocatedStorage int64 `json:"allocated_storage,omitempty" yaml:"allocated_storage,omitempty"` AutoMinorVersionUpgrade bool `json:"auto_minor_version_upgrade,omitempty" yaml:"auto_minor_version_upgrade,omitempty"` AvailabilityZone string `json:"availability_zone,omitempty" yaml:"availability_zone,omitempty"` BackupRetentionPeriod int64 `json:"backup_retention_period,omitempty" yaml:"backup_retention_period,omitempty"` CharacterSetName string `json:"character_set_name,omitempty" yaml:"character_set_name,omitempty"` DBParameterGroupName string `json:"db_parameter_group_name,omitempty" yaml:"db_parameter_group_name,omitempty"` DBClusterParameterGroupName string `json:"db_cluster_parameter_group_name,omitempty" yaml:"db_cluster_parameter_group_name,omitempty"` DBSecurityGroups []string `json:"db_security_groups,omitempty" yaml:"db_security_groups,omitempty"` DBSubnetGroupName string `json:"db_subnet_group_name,omitempty" yaml:"db_subnet_group_name,omitempty"` LicenseModel string `json:"license_model,omitempty" yaml:"license_model,omitempty"` MultiAZ bool `json:"multi_az,omitempty" yaml:"multi_az,omitempty"` OptionGroupName string `json:"option_group_name,omitempty" yaml:"option_group_name,omitempty"` Port int64 `json:"port,omitempty" yaml:"port,omitempty"` PreferredBackupWindow string `json:"preferred_backup_window,omitempty" yaml:"preferred_backup_window,omitempty"` PreferredMaintenanceWindow string `json:"preferred_maintenance_window,omitempty" yaml:"preferred_maintenance_window,omitempty"` PubliclyAccessible bool `json:"publicly_accessible,omitempty" yaml:"publicly_accessible,omitempty"` StorageEncrypted bool `json:"storage_encrypted,omitempty" yaml:"storage_encrypted,omitempty"` KmsKeyID string `json:"kms_key_id,omitempty" yaml:"kms_key_id,omitempty"` StorageType string `json:"storage_type,omitempty" yaml:"storage_type,omitempty"` Iops int64 `json:"iops,omitempty" yaml:"iops,omitempty"` VpcSecurityGroupIds []string `json:"vpc_security_group_ids,omitempty" yaml:"vpc_security_group_ids,omitempty"` CopyTagsToSnapshot bool `json:"copy_tags_to_snapshot,omitempty" yaml:"copy_tags_to_snapshot,omitempty"` SkipFinalSnapshot bool `json:"skip_final_snapshot,omitempty" yaml:"skip_final_snapshot,omitempty"` }
func (RDSProperties) Validate ¶
func (rp RDSProperties) Validate() error
type Service ¶
type Service struct { ID string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Bindable bool `json:"bindable,omitempty" yaml:"bindable,omitempty"` Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` Metadata *ServiceMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` Requires []string `json:"requires,omitempty" yaml:"requires,omitempty"` PlanUpdateable bool `json:"plan_updateable" yaml:"plan_updateable"` Plans []ServicePlan `json:"plans,omitempty" yaml:"plans,omitempty"` DashboardClient *DashboardClient `json:"dashboard_client,omitempty" yaml:"dashboard_client,omitempty"` }
type ServiceMetadata ¶
type ServiceMetadata struct { DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` ImageURL string `json:"imageUrl,omitempty" yaml:"imageUrl,omitempty"` LongDescription string `json:"longDescription,omitempty" yaml:"longDescription,omitempty"` ProviderDisplayName string `json:"providerDisplayName,omitempty" yaml:"providerDisplayName,omitempty"` DocumentationURL string `json:"documentationUrl,omitempty" yaml:"documentationUrl,omitempty"` SupportURL string `json:"supportUrl,omitempty" yaml:"supportUrl,omitempty"` }
type ServicePlan ¶
type ServicePlan struct { ID string `json:"id" yaml:"id"` Name string `json:"name" yaml:"name"` Description string `json:"description" yaml:"description"` Metadata *ServicePlanMetadata `json:"metadata,omitempty" yaml:"metadata,omitempty"` Free *bool `json:"free" yaml:"free"` RDSProperties RDSProperties `json:"rds_properties,omitempty" yaml:"rds_properties,omitempty"` }
func (ServicePlan) Validate ¶
func (sp ServicePlan) Validate() error
type ServicePlanMetadata ¶
type UpdateParameters ¶
type UpdateParameters struct { ApplyImmediately bool `json:"apply_immediately"` BackupRetentionPeriod int64 `json:"backup_retention_period"` PreferredBackupWindow string `json:"preferred_backup_window"` PreferredMaintenanceWindow string `json:"preferred_maintenance_window"` Extensions *[]string `json:"extensions"` }