Documentation ¶
Index ¶
- Constants
- type BindFunction
- type BindingContext
- type BindingParameters
- type BindingValidationFunction
- type Credentials
- type Module
- func (m *Module) Bind(provisioningContext service.ProvisioningContext, ...) (service.BindingContext, service.Credentials, error)
- func (m *Module) GetCatalog() (service.Catalog, error)
- func (m *Module) GetDeprovisioner(string, string) (service.Deprovisioner, error)
- func (m *Module) GetEmptyBindingContext() service.BindingContext
- func (m *Module) GetEmptyBindingParameters() service.BindingParameters
- func (m *Module) GetEmptyCredentials() service.Credentials
- func (m *Module) GetEmptyProvisioningContext() service.ProvisioningContext
- func (m *Module) GetEmptyProvisioningParameters() service.ProvisioningParameters
- func (m *Module) GetEmptyUpdatingParameters() service.UpdatingParameters
- func (m *Module) GetName() string
- func (m *Module) GetProvisioner(string, string) (service.Provisioner, error)
- func (m *Module) GetStability() service.Stability
- func (m *Module) GetUpdater(string, string) (service.Updater, error)
- func (m *Module) Unbind(provisioningContext service.ProvisioningContext, ...) error
- func (m *Module) ValidateBindingParameters(bindingParameters service.BindingParameters) error
- func (m *Module) ValidateProvisioningParameters(provisioningParameters service.ProvisioningParameters) error
- func (m *Module) ValidateUpdatingParameters(updatingParameters service.UpdatingParameters) error
- type ProvisioningContext
- type ProvisioningParameters
- type ProvisioningValidationFunction
- type UnbindFunction
- type UpdatingParameters
- 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( provisioningContext service.ProvisioningContext, bindingParameters service.BindingParameters, ) (service.BindingContext, service.Credentials, error)
BindFunction describes a function used to provide pluggable binding behavior to the fake implementation of the service.Module interface
type BindingContext ¶
type BindingContext struct { }
BindingContext represents context collected and modified over the course of the fake service module's binding and unbinding processes. Note that, ordinarily, service module-specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
type BindingParameters ¶
type BindingParameters struct {
SomeParameter string `json:"someParameter"`
}
BindingParameters represents parameters specific to binding to a service instance using the fake service module. Note that, ordinarily, service module-specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
type BindingValidationFunction ¶
type BindingValidationFunction func(service.BindingParameters) error
BindingValidationFunction describes a function used to provide pluggable binding validation behavior to the fake implementation of the service.Module interface
type Credentials ¶
type Credentials struct { }
Credentials generally represent credentials AND/OR ANY OTHER DETAILS (e.g. URLs, port numbers, etc.) that will be conveyed back to the client upon successful completion of a bind. In the specific case of the fake service module, which doesn't do much of anything (other than generate a messageID and write some logs), there are no important details to convey back to the client. The messageID is included just to provide an example of HOW details such as these can be conveyed to the client. Note that, ordinarily, service module-specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
type Module ¶
type Module struct { ProvisioningValidationBehavior ProvisioningValidationFunction UpdatingValidationBehavior UpdatingValidationFunction BindingValidationBehavior BindingValidationFunction BindBehavior BindFunction UnbindBehavior UnbindFunction }
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) Bind ¶
func (m *Module) Bind( provisioningContext service.ProvisioningContext, bindingParameters service.BindingParameters, ) (service.BindingContext, service.Credentials, error)
Bind synchronously binds to a service
func (*Module) GetCatalog ¶
GetCatalog returns a Catalog of service/plans offered by a module
func (*Module) GetDeprovisioner ¶
GetDeprovisioner returns a deprovisioner that defines the steps a module must execute asynchronously to deprovision a service
func (*Module) GetEmptyBindingContext ¶
func (m *Module) GetEmptyBindingContext() service.BindingContext
GetEmptyBindingContext returns an empty instance of a module-specific bindingContext
func (*Module) GetEmptyBindingParameters ¶
func (m *Module) GetEmptyBindingParameters() service.BindingParameters
GetEmptyBindingParameters returns an empty instance of module-specific bindingParameters
func (*Module) GetEmptyCredentials ¶
func (m *Module) GetEmptyCredentials() service.Credentials
GetEmptyCredentials returns an empty instance of module-specific credentials
func (*Module) GetEmptyProvisioningContext ¶
func (m *Module) GetEmptyProvisioningContext() service.ProvisioningContext
GetEmptyProvisioningContext returns an empty instance of a module-specific provisioningContext
func (*Module) GetEmptyProvisioningParameters ¶
func ( m *Module, ) GetEmptyProvisioningParameters() service.ProvisioningParameters
GetEmptyProvisioningParameters returns an empty instance of module-specific provisioningParameters
func (*Module) GetEmptyUpdatingParameters ¶
func ( m *Module, ) GetEmptyUpdatingParameters() service.UpdatingParameters
GetEmptyUpdatingParameters returns an empty instance of module-specific updatingParameters
func (*Module) GetProvisioner ¶
GetProvisioner returns a provisioner that defines the steps a module must execute asynchronously to provision a service
func (*Module) GetStability ¶
GetStability returns this module's relative stability
func (*Module) GetUpdater ¶
GetUpdater returns a updater that defines the steps a module must execute asynchronously to update a service
func (*Module) Unbind ¶
func (m *Module) Unbind( provisioningContext service.ProvisioningContext, bindingContext service.BindingContext, ) error
Unbind synchronously unbinds from a service
func (*Module) ValidateBindingParameters ¶
func (m *Module) ValidateBindingParameters( bindingParameters service.BindingParameters, ) error
ValidateBindingParameters validates the provided bindingParameters and returns an error if there is any problem
func (*Module) ValidateProvisioningParameters ¶
func (m *Module) ValidateProvisioningParameters( provisioningParameters service.ProvisioningParameters, ) error
ValidateProvisioningParameters validates the provided provisioningParameters and returns an error if there is any problem
func (*Module) ValidateUpdatingParameters ¶
func (m *Module) ValidateUpdatingParameters( updatingParameters service.UpdatingParameters, ) error
ValidateUpdatingParameters validates the provided updatingParameters and returns an error if there is any problem
type ProvisioningContext ¶
type ProvisioningContext struct {
ResourceGroupName string `json:"resourceGroup"`
}
ProvisioningContext represents context collected and modified over the course of the fake service module's provisioning and deprovisioning processes. Note that, ordinarily, service module-specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
type ProvisioningParameters ¶
type ProvisioningParameters struct {
SomeParameter string `json:"someParameter"`
}
ProvisioningParameters represents parameters specific to provisioning a service using the fake service module. Note that, ordinarily, service module- specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
func (*ProvisioningParameters) SetResourceGroup ¶
func (p *ProvisioningParameters) SetResourceGroup(resourceGroup string)
SetResourceGroup sets the name of the resource group into which service instances will be deployed
type ProvisioningValidationFunction ¶
type ProvisioningValidationFunction func(service.ProvisioningParameters) error
ProvisioningValidationFunction describes a function used to provide pluggable provisioning validation behavior to the fake implementation of the service.Module interface
type UnbindFunction ¶
type UnbindFunction func( provisioningContext service.ProvisioningContext, bindingContext service.BindingContext, ) error
UnbindFunction describes a function used to provide pluggable unbinding behavior to the fake implementation of the service.Module interface
type UpdatingParameters ¶
type UpdatingParameters struct {
SomeParameter string `json:"someParameter"`
}
UpdatingParameters represents parameters specific to binding to a service instance using the fake service module. Note that, ordinarily, service module-specific types such as this do not need to be exported. An exception is made here because the fake service module is used to facilitate testing of the broker framework itself.
type UpdatingValidationFunction ¶
type UpdatingValidationFunction func(service.UpdatingParameters) error
UpdatingValidationFunction describes a function used to provide pluggable updating validation behavior to the fake implementation of the service.Module interface