Documentation ¶
Index ¶
Constants ¶
View Source
const ( DonationCreationFailure = "failed creating donation in database" JSONMarshalFailure = "failed marshalling JSON data" )
define error messages
View Source
const (
ConnectionError = "connection error"
)
define general error messages
Variables ¶
This section is empty.
Functions ¶
func ConnectDB ¶
func ConnectDB() error
ConnectDB reads environment variables for DB configuration and attempts to open the connection
func InitializeDB ¶
func InitializeDB(quit chan struct{}, errors chan config.ErrorMessage)
InitializeDB connects to the Database and migrates the schema
func InitializeTestDB ¶
func InitializeTestDB()
InitializeTestDB connects to an inmemory sqlite for testing
Types ¶
Click to show internal directories.
Click to hide internal directories.