Versions in this module Expand all Collapse all v1 v1.0.0 Mar 23, 2020 Changes in this version + func AddFlags(o *Options) + func ApplyParamsToStatement(statement string, args ...string) string + func CanGetBindings(status string) bool + func ConflictErrorWithMessage(description string) error + func CrudeOSBIHacks(router *mux.Router, b *BusinessLogic) + func FinishedTask(storage Storage, taskId string, retries int64, result string, status string) + func GetStatus(status *elasticsearchservice.ElasticsearchDomainStatus) string + func HttpWrite(w http.ResponseWriter, status int, obj interface{}) + func InProgress(status string) bool + func InternalServerError() error + func IsAvailable(status string) bool + func IsReady(status *elasticsearchservice.ElasticsearchDomainStatus) bool + func NotFound() error + func RandomString(n int) string + func RunBackgroundTasks(ctx context.Context, o Options) error + func RunPreprovisionTasks(ctx context.Context, o Options, namePrefix string, storage Storage, wait int64) + func RunWorkerTasks(ctx context.Context, o Options, namePrefix string, storage Storage) error + func TickTocPreprovisionTasks(ctx context.Context, o Options, namePrefix string, storage Storage) + func UnprocessableEntity() error + func UnprocessableEntityWithMessage(err string, description string) error + func UpdateTaskStatus(storage Storage, taskId string, retries int64, result string, status string) + func UpgradeAcrossProviders(storage Storage, fromDb *Instance, toPlanId string, namePrefix string) (string, error) + func UpgradeWithinProviders(storage Storage, fromDb *Instance, toPlanId string, namePrefix string) (string, error) + type AWSInstanceESProvider struct + func NewAWSInstanceESProvider(namePrefix string) (*AWSInstanceESProvider, error) + func (provider AWSInstanceESProvider) CreateRandomName() string + func (provider AWSInstanceESProvider) Deprovision(Instance *Instance, takeSnapshot bool) error + func (provider AWSInstanceESProvider) GetInstance(name string, plan *ProviderPlan) (*Instance, error) + func (provider AWSInstanceESProvider) GetUrl(instance *Instance) map[string]interface{} + func (provider AWSInstanceESProvider) Modify(instance *Instance, plan *ProviderPlan) (*Instance, error) + func (provider AWSInstanceESProvider) PerformPostProvision(db *Instance) (*Instance, error) + func (provider AWSInstanceESProvider) Provision(Id string, plan *ProviderPlan, Owner string) (*Instance, error) + func (provider AWSInstanceESProvider) Tag(Instance *Instance, Name string, Value string) error + func (provider AWSInstanceESProvider) Untag(Instance *Instance, Name string) error + type Action struct + type ActionBase struct + func (b *ActionBase) ActionSchemaHandler(w http.ResponseWriter, r *http.Request) + func (b *ActionBase) AddActions(name string, path string, method string, ...) error + func (b *ActionBase) ConvertActionsToExtensions(serviceId string) []osb.ExtensionAPI + func (b *ActionBase) RouteActions(router *mux.Router) error + type BusinessLogic struct + func NewBusinessLogic(ctx context.Context, o Options) (*BusinessLogic, error) + func (b *BusinessLogic) Bind(request *osb.BindRequest, c *broker.RequestContext) (*broker.BindResponse, error) + func (b *BusinessLogic) Deprovision(request *osb.DeprovisionRequest, c *broker.RequestContext) (*broker.DeprovisionResponse, error) + func (b *BusinessLogic) GetBinding(request *osb.GetBindingRequest, context *broker.RequestContext) (*osb.GetBindingResponse, error) + func (b *BusinessLogic) GetCatalog(c *broker.RequestContext) (*broker.CatalogResponse, error) + func (b *BusinessLogic) GetInstanceById(Id string) (*Instance, error) + func (b *BusinessLogic) GetUnclaimedInstance(PlanId string, InstanceId string) (*Instance, error) + func (b *BusinessLogic) LastOperation(request *osb.LastOperationRequest, c *broker.RequestContext) (*broker.LastOperationResponse, error) + func (b *BusinessLogic) Provision(request *osb.ProvisionRequest, c *broker.RequestContext) (*broker.ProvisionResponse, error) + func (b *BusinessLogic) Unbind(request *osb.UnbindRequest, c *broker.RequestContext) (*broker.UnbindResponse, error) + func (b *BusinessLogic) Update(request *osb.UpdateInstanceRequest, c *broker.RequestContext) (*broker.UpdateInstanceResponse, error) + func (b *BusinessLogic) ValidateBrokerAPIVersion(version string) error + type ChangePlansTaskMetadata struct + Plan string + type ChangeProvidersTaskMetadata struct + Plan string + type Entry struct + Claimed bool + Endpoint string + Id string + Name string + Password string + PlanId string + Status string + Tasks int + Username string + type Instance struct + Endpoint string + Engine string + EngineVersion string + Id string + Name string + Password string + Plan *ProviderPlan + ProviderId string + Ready bool + Scheme string + Status string + Username string + func GetInstanceById(namePrefix string, storage Storage, Id string) (*Instance, error) + func (i *Instance) Match(other *Instance) bool + type Options struct + DatabaseUrl string + NamePrefix string + type PostgresStorage struct + func InitStorage(ctx context.Context, o Options) (*PostgresStorage, error) + func (b *PostgresStorage) AddInstance(Instance *Instance) error + func (b *PostgresStorage) AddTask(Id string, action TaskAction, metadata string) (string, error) + func (b *PostgresStorage) DeleteInstance(Instance *Instance) error + func (b *PostgresStorage) GetInstance(Id string) (*Entry, error) + func (b *PostgresStorage) GetPlanByID(planId string) (*ProviderPlan, error) + func (b *PostgresStorage) GetPlans(serviceId string) ([]ProviderPlan, error) + func (b *PostgresStorage) GetServices() ([]osb.Service, error) + func (b *PostgresStorage) GetUnclaimedInstance(PlanId string, InstanceId string) (*Entry, error) + func (b *PostgresStorage) IsRestoring(dbId string) (bool, error) + func (b *PostgresStorage) IsUpgrading(dbId string) (bool, error) + func (b *PostgresStorage) NukeInstance(Id string) error + func (b *PostgresStorage) PopPendingTask() (*Task, error) + func (b *PostgresStorage) ReturnClaimedInstance(Id string) error + func (b *PostgresStorage) StartProvisioningTasks() ([]Entry, error) + func (b *PostgresStorage) UpdateInstance(Instance *Instance, PlanId string) error + func (b *PostgresStorage) UpdateTask(Id string, status *string, retries *int64, metadata *string, result *string, ...) error + func (b *PostgresStorage) ValidateInstanceID(id string) error + func (b *PostgresStorage) WarnOnUnfinishedTasks() + type Provider interface + Deprovision func(*Instance, bool) error + GetInstance func(string, *ProviderPlan) (*Instance, error) + GetUrl func(*Instance) map[string]interface{} + Modify func(*Instance, *ProviderPlan) (*Instance, error) + PerformPostProvision func(*Instance) (*Instance, error) + Provision func(string, *ProviderPlan, string) (*Instance, error) + Tag func(*Instance, string, string) error + Untag func(*Instance, string) error + func GetProviderByPlan(namePrefix string, plan *ProviderPlan) (Provider, error) + type ProviderPlan struct + ID string + Provider Providers + Scheme string + type Providers string + const AWSESInstance + const Unknown + func GetProvidersFromString(str string) Providers + type ResourceSpec struct + Name string + type ResourceUrlSpec struct + Endpoint string + Password string + Plan string + Username string + type RestoreDbTaskMetadata struct + Backup string + type Stat struct + Key string + Value string + type Storage interface + AddInstance func(*Instance) error + AddTask func(string, TaskAction, string) (string, error) + DeleteInstance func(*Instance) error + GetInstance func(string) (*Entry, error) + GetPlanByID func(string) (*ProviderPlan, error) + GetPlans func(string) ([]ProviderPlan, error) + GetServices func() ([]osb.Service, error) + GetUnclaimedInstance func(string, string) (*Entry, error) + IsRestoring func(string) (bool, error) + IsUpgrading func(string) (bool, error) + NukeInstance func(string) error + PopPendingTask func() (*Task, error) + ReturnClaimedInstance func(string) error + StartProvisioningTasks func() ([]Entry, error) + UpdateInstance func(*Instance, string) error + UpdateTask func(string, *string, *int64, *string, *string, *time.Time, *time.Time) error + ValidateInstanceID func(string) error + WarnOnUnfinishedTasks func() + func InitFromOptions(ctx context.Context, o Options) (Storage, string, error) + type Task struct + Action TaskAction + Finished *time.Time + Id string + Metadata string + ResourceId string + Result string + Retries int64 + Started *time.Time + Status string + type TaskAction string + const ChangePlansTask + const ChangeProvidersTask + const DeleteTask + const NotifyCreateBindingWebhookTask + const NotifyCreateServiceWebhookTask + const PerformPostProvisionTask + const RestoreDbTask + const ResyncFromProviderTask + const ResyncFromProviderUntilAvailableTask + type WebhookTaskMetadata struct + Secret string + Url string