db

package
v0.0.0-...-0aa3dee Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloseDb

func CloseDb()

func GetDb

func GetDb() *gorm.DB

func InitDb

func InitDb(cfg *Config) error

Types

type Config

type Config struct {
	Host            string        `koanf:"host"`
	Port            string        `koanf:"port"`
	User            string        `koanf:"user"`
	Password        string        `koanf:"password"`
	DbName          string        `koanf:"db_name"`
	SSLMode         string        `koanf:"SSLMode"`
	MaxIdleConns    int           `koanf:"max_idle_connections"`
	MaxOpenConns    int           `koanf:"max_open_connections"`
	ConnMaxLifetime time.Duration `koanf:"connection_max_life_time"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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