store

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// SetServiceClass persists the given service class to the underlying storage
	SetServiceClass(service *model.ServiceClassSpec) error
	// GetServiceClass retrieves a persisted instance from the underlying storage by
	// instance id
	GetServiceClass(serviceID string) (*model.ServiceClassSpec, bool, error)
	// ListServiceClasses retrieves all persisted service classes from the underlying storage
	ListServiceClasses() ([]*model.ServiceClassSpec, error)
	// DeleteServiceClass deletes a persisted service class from the underlying storage by
	// service id
	DeleteServiceClass(serviceID string) (bool, error)

	// SetInstance persists the given instance to the underlying storage
	SetInstance(instance *model.ServiceInstanceSpec) error
	// GetInstance retrieves a persisted instance from the underlying storage by
	// instance id
	GetInstance(instanceID string) (*model.ServiceInstanceSpec, bool, error)
	// ListInstances retrieves all persisted instances from the underlying storage
	ListInstances() ([]*model.ServiceInstanceSpec, error)
	// DeleteInstance deletes a persisted instance from the underlying storage by
	// instance id
	DeleteInstance(instanceID string) (bool, error)

	// SetBinding persists the given binding to the underlying storage
	SetBinding(binding *model.ServiceBindingSpec) error
	// GetBinding retrieves a persisted instance from the underlying storage by
	// binding id and instance id
	GetBinding(bindingID, instanceID string) (*model.ServiceBindingSpec, bool, error)
	// ListBindings retrieves all persisted instance bindings from the underlying
	// storage
	ListBindings(instanceID string) ([]*model.ServiceBindingSpec, error)
	// DeleteBinding deletes a persisted binding from the underlying storage by
	// binding id and instance id
	DeleteBinding(bindingID, instanceID string) (bool, error)
}

Store is an interface to be implemented by types capable of handling persistence for other broker-related types

func NewStore

func NewStore(driver, endpoint string) Store

NewStore function can perform some initialization work of different databases.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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