gorm

package
v0.0.0-...-f3969ab Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeDBTables

func InitializeDBTables(dbClient DBClient) error

func NewGORMMySQLClient

func NewGORMMySQLClient(lc fx.Lifecycle) (*gorm.DB, error)

NewGORMMySQLClient return new *gorm.DB with mysql configs with fx.Lifecycle

func NewGORMMySQLClientWithoutLC

func NewGORMMySQLClientWithoutLC() (*gorm.DB, error)

NewGORMMySQLClientWithoutLC return new *gorm.DB with mysql configs

Types

type DBClient

type DBClient interface {
	DB() *gorm.DB
	PrepareTables(schema []any) error
}

func CreateNewDBClientWith

func CreateNewDBClientWith(db *gorm.DB, logger *logrus.Logger) DBClient

Jump to

Keyboard shortcuts

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