mysqlpkg

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Module = fx.Module("mysqlpkg", fx.Provide(
	func(
		l *zap.Logger,

		set setting.Param,

	) (out Result, err error) {
		if svc, e := NewMysqlDb(
			l,
			set,
		); e != nil {
			err = e
		} else {
			out.Execute(svc)
		}
		return
	},
),
)

Functions

func NewMysqlDb

func NewMysqlDb(l *zap.Logger, set setting.Param) (*defaultMysqlDb, error)

func NewMysqlDb(l *zap.Logger, set setting.Param, cService *curltools.CurlService) (*defaultMysqlDb, error) {

Types

type MysqlDbService

type MysqlDbService interface {
	MysqlGenerateGorm(dataSourceName string, tablePrefix string) (*gorm.DB, error)
	UpdateModelDanceDb(name string, db *gorm.DB)
}

type Param

type Param struct {
	fx.In
	MysqlDanceDb *gorm.DB `name:"MysqlDanceDb"`
}

type Result

type Result struct {
	fx.Out
	MysqlDanceDb *gorm.DB `name:"MysqlDanceDb"`
}

func (*Result) Execute

func (f *Result) Execute(service MysqlDbService)

Jump to

Keyboard shortcuts

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