dbsetup

package
v0.166.3 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2023 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChangeDatabasePassword

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

func DecryptDatabase

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

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

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

func ExportDB

func ExportDB(path string, password string, kdfIterationsNumber int, newDbPath string, newPassword string, onStart func(), onEnd func()) error

func GetDBFilename

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

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

Types

type DatabaseInitializer

type DatabaseInitializer interface {
	Initialize(path, password string, kdfIterationsNumber int) (*sql.DB, error)
}

Jump to

Keyboard shortcuts

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