appdatabase

package
v0.114.4 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeDatabasePassword added in v0.80.2

func ChangeDatabasePassword(path string, password string, kdfIterationsNumber int, newPassword string) error

func DecryptDatabase added in v0.69.0

func DecryptDatabase(oldPath, newPath, password string, kdfIterationsNumber int) error

DecryptDatabase creates an unencrypted copy of the database and copies it over to the given directory

func EncryptDatabase added in v0.69.0

func EncryptDatabase(oldPath, newPath, password string, kdfIterationsNumber int) error

EncryptDatabase creates an encrypted copy of the database and copies it to the user path

func GetDBFilename added in v0.97.0

func GetDBFilename(db *sql.DB) (string, error)

GetDBFilename takes an instance of sql.DB and returns the filename of the "main" database

func InitializeDB

func InitializeDB(path, password string, kdfIterationsNumber int) (*sql.DB, error)

InitializeDB creates db file at a given path and applies migrations.

func SetupTestMemorySQLDB added in v0.97.0

func SetupTestMemorySQLDB(prefix string) (*sql.DB, error)

func SetupTestSQLDB added in v0.97.0

func SetupTestSQLDB(prefix string) (*sql.DB, func() error, error)

SetupTestSQLDB creates a temporary sqlite database file, initialises and then returns with a teardown func

Types

This section is empty.

Directories

Path Synopsis
sql
sql

Jump to

Keyboard shortcuts

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