database

package
v0.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectGormDB

func ConnectGormDB(config *Config) (*gorm.DB, error)

ConnectGormDB establishes a GORM connection to PostgreSQL

Types

type Config

type Config struct {
	Host            string
	Port            string
	Username        string
	Password        string
	Database        string
	SSLMode         string
	MaxOpenConns    int
	MaxIdleConns    int
	ConnMaxLifetime time.Duration
	ConnMaxIdleTime time.Duration
	MaxRetries      int
}

Config holds GORM database connection configuration

func NewDatabaseConfig

func NewDatabaseConfig(cfg *config.DBConfigs) *Config

NewDatabaseConfig creates a new GORM database configuration for V1

Jump to

Keyboard shortcuts

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