helpers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MysqlClient *gorm.DB
View Source
var RedisClient *gredis.Redis

Functions

func Destroy

func Destroy()

func Init

func Init()

Types

type MysqlConf

type MysqlConf struct {
	Enable          bool          `yaml:"enable" json:"enable" mapstructure:"enable"`
	DataBase        string        `yaml:"database" json:"database" mapstructure:"database" `
	Addr            string        `yaml:"addr" json:"addr" mapstructure:"addr"`
	User            string        `yaml:"user" json:"user" mapstructure:"user"`
	Password        string        `yaml:"password" json:"password" mapstructure:"password"`
	Charset         string        `yaml:"charset" json:"charset" mapstructure:"charset"`
	MaxIdleConns    int           `yaml:"maxIdleConns" json:"maxIdleConns" mapstructure:"maxIdleConns"`
	MaxOpenConns    int           `yaml:"maxOpenConns" json:"maxOpenConns" mapstructure:"maxOpenConns"`
	ConnMaxIdlTime  time.Duration `yaml:"maxIdleTime" json:"connMaxIdleTime" mapstructure:"connMaxIdleTime"`
	ConnMaxLifeTime time.Duration `yaml:"connMaxLifeTime" json:"connMaxLifeTime" mapstructure:"connMaxLifeTime"`
	ConnTimeOut     time.Duration `yaml:"connTimeOut" json:"connTimeOut" mapstructure:"connTimeOut"`
	WriteTimeOut    time.Duration `yaml:"writeTimeOut" json:"writeTimeOut" mapstructure:"writeTimeOut"`
	ReadTimeOut     time.Duration `yaml:"readTimeOut" json:"readTimeOut" mapstructure:"readTimeOut"`
	ShowLog         bool          `yaml:"showLog" json:"showLog" mapstructure:"showLog"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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