Versions in this module Expand all Collapse all v1 v1.0.0 Apr 8, 2023 Changes in this version + var Module = fx.Options(fx.Provide(NewDatabase), fx.Provide(NewEnv), fx.Provide(GetLogger), ...) + type Command interface + Run func() CommandRunner + Setup func(cmd *cobra.Command) + Short func() string + type CommandRunner interface + type Database struct + Postgres *gorm.DB + Redis *redis.Client + func NewDatabase(env Env, logger Logger) Database + type Env struct + Environment string + JWTSecret string + LogLevel string + LogOutput string + PostgresDB string + PostgresHost string + PostgresPassword string + PostgresPort string + PostgresUserName string + RedisHost string + RedisName string + RedisPassword string + RedisPort string + ServerPort string + func NewEnv() Env + type FxLogger struct + func (l *FxLogger) LogEvent(event fxevent.Event) + func (l FxLogger) Printf(str string, args ...interface{}) + type GinLogger struct + func (gl GinLogger) Write(p []byte) (n int, err error) + type GormLogger struct + func (gl *GormLogger) LogMode(level gorm_logger.LogLevel) gorm_logger.Interface + func (gl GormLogger) Error(ctx context.Context, msg string, data ...interface{}) + func (gl GormLogger) Info(ctx context.Context, msg string, data ...interface{}) + func (gl GormLogger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error) + func (gl GormLogger) Warn(ctx context.Context, msg string, data ...interface{}) + type Logger struct + func GetLogger() Logger + func (l *Logger) GetFxLogger() fxevent.Logger + func (l Logger) GetGinLogger() GinLogger + func (l Logger) GetGormLogger() *GormLogger + type Router struct + Gin *gin.Engine + func NewRouter() Router