package
0.3.8-beta
Repository: https://github.com/lightninglabs/aperture.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

DisableLog disables all library log output.
MapSQLError attempts to interpret a given error as a database agnostic SQL error.
NewLNCSessionsDBReadTx creates a new read transaction option set.
NewSecretsStore creates a new SecretsStore instance given a open BatchedSecretsDB storage backend.
NewOnionDBReadTx creates a new read transaction option set.
NewOnionStore creates a new OnionStore instance given a open BatchedOnionDB storage backend.
NewPostgresStore creates a new store that is backed by a Postgres database backend.
NewSecretsDBReadTx creates a new read transaction option set.
NewSecretsStore creates a new SecretsStore instance given a open BatchedSecretsDB storage backend.
NewSqliteStore attempts to open a new sqlite database based on the passed config.
NewTestDB is a helper function that creates an SQLite database for testing.
NewTestPgFixture constructs a new TestPgFixture starting up a docker container running Postgres 11.
NewTestPostgresDB is a helper function that creates a Postgres database for testing.
NewTestSqliteDB is a helper function that creates an SQLite database for testing.
NewTransactionExecutor creates a new instance of a TransactionExecutor given a Querier query object and a concrete type for the type of transactions the Querier understands.
UseLogger uses a specified Logger to output package logging info.
WithTxRetries is a functional option that allows us to specify the number of times a transaction should be retried if it fails with a repeatable error.
WithTxRetryDelay is a functional option that allows us to specify the delay to wait before a transaction is retried.

# Constants

DefaultNumTxRetries is the default number of times we'll retry a transaction if it fails with an error that permits transaction repetition.
DefaultRetryDelay is the default delay between retries.
DefaultStoreTimeout is the default timeout used for any interaction with the storage/database.
No description provided by the author
Subsystem defines the logging code for this subsystem.

# Variables

DefaultPostgresFixtureLifetime is the default maximum time a Postgres test fixture is being kept alive.
ErrRetriesExceeded is returned when a transaction is retried more than the max allowed valued without a success.

# Structs

BaseDB is the base database struct that each implementation can embed to gain some common functionality.
ErrSerializationError is an error type which represents a database agnostic error that a transaction couldn't be serialized with other concurrent db transactions.
ErrSQLUniqueConstraintViolation is an error type which represents a database agnostic SQL unique constraint violation.
LNCSessionsDBTxOptions defines the set of db txn options the LNCSessionsDB understands.
LNCSessionsStore represents a storage backend.
OnionTxOptions defines the set of db txn options the OnionStore understands.
OnionStore represents a storage backend.
PostgresConfig holds the postgres database configuration.
PostgresStore is a database store implementation that uses a Postgres backend.
SecretsTxOptions defines the set of db txn options the SecretsStore understands.
SecretsStore represents a storage backend.
SqliteConfig holds all the config arguments needed to interact with our sqlite DB.
SqliteStore is a database store implementation that uses a sqlite backend.
TestPgFixture is a test fixture that starts a Postgres 11 instance in a docker container.
TransactionExecutor is a generic struct that abstracts away from the type of query a type needs to run under a database transaction, and also the set of options for that transaction.

# Interfaces

BatchedLNCSessionsDB is a version of the LNCSecretsDB that's capable of batched database operations.
BatchedOnionDB is a version of the OnionDB that's capable of batched database operations.
BatchedQuerier is a generic interface that allows callers to create a new database transaction based on an abstract type that implements the TxOptions interface.
BatchedSecretsDB is a version of the SecretsDB that's capable of batched database operations.
BatchedTx is a generic interface that represents the ability to execute several operations to a given storage interface in a single atomic transaction.
LNCSessionsDB is an interface that defines the set of operations that can be executed agaist the lnc sessions database.
OnionDB is an interface that defines the set of operations that can be executed against the onion database.
SecretsDB is an interface that defines the set of operations that can be executed against the secrets database.
Tx represents a database transaction that can be committed or rolled back.
TxOptions represents a set of options one can use to control what type of database transaction is created.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
QueryCreator is a generic function that's used to create a Querier, which is a type of interface that implements storage related methods from a database transaction.
No description provided by the author
No description provided by the author
TxExecutorOption is a functional option that allows us to pass in optional argument when creating the executor.