Documentation
¶
Index ¶
- Constants
- func NewNamedDriver(config driver.Config, dbProvider postgres2.DbProvider) driver3.NamedDriver
- func NewPersistenceWithOpts[V common2.DBObject](cfg *postgres2.ConfigProvider, dbProvider postgres2.DbProvider, ...) (V, error)
- type Driver
- func (d *Driver) NewEndorseTx(name driver.PersistenceName, params ...string) (driver3.EndorseTxStore, error)
- func (d *Driver) NewEnvelope(name driver.PersistenceName, params ...string) (driver3.EnvelopeStore, error)
- func (d *Driver) NewMetadata(name driver.PersistenceName, params ...string) (driver3.MetadataStore, error)
- func (d *Driver) NewVault(name driver.PersistenceName, params ...string) (driver2.VaultStore, error)
- type EndorseTxStore
- type EnvelopeStore
- type MetadataStore
- type VaultStore
Constants ¶
View Source
const (
Persistence driver2.PersistenceType = "postgres"
)
Variables ¶
This section is empty.
Functions ¶
func NewNamedDriver ¶
func NewNamedDriver(config driver.Config, dbProvider postgres2.DbProvider) driver3.NamedDriver
func NewPersistenceWithOpts ¶
func NewPersistenceWithOpts[V common2.DBObject](cfg *postgres2.ConfigProvider, dbProvider postgres2.DbProvider, name driver.PersistenceName, constructor common3.PersistenceConstructor[V], params ...string) (V, error)
NewPersistenceWithOpts constructs a V backed by the postgres persistence configured under name and params: it resolves the connection options and table names, opens the database, and invokes constructor to build the store, creating its schema unless configured to skip.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func NewDriverWithDbProvider ¶
func NewDriverWithDbProvider(config driver.Config, dbProvider postgres2.DbProvider) *Driver
func (*Driver) NewEndorseTx ¶
func (d *Driver) NewEndorseTx(name driver.PersistenceName, params ...string) (driver3.EndorseTxStore, error)
func (*Driver) NewEnvelope ¶
func (d *Driver) NewEnvelope(name driver.PersistenceName, params ...string) (driver3.EnvelopeStore, error)
func (*Driver) NewMetadata ¶
func (d *Driver) NewMetadata(name driver.PersistenceName, params ...string) (driver3.MetadataStore, error)
func (*Driver) NewVault ¶
func (d *Driver) NewVault(name driver.PersistenceName, params ...string) (driver2.VaultStore, error)
type EndorseTxStore ¶
type EndorseTxStore struct {
*common.EndorseTxStore
}
func NewEndorseTxStore ¶
func NewEndorseTxStore(dbs *common2.RWDB, tables common.TableNames) (*EndorseTxStore, error)
type EnvelopeStore ¶
type EnvelopeStore struct {
*common.EnvelopeStore
}
func NewEnvelopeStore ¶
func NewEnvelopeStore(dbs *common2.RWDB, tables common.TableNames) (*EnvelopeStore, error)
type MetadataStore ¶
type MetadataStore struct {
*common.MetadataStore
}
func NewMetadataStore ¶
func NewMetadataStore(dbs *common2.RWDB, tables common.TableNames) (*MetadataStore, error)
type VaultStore ¶
type VaultStore struct {
*common4.VaultStore
// contains filtered or unexported fields
}
func NewVaultStore ¶
func NewVaultStore(dbs *common3.RWDB, tables common4.TableNames) (*VaultStore, error)
NewVaultStore creates a postgres-backed VaultStore for the given read/write database and table names.
func (*VaultStore) CreateSchema ¶
func (db *VaultStore) CreateSchema() error
CreateSchema creates the status and state tables if they do not exist, then ensures the state table stores pkey as BYTEA (see convertTextKeys).
Click to show internal directories.
Click to hide internal directories.