Documentation ¶
Overview ¶
Package storage contains logic around the Service Manager persistent storage
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Broker ¶
type Broker interface { // Create stores a broker in SM DB Create(ctx context.Context, broker *types.Broker) error // Get retrieves a broker using the provided id from SM DB Get(ctx context.Context, id string) (*types.Broker, error) // GetAll retrieves all brokers from SM DB GetAll(ctx context.Context) ([]*types.Broker, error) // Delete deletes a broker from SM DB Delete(ctx context.Context, id string) error // Update updates a broker from SM DB Update(ctx context.Context, broker *types.Broker) error }
Broker interface for Broker db operations
type Credentials ¶
type Credentials interface { // Get retrieves credentials using the provided username from SM DB Get(ctx context.Context, username string) (*types.Credentials, error) }
Credentials interface for Credentials db operations
type Platform ¶
type Platform interface { // Create stores a platform in SM DB Create(ctx context.Context, platform *types.Platform) error // Get retrieves a platform using the provided id from SM DB Get(ctx context.Context, id string) (*types.Platform, error) // GetAll retrieves all platforms from SM DB GetAll(ctx context.Context) ([]*types.Platform, error) // Delete deletes a platform from SM DB Delete(ctx context.Context, id string) error // Update updates a platform from SM DB Update(ctx context.Context, platform *types.Platform) error }
Platform interface for Platform db operations
type Security ¶
type Security interface { // Lock locks the storage so that only one process can manipulate the encryption key. // Returns an error if the process has already acquired the lock Lock(ctx context.Context) error // Unlock releases the acquired lock. Unlock(ctx context.Context) error // Fetcher provides means to obtain the encryption key Fetcher() security.KeyFetcher // Setter provides means to change the encryption key Setter() security.KeySetter }
Security interface for encryption key operations
type Settings ¶
type Settings struct {
URI string
}
Settings type to be loaded from the environment
func DefaultSettings ¶
func DefaultSettings() *Settings
DefaultSettings returns default values for storage settings
type Storage ¶
type Storage interface { // Open initializes the storage, e.g. opens a connection to the underlying storage Open(uri string, encryptionKey []byte) error // Close clears resources associated with this storage, e.g. closes the connection the underlying storage Close() error // Ping verifies a connection to the database is still alive, establishing a connection if necessary. Ping() error // Broker provides access to service broker db operations Broker() Broker // Platform provides access to platform db operations Platform() Platform // Credentials provides access to credentials db operations Credentials() Credentials // Security provides access to encryption key management Security() Security }
Storage interface provides entity-specific storages
Directories ¶
Path | Synopsis |
---|---|
Package postgres implements the Service Manager storage interfaces for Postgresql Storage Package postgres implements the Service Manager storage interfaces for Postgresql Storage
|
Package postgres implements the Service Manager storage interfaces for Postgresql Storage Package postgres implements the Service Manager storage interfaces for Postgresql Storage |
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.