database

package
v0.0.209 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2025 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 GetDbAfterInit added in v0.0.205

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

GetDbAfterInit ensures the database is initialized before being used. The connection will be closed after the function finishes executing.

func InitDb

func InitDb() error

Types

type Configdb

type Configdb struct {
	Host            string
	Port            int
	User            string
	Password        string
	DbName          string
	SslMode         string
	MaxIdleConns    int
	MaxOpenConns    int
	ConnMaxLifetime int
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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