mysql

package
v0.8.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 7, 2024 License: GPL-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module(
	"mysql",
	fx.Provide(NewGorm),
)

Functions

func NewGorm

func NewGorm(in GormParams, lc fx.Lifecycle) (*gorm.DB, error)

Types

type Configuration

type Configuration struct {
	Host     string `hcl:"host"`
	User     string `hcl:"user"`
	Password string `hcl:"password"`
	DBName   string `hcl:"db_name"`
}

type GormParams

type GormParams struct {
	fx.In

	Config Configuration
	Log    *zap.Logger
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL