gormfx

package
v0.0.0-...-e200eec Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func AddCheckerForClient

func AddCheckerForClient(db *gorm.DB, v ufx.Prober)

func NewClient

func NewClient(d gorm.Dialector, c *gorm.Config, params Params) (db *gorm.DB, err error)

func NewConfig

func NewConfig() *gorm.Config

func NewMySQLDialector

func NewMySQLDialector(params MySQLParams) gorm.Dialector

Types

type MySQLParams

type MySQLParams struct {
	DSN string `json:"dsn" default:"root:root@tcp(localhost:3306)/test?charset=utf8mb4&parseTime=True&loc=Local" validate:"required"`
}

func MySQLParamsFromConf

func MySQLParamsFromConf(conf ufx.Conf) (params MySQLParams, err error)

type Params

type Params struct {
	Debug bool `json:"debug"`
}

func ParamsFromConf

func ParamsFromConf(conf ufx.Conf) (params Params, err error)

Jump to

Keyboard shortcuts

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