Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetDbHandle ¶
func IsNotFiberChild ¶
func IsNotFiberChild(f func())
Run a closure if the current thread is the fiber master thread! This function only exists as we use prefork to decrease our operation times.
Types ¶
type APP_STATE ¶
type APP_STATE struct { API_MODE string API_PORT string DATABASE_PATH string LOGGER *zap.SugaredLogger DATABASE_HANDLE *gorm.DB }
func (*APP_STATE) InitializeDbHandle ¶
func (api_state *APP_STATE) InitializeDbHandle()
Initialize the global database handle.
func (*APP_STATE) InitializeLogger ¶
func (api_state *APP_STATE) InitializeLogger()
Initialize the global logger.
func (*APP_STATE) LoadEnvVars ¶
func (api_state *APP_STATE) LoadEnvVars()
Load the `.env` file relative to the final executable!
Click to show internal directories.
Click to hide internal directories.