package database import ( "payouts/internal/config" "go.uber.org/fx" ) var Module = fx.Options( fx.Provide(New), ) type DatabaseService interface { } // Params represents the module input params type Params struct { fx.In AppConfig *config.App } // NewPersistence instantiates the persistence module func New(p Params) (DatabaseService, error) { return NewDatabaseService(p.AppConfig.Database.Type, p.AppConfig.Database.Connection, p.AppConfig.Database.LogLevel) }