Documentation ¶
Index ¶
- type BrokerBase
- func (b *BrokerBase) Bind(ctx context.Context, vc *varcontext.VarContext) (map[string]interface{}, error)
- func (b *BrokerBase) BuildInstanceCredentials(ctx context.Context, bindRecord models.ServiceBindingCredentials, ...) (map[string]interface{}, error)
- func (b *BrokerBase) DeprovisionsAsync() bool
- func (b *BrokerBase) PollInstance(ctx context.Context, instance models.ServiceInstanceDetails) (bool, error)
- func (b *BrokerBase) ProvisionsAsync() bool
- func (b *BrokerBase) Unbind(ctx context.Context, instance models.ServiceInstanceDetails, ...) error
- func (b *BrokerBase) UpdateInstanceDetails(ctx context.Context, instance *models.ServiceInstanceDetails) error
- type ServiceAccountManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BrokerBase ¶
type BrokerBase struct { AccountManager ServiceAccountManager HttpConfig *jwt.Config ProjectId string Logger lager.Logger }
BrokerBase is the reference bind and unbind implementation for brokers that bind and unbind with only Service Accounts.
func NewBrokerBase ¶
NewBrokerBase creates a new broker base and account manager it uses from the given settings.
func (*BrokerBase) Bind ¶
func (b *BrokerBase) Bind(ctx context.Context, vc *varcontext.VarContext) (map[string]interface{}, error)
Bind creates a service account with access to the provisioned resource with the given instance.
func (*BrokerBase) BuildInstanceCredentials ¶
func (b *BrokerBase) BuildInstanceCredentials(ctx context.Context, bindRecord models.ServiceBindingCredentials, instanceRecord models.ServiceInstanceDetails) (map[string]interface{}, error)
BuildInstanceCredentials combines the bind credentials with the connection information in the instance details to get a full set of connection details.
func (*BrokerBase) DeprovisionsAsync ¶
func (b *BrokerBase) DeprovisionsAsync() bool
DeprovisionsAsync indicates if deprovisioning must be done asynchronously.
func (*BrokerBase) PollInstance ¶
func (b *BrokerBase) PollInstance(ctx context.Context, instance models.ServiceInstanceDetails) (bool, error)
PollInstance does nothing but return an error because Base services are provisioned synchronously so this method should not be called.
func (*BrokerBase) ProvisionsAsync ¶
func (b *BrokerBase) ProvisionsAsync() bool
ProvisionsAsync indicates if provisioning must be done asynchronously.
func (*BrokerBase) Unbind ¶
func (b *BrokerBase) Unbind(ctx context.Context, instance models.ServiceInstanceDetails, creds models.ServiceBindingCredentials) error
Unbind deletes the created service account from the GCP Project.
func (*BrokerBase) UpdateInstanceDetails ¶
func (b *BrokerBase) UpdateInstanceDetails(ctx context.Context, instance *models.ServiceInstanceDetails) error
UpdateInstanceDetails updates the ServiceInstanceDetails with the most recent state from GCP. This instance is a no-op method.
type ServiceAccountManager ¶
type ServiceAccountManager interface { CreateCredentials(ctx context.Context, vc *varcontext.VarContext) (map[string]interface{}, error) DeleteCredentials(ctx context.Context, creds models.ServiceBindingCredentials) error }