db

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearConnector added in v0.2.21

func ClearConnector()

func Init added in v0.2.21

func Init(dbType string, dsn string, tlsConfig *tls.TLSConfig) error

Types

type Connector

type Connector interface {
	Connect() (*gorm.DB, error)
	DB() *gorm.DB
}

func GetConnector added in v0.2.21

func GetConnector() (Connector, bool)

type DBMigrator

type DBMigrator interface {
	Migrate() error
	Up(steps *int) error
	Down(steps *int) error
}

func NewDBMigrator

func NewDBMigrator(dbType string, db *gorm.DB) (DBMigrator, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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