Documentation
¶
Overview ¶
Package sqlcipherstorage constructs the EUDI holder storage backed by an sqlcipher-encrypted SQLite database (the wallet-on-a-device deployment).
It is split out of the parent eudi/storage package on purpose: sqlcipher is a cgo package (it links libsqlcipher), and Go compiles every imported package. Keeping the sqlcipher constructor here means a consumer of storage.NewStorageWithDialector — e.g. a gorm.io/driver/postgres, server-side deployment — can import eudi/storage without compiling sqlcipher, and so build with CGO_ENABLED=0 (and without libsqlcipher on the build host). Consumers that want the sqlcipher database import this package explicitly.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func New ¶
New opens (or creates) an sqlcipher-encrypted SQLite database at dbPath, then delegates to storage.NewStorageWithDialector to auto-migrate all registered models. dbPath can be ":memory:" for an in-memory database (useful for testing) or a path to a file.
Note: the default transaction has been DISABLED, which means any Create or Update operation should be wrapped in a transaction (either directly or using the UnitOfWork) to ensure data integrity.
Types ¶
This section is empty.