Documentation ¶
Overview ¶
Package storage is an internal Porter package that implements the crud store via plugins.
Index ¶
- Constants
- type Manager
- func (m *Manager) Close() error
- func (m *Manager) Connect() error
- func (m *Manager) Count(itemType string, group string) (int, error)
- func (m *Manager) Delete(itemType string, name string) error
- func (m *Manager) GetDataStore() crud.Store
- func (m *Manager) HandleConnect() (func() error, error)
- func (m *Manager) List(itemType string, group string) ([]string, error)
- func (m *Manager) Migrate() (string, error)
- func (m *Manager) MigrationRequired() bool
- func (m *Manager) Read(itemType string, name string) ([]byte, error)
- func (m *Manager) ReadAll(itemType string, group string) ([][]byte, error)
- func (m *Manager) Save(itemType string, group string, name string, data []byte) error
- func (m *Manager) ShouldMigrateClaims() bool
- func (m *Manager) ShouldMigrateCredentials() bool
- func (m *Manager) ShouldMigrateParameters() bool
- type Schema
- type StorageProvider
Constants ¶
const ( ParameterSetDefaultSchemaVersion schema.Version = "1.0.0-DRAFT+TODO" ParameterSetCNABSpecVersion string = "cnab-parametersets-" + string(ParameterSetDefaultSchemaVersion) )
TODO (carolynvs): Replace with cnab-go's const when this moves to cnab-go
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager struct { *config.Config // BackingStore is the underlying storage managed by this instance. It // shouldn't be used for typed read/access the data, for that use the ClaimsProvider // or CredentialsProvider which works with the Storage.Manager. *crud.BackingStore // contains filtered or unexported fields }
Manager handles high level functions over Porter's storage systems such as migrating data formats.
func NewManager ¶
NewManager creates a storage manager for a backing datastore.
func (*Manager) GetDataStore ¶
func (*Manager) HandleConnect ¶
func (*Manager) MigrationRequired ¶
MigrationRequired determines if a migration of Porter's storage system is necessary.
func (*Manager) ShouldMigrateClaims ¶
ShouldMigrateClaims determines if the claims storage system requires a migration.
func (*Manager) ShouldMigrateCredentials ¶
ShouldMigrateCredentials determines if the credentials storage system requires a migration.
func (*Manager) ShouldMigrateParameters ¶
ShouldMigrateParameters determines if the parameters storage system requires a migration.
type StorageProvider ¶
type StorageProvider interface { // Migrate executes a migration on any/all of Porter's storage sub-systems. Migrate() (string, error) }
StorageProvider handles high level functions over Porter's storage systems such as migrating data formats.
Directories ¶
Path | Synopsis |
---|---|
Package crudstore defines the crudstore plugin interface shared between Porter and its plugin.
|
Package crudstore defines the crudstore plugin interface shared between Porter and its plugin. |
Package filesystem implements the crudstore plugin interface, storing data on the local filesystem.
|
Package filesystem implements the crudstore plugin interface, storing data on the local filesystem. |
Package pluginstore is an internal Porter package that implements the crud.Store interface via plugins.
|
Package pluginstore is an internal Porter package that implements the crud.Store interface via plugins. |