Documentation
¶
Overview ¶
Package broker holds the implementation of brokerapi.ServiceBroker interface.
Index ¶
- Constants
- Variables
- type API
- type APIM
- func (apimBroker *APIM) Bind(ctx context.Context, svcInstanceID, bindingID string, ...) (domain.Binding, error)
- func (apimBroker *APIM) Deprovision(ctx context.Context, svcInstanceID string, ...) (domain.DeprovisionServiceSpec, error)
- func (apimBroker *APIM) GetBinding(ctx context.Context, svcInstanceID, bindingID string) (domain.GetBindingSpec, error)
- func (apimBroker *APIM) GetInstance(ctx context.Context, svcInstanceID string) (domain.GetInstanceDetailsSpec, error)
- func (apimBroker *APIM) Init()
- func (apimBroker *APIM) LastBindingOperation(ctx context.Context, svcInstanceID, bindingID string, ...) (domain.LastOperation, error)
- func (apimBroker *APIM) LastOperation(ctx context.Context, svcInstanceID string, details domain.PollDetails) (domain.LastOperation, error)
- func (apimBroker *APIM) Provision(ctx context.Context, svcInstanceID string, ...) (domain.ProvisionedServiceSpec, error)
- func (apimBroker *APIM) Services(ctx context.Context) ([]domain.Service, error)
- func (apimBroker *APIM) Unbind(ctx context.Context, svcInstanceID, bindingID string, ...) (domain.UnbindSpec, error)
- func (apimBroker *APIM) Update(cxt context.Context, svcInstanceID string, updateDetails domain.UpdateDetails, ...) (domain.UpdateServiceSpec, error)
- type ServiceParams
Constants ¶
View Source
const ( LogKeyAppID = "application-id" LogKeyServiceID = "service-id" LogKeyPlanID = "plan-id" LogKeyInstanceID = "instance-id" LogKeyBindID = "bind-id" LogKeyApplicationName = "application-name" LogKeyPlatformApplicationName = "platform-application-name" ApplicationDashboardURL = "application-dashboard-url" ErrMsgUnableToStoreInstance = "unable to store service instance in database" ErrActionDelAPP = "delete Application" ErrMsgUnableDelInstance = "unable to delete service instance" ErrMsgUnableToGetBind = "unable to retrieve Bind from the database" ErrMsgUnableToGenInputSchema = "unable to generate %s plan input Schema" ErrMsgUnableToGenBindInputSchema = "unable to generate %s plan bind input Schema" ErrMsgInvalidPlanID = "invalid plan id" ErrMsgUnableGenerateKeys = "unable generate keys for application" ServiceID = "460F28F9-4D05-4889-970A-6BF5FB7D3CF8" ServiceName = "wso2apim-service" ServiceDescription = "Manages WSO2 API Manager artifacts" ApplicationPlanID = "00e851cd-ce8b-43eb-bc27-ac4d4fbb3204" ApplicationPlanName = "app" ApplicationPlanDescription = "Creates an Application with a set of subscription for a given set of APIs in WSO2 API Manager" DebugMsgDelInstance = "delete instance" ApplicationPrefix = "ServiceBroker_" )
Variables ¶
View Source
var ( ErrNotSupported = errors.New("not supported") ErrInvalidSVCPlan = errors.New("invalid service or getServices") )
Functions ¶
This section is empty.
Types ¶
type APIM ¶
type APIM struct{}
APIM struct implements the interface brokerapi.ServiceBroker.
func (*APIM) Bind ¶
func (apimBroker *APIM) Bind(ctx context.Context, svcInstanceID, bindingID string, bindDetails domain.BindDetails, asyncAllowed bool) (domain.Binding, error)
Bind method creates a Bind between given Service instance and the App.
func (*APIM) Deprovision ¶
func (apimBroker *APIM) Deprovision(ctx context.Context, svcInstanceID string, serviceDetails domain.DeprovisionDetails, asyncAllowed bool) (domain.DeprovisionServiceSpec, error)
func (*APIM) GetBinding ¶
func (*APIM) GetInstance ¶
func (*APIM) Init ¶
func (apimBroker *APIM) Init()
Init method initialize the API-M broker. If there is an error it will cause a panic.
func (*APIM) LastBindingOperation ¶
func (apimBroker *APIM) LastBindingOperation(ctx context.Context, svcInstanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error)
func (*APIM) LastOperation ¶
func (apimBroker *APIM) LastOperation(ctx context.Context, svcInstanceID string, details domain.PollDetails) (domain.LastOperation, error)
LastOperation ... If the broker provisions asynchronously, the Cloud Controller will poll this endpoint for the status of the provisioning operation.
func (*APIM) Provision ¶
func (apimBroker *APIM) Provision(ctx context.Context, svcInstanceID string, provisionDetails domain.ProvisionDetails, asyncAllowed bool) (domain.ProvisionedServiceSpec, error)
type ServiceParams ¶
type ServiceParams struct {
APIs []API `json:"apis" hash:"set"`
}
ServiceParams represents the SVC create and update parameter.
Click to show internal directories.
Click to hide internal directories.