db

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQL

type MySQL struct {
	GormConfig   *gorm.Config
	Username     string
	Password     string
	Host         string
	Port         int
	Database     string
	PingTimeout  time.Duration
	MaxIdleConns int
	MaxOpenConns int
	GormDB       *gorm.DB
}

func (*MySQL) Init

func (m *MySQL) Init() error

type Postgres added in v1.0.1

type Postgres struct {
	GormConfig   *gorm.Config
	Username     string
	Password     string
	Host         string
	Port         int
	Database     string
	SSLMode      string
	PingTimeout  time.Duration
	MaxIdleConns int
	MaxOpenConns int
	GormDB       *gorm.DB
}

func (*Postgres) Init added in v1.0.1

func (p *Postgres) Init() error

type Redis

type Redis struct {
	Options *redis.Options
	Client  *redis.Client
}

func (*Redis) Init

func (r *Redis) Init(redisConf *config.Redis)

Jump to

Keyboard shortcuts

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