Documentation ¶
Index ¶
- Constants
- type BindFunction
- type Module
- type ServiceManager
- func (s *ServiceManager) Bind(instance service.Instance, bindingParameters service.BindingParameters) (service.BindingDetails, error)
- func (s *ServiceManager) GetCredentials(service.Instance, service.Binding) (service.Credentials, error)
- func (s *ServiceManager) GetDeprovisioner(service.Plan) (service.Deprovisioner, error)
- func (s *ServiceManager) GetEmptyBindingDetails() service.BindingDetails
- func (s *ServiceManager) GetEmptyInstanceDetails() service.InstanceDetails
- func (s *ServiceManager) GetProvisioner(service.Plan) (service.Provisioner, error)
- func (s *ServiceManager) GetUpdater(service.Plan) (service.Updater, error)
- func (s *ServiceManager) Unbind(instance service.Instance, binding service.Binding) error
- func (s *ServiceManager) ValidateUpdatingParameters(instance service.Instance) error
- type UnbindFunction
- type UpdatingValidationFunction
Constants ¶
const ( // ServiceID is the service ID of the fake service ServiceID = "cdd1fb7a-d1e9-49e0-b195-e0bab747798a" // StandardPlanID is the plan ID for the standard (and only) variant of the // fake service StandardPlanID = "bd15e6f3-4ff5-477c-bb57-26313a368e74" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BindFunction ¶
type BindFunction func( service.Instance, service.BindingParameters, ) (service.BindingDetails, error)
BindFunction describes a function used to provide pluggable binding behavior to the fake implementation of the service.Module interface
type Module ¶
type Module struct {
ServiceManager *ServiceManager
}
Module is a fake implementation of the service.Module interface used to facilittate testing.
func New ¶
New returns a new instance of a type that fulfills the service.Module and provides an example of how such a module is implemented
func (*Module) GetCatalog ¶
GetCatalog returns a Catalog of service/plans offered by a module
func (*Module) GetStability ¶
GetStability returns this module's relative stability
type ServiceManager ¶ added in v0.10.0
type ServiceManager struct { UpdatingValidationBehavior UpdatingValidationFunction BindBehavior BindFunction UnbindBehavior UnbindFunction }
ServiceManager is a fake implementation of the service.ServiceManager interface used to facilitate testing.
func (*ServiceManager) Bind ¶ added in v0.10.0
func (s *ServiceManager) Bind( instance service.Instance, bindingParameters service.BindingParameters, ) (service.BindingDetails, error)
Bind synchronously binds to a service
func (*ServiceManager) GetCredentials ¶ added in v0.10.0
func (s *ServiceManager) GetCredentials( service.Instance, service.Binding, ) (service.Credentials, error)
GetCredentials returns service-specific credentials populated from instance and binding details
func (*ServiceManager) GetDeprovisioner ¶ added in v0.10.0
func (s *ServiceManager) GetDeprovisioner( service.Plan, ) (service.Deprovisioner, error)
GetDeprovisioner returns a deprovisioner that defines the steps a module must execute asynchronously to deprovision a service
func (*ServiceManager) GetEmptyBindingDetails ¶ added in v0.12.0
func (s *ServiceManager) GetEmptyBindingDetails() service.BindingDetails
GetEmptyBindingDetails returns an "empty" service-specific object that can be populated with data during unmarshaling of JSON to a Binding
func (*ServiceManager) GetEmptyInstanceDetails ¶ added in v0.12.0
func (s *ServiceManager) GetEmptyInstanceDetails() service.InstanceDetails
GetEmptyInstanceDetails returns an "empty" service-specific object that can be populated with data during unmarshaling of JSON to an Instance
func (*ServiceManager) GetProvisioner ¶ added in v0.10.0
func (s *ServiceManager) GetProvisioner( service.Plan, ) (service.Provisioner, error)
GetProvisioner returns a provisioner that defines the steps a module must execute asynchronously to provision a service
func (*ServiceManager) GetUpdater ¶ added in v0.10.0
GetUpdater returns a updater that defines the steps a module must execute asynchronously to update a service
func (*ServiceManager) ValidateUpdatingParameters ¶ added in v0.10.0
func (s *ServiceManager) ValidateUpdatingParameters( instance service.Instance, ) error
ValidateUpdatingParameters validates the provided updating parameters and returns an error if there is any problem
type UnbindFunction ¶
UnbindFunction describes a function used to provide pluggable unbinding behavior to the fake implementation of the service.Module interface
type UpdatingValidationFunction ¶
UpdatingValidationFunction describes a function used to provide pluggable updating validation behavior to the fake implementation of the service.Module interface