gpgvfs

package module
v0.0.0-...-29767dc Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

README

sqlite3-gpgvfs

Combine github.com/blang/vfs and github.com/psanford/sqlite3vfs to directly open GPG-encrypted SQLite3 databases.

Compatible with github.com/mattn/go-sqlite3.

TODO

  • sqlite file has to be wrapped in base64, otherwise it misses some bytes and sqlite3 decrypted.db says the db is corrupted;

Documentation

Index

Constants

View Source
const DecryptedPath = "/data/file.db"

Variables

View Source
var ErrWrongPassword = errors.New("openpgp.ReadMessage: wrong password")

Functions

func InitializeFile

func InitializeFile(path string, password []byte) error

Types

type GPGVFS

type GPGVFS struct {
	// contains filtered or unexported fields
}

func NewGPGVFS

func NewGPGVFS(path string, password []byte) (*GPGVFS, error)

func (*GPGVFS) Access

func (gpgvfs *GPGVFS) Access(path string, flag sqlite3vfs.AccessFlag) (bool, error)

func (*GPGVFS) Close

func (gpgvfs *GPGVFS) Close(path string, EncryptionPassphrase []byte) error

func (*GPGVFS) Delete

func (gpgvfs *GPGVFS) Delete(path string, dirSync bool) error

func (*GPGVFS) FullPathname

func (gpgvfs *GPGVFS) FullPathname(path string) string

func (*GPGVFS) Open

func (gpgvfs *GPGVFS) Open(path string, flags sqlite3vfs.OpenFlag) (sqlite3vfs.File, sqlite3vfs.OpenFlag, error)

Jump to

Keyboard shortcuts

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