Documentation ¶
Overview ¶
--- Global utility functions ---------------------------------------------------------------------------------------------------------------------
Index ¶
- Variables
- func CmdInitialize(di di.Container)
- func ConvertTime(date string) time.Time
- func DataAccessContainer(di di.Container) *appconfig.MainSettings
- func DatabaseAccessContainer(di di.Container) *xorm.Engine
- func DatabaseContainer(di di.Container) *appconfig.DbSettings
- func InputWarn(msg string, err error) bool
- func LogAccessContainer(di di.Container) *zap.SugaredLogger
- func LogErrorRet(msg string, err error) bool
- func LogErrorf(msg string, err error)
- func LogFatalf(msg string, err error)
- func LogInfof(msg string, data interface{})
- func LogWarnf(msg string, err error)
- func MaskLeft(s string) string
- func ServicesError(msg string, err interface{}, logger *zap.SugaredLogger)
- func TrimInvoice(invoice string) string
- type ErrParam
- type GetData
Constants ¶
This section is empty.
Variables ¶
var ( Dba *xorm.Engine Dbd *appconfig.DbSettings Dac *appconfig.MainSettings Log *zap.SugaredLogger )
--- Exposure of variables to rest of application ------------------------------------------------------------------------
Functions ¶
func CmdInitialize ¶
func CmdInitialize(di di.Container)
--- Initialization of dependency injection containers from Verifier -----------------------------------------------------
func ConvertTime ¶
--- Conversion of time field to database usable format ------------------------------------------------------------------
func DataAccessContainer ¶
func DataAccessContainer(di di.Container) *appconfig.MainSettings
--- Provides global access to configuration data via dependency injection container -------------------------------------
func DatabaseAccessContainer ¶
--- Provides global database access via dependency injection container --------------------------------------------------
func DatabaseContainer ¶
func DatabaseContainer(di di.Container) *appconfig.DbSettings
--- Provides global access to configuration data via dependency injection container -------------------------------------
func InputWarn ¶
--- Error handling helper functions -------------------------------------------------------------------------------------
func LogAccessContainer ¶
func LogAccessContainer(di di.Container) *zap.SugaredLogger
--- Provides global access to logger via dependency injection container -------------------------------------------------
func LogErrorRet ¶
func MaskLeft ¶
--- Masking of sensitive data when displayed ---------------------------------------------------------------------------
func ServicesError ¶
func ServicesError(msg string, err interface{}, logger *zap.SugaredLogger)
func TrimInvoice ¶
--- Removal of excess characters from ----------------------------------------------------------------------------------
Types ¶
type ErrParam ¶
func LogErrorRetf ¶
type GetData ¶
type GetData interface { LogAccessContainer(di di.Container) *zap.SugaredLogger DataAccessContainer(di di.Container) *appconfig.MainSettings DatabaseAccessContainer(di di.Container) *xorm.Engine ErrCheckf(msg string, err error) Warnf(msg string, err error) }
--- Interfaces for container types -------------------------------------------------------------------------------------- TODO Probably remove if not used