Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Module("db", fx.Provide(NewDbClient), fx.Invoke(runDbClient), )
Functions ¶
func NewInMemoryClient ¶
func NewSQLiteClient ¶
func NewSQLiteClient(config *SQLiteConfig) (*ent.Client, error)
Types ¶
type Config ¶
type Config struct { Type string `mapstructure:"type" yaml:"type" validate:"required"` AutoMigrate bool `mapstructure:"auto_migrate" yaml:"auto_migrate"` SQLite *SQLiteConfig `mapstructure:"sqlite" yaml:"sqlite"` }
type SQLiteConfig ¶
type SQLiteConfig struct {
Dsn string `mapstructure:"dsn" yaml:"dsn" validate:"required"`
}
Click to show internal directories.
Click to hide internal directories.