Documentation
¶
Index ¶
- Constants
- Variables
- func NewConditionInterpreter() *interpreter
- func NewNamedDriver(config driver.Config, dbProvider DbProvider) driver.NamedDriver
- func NewPaginationInterpreter() common.PagInterpreter
- func NewPersistenceWithOpts[V common3.DBObject](cfg *ConfigProvider, dbProvider DbProvider, name driver.PersistenceName, ...) (V, error)
- func NewSanitizer() *stringSanitizer
- func NewSimplePrimaryKey(name driver.ColumnKey) *primaryKey
- func Open(opts Opts) (*common.RWDB, error)
- func StartPostgres(t Logger, printLogs bool) (func(), string, error)
- func StartPostgresWithFmt(configs []*ContainerConfig) (func(), error)
- type AuditInfoStore
- type BindingStore
- type Config
- type ConfigProvider
- type ContainerConfig
- type DataSourceProvider
- type DbConfig
- type DbProvider
- type Driver
- func (d *Driver) NewAuditInfo(name driver.PersistenceName, params ...string) (driver.AuditInfoStore, error)
- func (d *Driver) NewBinding(name driver.PersistenceName, params ...string) (driver.BindingStore, error)
- func (d *Driver) NewKVS(name driver.PersistenceName, params ...string) (driver.KeyValueStore, error)
- func (d *Driver) NewSignerInfo(name driver.PersistenceName, params ...string) (driver.SignerInfoStore, error)
- type ErrorMapper
- type KeyValueStore
- func (db *KeyValueStore) GetStateRangeScanIterator(ctx context.Context, ns driver.Namespace, startKey, endKey string) (iterators.Iterator[*driver.UnversionedRead], error)
- func (db *KeyValueStore) GetStateSetIterator(ctx context.Context, ns driver.Namespace, keys ...driver.PKey) (iterators.Iterator[*driver.UnversionedRead], error)
- func (db *KeyValueStore) SetStateWithTx(ctx context.Context, tx *sql.Tx, ns driver.Namespace, pkey driver.PKey, ...) error
- func (db *KeyValueStore) SetStates(ctx context.Context, ns driver.Namespace, ...) map[driver.PKey]error
- type KeyValueStoreNotifier
- type Logger
- type Notifier
- type Opts
- type SignerInfoStore
Constants ¶
View Source
const (
Persistence driver2.PersistenceType = "postgres"
)
View Source
const PostgresImage = "fsc.itests/postgres:latest"
postgres:latest will not work on Podman, because Podman automatically prefixes it with localhost/ docker.io/postgres:latest will not work on Docker, because Docker omits the default repo docker.io itests will not be recognized as a domain, so Podman will still prefix it with localhost Hence we use fsc.itests as domain
Variables ¶
View Source
var IsolationLevels = isolationLevelMapper{ driver.LevelDefault: sql.LevelDefault, driver.LevelReadUncommitted: sql.LevelReadUncommitted, driver.LevelReadCommitted: sql.LevelReadCommitted, driver.LevelWriteCommitted: sql.LevelWriteCommitted, driver.LevelRepeatableRead: sql.LevelRepeatableRead, driver.LevelSnapshot: sql.LevelSnapshot, driver.LevelSerializable: sql.LevelSerializable, driver.LevelLinearizable: sql.LevelLinearizable, }
Functions ¶
func NewConditionInterpreter ¶
func NewConditionInterpreter() *interpreter
func NewNamedDriver ¶
func NewNamedDriver(config driver.Config, dbProvider DbProvider) driver.NamedDriver
func NewPaginationInterpreter ¶
func NewPaginationInterpreter() common.PagInterpreter
func NewPersistenceWithOpts ¶
func NewPersistenceWithOpts[V common3.DBObject](cfg *ConfigProvider, dbProvider DbProvider, name driver.PersistenceName, constructor common2.PersistenceConstructor[V], params ...string) (V, error)
func NewSanitizer ¶
func NewSanitizer() *stringSanitizer
func NewSimplePrimaryKey ¶
func StartPostgresWithFmt ¶
func StartPostgresWithFmt(configs []*ContainerConfig) (func(), error)
Types ¶
type AuditInfoStore ¶
type AuditInfoStore struct {
*common3.AuditInfoStore
}
func NewAuditInfoStore ¶
func NewAuditInfoStore(dbs *common2.RWDB, tables common3.TableNames) (*AuditInfoStore, error)
type BindingStore ¶
type BindingStore struct { *common3.BindingStore // contains filtered or unexported fields }
func NewBindingStore ¶
func NewBindingStore(dbs *common2.RWDB, tables common3.TableNames) (*BindingStore, error)
func (*BindingStore) PutBinding ¶
type ConfigProvider ¶
type ConfigProvider struct {
// contains filtered or unexported fields
}
func NewConfigProvider ¶
func NewConfigProvider(config config) *ConfigProvider
func (*ConfigProvider) GetOpts ¶
func (r *ConfigProvider) GetOpts(name driver.PersistenceName, params ...string) (*Config, error)
type ContainerConfig ¶
func DefaultConfig ¶
func DefaultConfig(node string) *ContainerConfig
func ReadDataSource ¶
func ReadDataSource(s string) (*ContainerConfig, error)
type DataSourceProvider ¶
type DataSourceProvider interface {
DataSource() string
}
type DbConfig ¶
func (*DbConfig) DataSource ¶
type DbProvider ¶
func NewDbProvider ¶
func NewDbProvider() DbProvider
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
func NewDriverWithDbProvider ¶
func NewDriverWithDbProvider(config driver.Config, dbProvider DbProvider) *Driver
func (*Driver) NewAuditInfo ¶
func (d *Driver) NewAuditInfo(name driver.PersistenceName, params ...string) (driver.AuditInfoStore, error)
func (*Driver) NewBinding ¶
func (d *Driver) NewBinding(name driver.PersistenceName, params ...string) (driver.BindingStore, error)
func (*Driver) NewKVS ¶
func (d *Driver) NewKVS(name driver.PersistenceName, params ...string) (driver.KeyValueStore, error)
func (*Driver) NewSignerInfo ¶
func (d *Driver) NewSignerInfo(name driver.PersistenceName, params ...string) (driver.SignerInfoStore, error)
type ErrorMapper ¶
type ErrorMapper struct{}
func (*ErrorMapper) WrapError ¶
func (m *ErrorMapper) WrapError(err error) error
type KeyValueStore ¶
type KeyValueStore struct { *common4.KeyValueStore // contains filtered or unexported fields }
func NewKeyValueStore ¶
func NewKeyValueStore(dbs *common3.RWDB, tables common4.TableNames) (*KeyValueStore, error)
func (*KeyValueStore) GetStateRangeScanIterator ¶
func (*KeyValueStore) GetStateSetIterator ¶
func (*KeyValueStore) SetStateWithTx ¶
type KeyValueStoreNotifier ¶
type KeyValueStoreNotifier struct { *KeyValueStore *Notifier }
func (*KeyValueStoreNotifier) CreateSchema ¶
func (db *KeyValueStoreNotifier) CreateSchema() error
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
func NewNotifier ¶
func (*Notifier) CreateSchema ¶
func (*Notifier) UnsubscribeAll ¶
type SignerInfoStore ¶
type SignerInfoStore struct {
*common3.SignerInfoStore
}
func NewSignerInfoStore ¶
func NewSignerInfoStore(dbs *common2.RWDB, tables common3.TableNames) (*SignerInfoStore, error)
Click to show internal directories.
Click to hide internal directories.