Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DetermineConnection ¶
func DetermineConnection(d *appconfig.DbSettings) string
func InitLogger ¶
func InitLogger(service string)
InitLogger initialises and caches the logging server will send warning and above messages to Discord if the DISCORD_LOGGING_WEBHOOK_URL environment variable is set
Types ¶
type DB ¶
type DB interface { // --- Quick lookup if invoice exists ------------------------------------------------------------------- FindInvoice(invoice string) (string, error) // --- Add new invoice ---------------------------------------------------------------------------------- AddInvoice(username string, invoice string, pkg string, purdate string, email string) (string, error) // --- Remove invoice from user ------------------------------------------------------------------------- DeleteInvoice(invoice string) (string, error) // --- Search and return invoice details ---------------------------------------------------------------- SearchInvoice(invoice string) (string, error) // --- Search and return user details ------------------------------------------------------------------- SearchUser(username string) (string, error) // --- Initial DB setup --------------------------------------------------------------------------------- DbSetup(setup bool) (bool, string, error) // --- Ensure that all migrations are done -------------------------------------------------------------- Ensure() error // --- Run db mainloop ---------------------------------------------------------------------------------- Run() // --- Close access to database ------------------------------------------------------------------------- Close() error }
type DbConfig ¶
type DbConfig struct { Db *appconfig.DbSettings Xorm *XormDB }
Click to show internal directories.
Click to hide internal directories.