extension

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2016 License: Apache-2.0 Imports: 4 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Validate

func Validate(svc *ServiceExtension) bool

Types

type CatalogExtension

type CatalogExtension struct {
	Services []*ServiceExtension `json:"services"`
}

CatalogExtension describes Cloud Foundry catalog but holds extended Service informations, also.

type ServiceConfiguration

type ServiceConfiguration struct {
	ServiceName string   `json:"service_name"`
	Params      []string `json:"parameters"`
}

type ServiceCreationResponse

type ServiceCreationResponse struct {
	cf.ServiceCreationResponse
	App types.CfAppResource `json:"-"`
}

type ServiceExtension

type ServiceExtension struct {
	cf.Service
	ReferenceApp  types.CfAppResource     `json:"app"`
	Configuration []*ServiceConfiguration `json:"configuration,omitempty"`
}

ServiceExtension extends cf.Service with data describing application to clone.

func NewAutogeneratedService

func NewAutogeneratedService() *ServiceExtension

type ServiceInstanceExtension

type ServiceInstanceExtension struct {
	ID        string              `json:"id"`
	ServiceID string              `json:"service_id"`
	App       types.CfAppResource `json:"app"`
}

type ServiceProviderExtension

type ServiceProviderExtension interface {

	// Appends service to the catalog managed by this broker
	InsertToCatalog(*ServiceExtension) error

	// Updates service in the catalog managed by this broker
	UpdateCatalog(*ServiceExtension) error

	// Deletes service description from the catalog
	DeleteFromCatalog(serviceID string) error

	// GetCatalog returns the catalog of services managed by this broker
	GetCatalog() (*CatalogExtension, error)

	// CreateService creates a service instance for specific plan
	CreateService(r *cf.ServiceCreationRequest) (*cf.ServiceCreationResponse, error)

	// DeleteService deletes previously created service instance
	DeleteService(instanceID string) error

	// BindService binds to specified service instance and
	// Returns credentials necessary to establish connection to that service
	BindService(r *cf.ServiceBindingRequest) (*types.ServiceBindingResponse, error)
}

ServiceProviderExtension beside standard cf.ServiceProvider introduces additional API endpoints.

Jump to

Keyboard shortcuts

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