Documentation
¶
Index ¶
Constants ¶
View Source
const ( DATABASE_LAYER_EMPTY = iota DATABASE_LAYER_1 // original schema, as of 2019 DATABASE_LAYER_2 // hash_pre_enc removed, hash_post_enc renamed to final_hash, encryption_key renamed to padding_key, encryption_key added to blob_entries DATABASE_LAYER_3 // blob_entries_by_blob_id index replaced with unique blob_entries_by_blob_id_and_hash, unique index on blob_storage(blob_id, storage_id), shares table added )
Variables ¶
View Source
var DB *sql.DB
View Source
var ErrNoRows = sql.ErrNoRows
Functions ¶
func Must ¶
func Must(err error)
only to be used for sqlite errors sql errors in gb are 1. unrecoverable 2. not expected to ever be user-facing a panic is the right choice
func SetupDatabase ¶
func SetupDatabase()
func SetupDatabaseTestMode ¶
func SetupDatabaseTestMode(setupSchema bool)
func ShutdownDatabase ¶
func ShutdownDatabase()
func StartsWithPattern ¶
Types ¶
type DatabaseLayer ¶
type DatabaseLayer int
Click to show internal directories.
Click to hide internal directories.