Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenSQLite ¶
OpenSQLite opens a pool of SQLite connections. Different settings are appropriate for reading and writing, so this function needs to know what the sql.DB will be used for.
See this comment for more information: https://github.com/mattn/go-sqlite3/issues/1179#issuecomment-1638083995
Types ¶
type Decryptable ¶
type Decryptable struct { Data []byte // contains filtered or unexported fields }
func (*Decryptable) Scan ¶
func (d *Decryptable) Scan(src any) error
type Query ¶
type Query struct { Encryptor *krypto.Encryptor BlindIndexKey krypto.Key // contains filtered or unexported fields }
Query helps build SQL queries using bind parameters. Use Query to construct parts of a query and use Param to add bind parameters. The final query and parameters can be retrieved using the Get method.
The zero value is ready to use.
func (*Query) DecryptionTarget ¶
func (q *Query) DecryptionTarget() *Decryptable
DecryptionTarget returns a decryptable value that can be used to scan encrypted values.
func (*Query) ParamBlindIndex ¶
ParamBlindIndex writes a parameterized part of a query and adds a blind index of the value to the query. Important Note: The blind indexes will need to be rebuild if the key or argon2 parameters change.
func (*Query) ParamEncrypted ¶
Param writes a parameterized part of a query and encrypts the value before adding it to the query.