Documentation ¶
Index ¶
- Variables
- func CloseApplication()
- func CreateHTTPServer() http.Server
- func ExecPSQLFunc(funcName string, args ...interface{}) ([]*map[string]interface{}, error)
- func ExecRawPSQLQuery(query string) error
- func InitializeApplication()
- func LoggerMiddleware(next http.Handler) http.Handler
- type Configuration
- type CustomLogger
Constants ¶
This section is empty.
Variables ¶
Router routes endpoint requests to their designated functions
View Source
var SQLTLSCert *tls.Config
SQLTLSCert holds TLS Certs for PSQL as the 'pgx' package does not include TLS Certs when reading the connection string
Functions ¶
func CreateHTTPServer ¶
CreateHTTPServer applies the functions to their
func ExecPSQLFunc ¶
ExecPSQLFunc is a convenience wrapper for executing database functions
func ExecRawPSQLQuery ¶
ExecRawPSQLQuery executes a raw query that does not return a result. Will only return an error.
Types ¶
type Configuration ¶
type Configuration struct { Application struct { Environment string `toml:"environment"` LogDirectory string `toml:"log-directory"` } `toml:"application"` Server struct { Host string `toml:"host"` Port int `toml:"port"` } `toml:"api-server"` Database struct { PSQLConnectionString string `toml:"psql-connection-string"` TLSCert string `toml:"tls-cert"` } `toml:"database"` }
var Config Configuration
Config
type CustomLogger ¶
var MainLogger CustomLogger
MainLogger performs logging for tasks on the main thread
func CreateWorkerLogger ¶
func CreateWorkerLogger(workerName string) *CustomLogger
CreateWorkerLogger returns a custom logger that adds the worker name to the logger prefix
Click to show internal directories.
Click to hide internal directories.