sqlcipherstorage

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

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

func New(aesKey [32]byte, dbPath string, storagePath string) (storage.Storage, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL