Documentation ¶
Index ¶
- type ThreeToFour
- func (t *ThreeToFour) Bind(ctx context.Context, instanceID, bindingID string, ...) (brokerapi.Binding, error)
- func (t *ThreeToFour) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, ...) (brokerapi.DeprovisionServiceSpec, error)
- func (t *ThreeToFour) LastOperation(ctx context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)
- func (t *ThreeToFour) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, ...) (brokerapi.ProvisionedServiceSpec, error)
- func (t *ThreeToFour) Services(ctx context.Context) ([]brokerapi.Service, error)
- func (t *ThreeToFour) Unbind(ctx context.Context, instanceID, bindingID string, ...) error
- func (t *ThreeToFour) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, ...) (brokerapi.UpdateServiceSpec, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThreeToFour ¶
type ThreeToFour struct { Wrapped brokerapi.ServiceBroker // contains filtered or unexported fields }
ThreetoFour is a brokerapi.ServiceBroker wrapper that tells users when they are using legacy plan IDs and how to upgrade them.
func NewLegacyPlanUpgrader ¶
func NewLegacyPlanUpgrader(wrapped brokerapi.ServiceBroker) *ThreeToFour
NewLegacyPlanUpgrader wraps a service broker with an interface that requires provisioned services which are instances of legacy plans (which had GUIDs generated at runtime rather than fixed and are therefore different per-install) to upgrade to their fixed counterpart before any operations can be done on them.
func (*ThreeToFour) Bind ¶
func (t *ThreeToFour) Bind(ctx context.Context, instanceID, bindingID string, details brokerapi.BindDetails) (brokerapi.Binding, error)
Bind calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.
func (*ThreeToFour) Deprovision ¶
func (t *ThreeToFour) Deprovision(ctx context.Context, instanceID string, details brokerapi.DeprovisionDetails, asyncAllowed bool) (brokerapi.DeprovisionServiceSpec, error)
Deprovision calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.
func (*ThreeToFour) LastOperation ¶
func (t *ThreeToFour) LastOperation(ctx context.Context, instanceID, operationData string) (brokerapi.LastOperation, error)
LastOperation calls the wrapped service broker
func (*ThreeToFour) Provision ¶
func (t *ThreeToFour) Provision(ctx context.Context, instanceID string, details brokerapi.ProvisionDetails, asyncAllowed bool) (brokerapi.ProvisionedServiceSpec, error)
Provision calls the wrapped service broker unless the plan is legacy, in which case the user is told which plan to use instead.
func (*ThreeToFour) Services ¶
Services returns the list of enabled services, with dummy services injected for legacy compatibility.
func (*ThreeToFour) Unbind ¶
func (t *ThreeToFour) Unbind(ctx context.Context, instanceID, bindingID string, details brokerapi.UnbindDetails) error
Unbind calls the wrapped service broker unless the plan is legacy, in which case the user is told how to upgrade first.
func (*ThreeToFour) Update ¶
func (t *ThreeToFour) Update(ctx context.Context, instanceID string, details brokerapi.UpdateDetails, asyncAllowed bool) (brokerapi.UpdateServiceSpec, error)
Update checks if the update is for a plan change from legacy to the defined acceptable upgrade plan and modifies the database if so.