Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DBAdapterPostgres ... DBAdapterPostgres = "postgres" // DBAdapterMySQL ... DBAdapterMySQL = "mysql" )
View Source
const (
// LoggerAdapterConsole ...
LoggerAdapterConsole = "console"
)
Variables ¶
View Source
var ( // DBPool ... DBPool = &sql.DB{} // ErrDatabaseAdapterNotSupported ... ErrDatabaseAdapterNotSupported = errors.New("service: database adapter not supported") )
View Source
var ( // Logger is singleton instance of logger. Logger *logrus.Logger // ErrLoggerAdapterNotSupported ... ErrLoggerAdapterNotSupported = errors.New("service: logger adapter not supported") )
View Source
var ( // ErrPostgresConnectionFailed ... ErrPostgresConnectionFailed = errors.New("service: postgres connection failed") )
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { Logger LoggerConfig `xml:"logger"` DB DBConfig `xml:"database"` }
AppConfig ...
var Config AppConfig
Config ...
type DBConfig ¶
type DBConfig struct { Adapter string `xml:"adapter"` ConnectionString string `xml:"connection-string"` }
DBConfig ...
type LoggerConfig ¶
LoggerConfig ...
Click to show internal directories.
Click to hide internal directories.