platform

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2018 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogFetcher

type CatalogFetcher interface {

	// Fetch contains the logic for platform specific catalog fetching for the provided service broker
	Fetch(ctx context.Context, serviceBroker *ServiceBroker) error
}

CatalogFetcher provides a way to add a hook for platform specific way of refetching the service broker catalog on each run of the registration task. If the platform that this proxy represents already handles that, you don't have to implement this interface

type Client

type Client interface {
	// GetBrokers obtains the registered brokers in the platform
	GetBrokers(ctx context.Context) ([]ServiceBroker, error)

	// CreateBroker registers a new broker at the platform
	CreateBroker(ctx context.Context, r *CreateServiceBrokerRequest) (*ServiceBroker, error)

	// DeleteBroker unregisters a broker from the platform
	DeleteBroker(ctx context.Context, r *DeleteServiceBrokerRequest) error

	// UpdateBroker updates a broker registration at the platform
	UpdateBroker(ctx context.Context, r *UpdateServiceBrokerRequest) (*ServiceBroker, error)
}

Client provides the logic for calling into the underlying platform and performing platform specific operations

type CreateServiceBrokerRequest

type CreateServiceBrokerRequest struct {
	Name      string `json:"name"`
	BrokerURL string `json:"broker_url"`
}

CreateServiceBrokerRequest type used for requests by the platform client

type DeleteServiceBrokerRequest

type DeleteServiceBrokerRequest struct {
	GUID string `json:"guid"`
	Name string `json:"name"`
}

DeleteServiceBrokerRequest type used for requests by the platform client

type ServiceAccess

type ServiceAccess interface {
	// EnableAccessForService enables the access to all plans of the service with the specified GUID
	// for the entities in the data
	EnableAccessForService(ctx context.Context, data json.RawMessage, serviceGUID string) error

	// EnableAccessForPlan enables the access to the plan with the specified GUID for
	// the entities in the data
	EnableAccessForPlan(ctx context.Context, data json.RawMessage, servicePlanGUID string) error

	// DisableAccessForService disables the access to all plans of the service with the specified GUID
	// for the entities in the data
	DisableAccessForService(ctx context.Context, data json.RawMessage, serviceGUID string) error

	// DisableAccessForPlan disables the access to the plan with the specified GUID for
	// the entities in the data
	DisableAccessForPlan(ctx context.Context, data json.RawMessage, servicePlanGUID string) error
}

ServiceAccess provides a way to add a hook for a platform specific way of enabling and disabling service and plan access.

type ServiceBroker

type ServiceBroker struct {
	GUID             string                     `json:"guid"`
	Name             string                     `json:"name"`
	BrokerURL        string                     `json:"broker_url"`
	ServiceOfferings []types.ServiceOffering    `json:"services"`
	Metadata         map[string]json.RawMessage `json:"metadata"`
}

ServiceBroker type for responses from the platform client

type ServiceBrokerList

type ServiceBrokerList struct {
	ServiceBrokers []ServiceBroker `json:"service_brokers"`
}

ServiceBrokerList type for responses from the platform client

type UpdateServiceBrokerRequest

type UpdateServiceBrokerRequest struct {
	GUID      string `json:"guid"`
	Name      string `json:"name"`
	BrokerURL string `json:"broker_url"`
}

UpdateServiceBrokerRequest type used for requests by the platform client

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL