drivers

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MongoDBConfig types.IMongoDB
View Source
var MySQLConfig []types.IMySQL
View Source
var RedisConfig types.IRedis
View Source
var SqLiteConfig *[]*types.SqLite

Functions

func Migrate

func Migrate(g *gorm.DB, db *sql.DB)

func MongoDB

func MongoDB() (disconnectors []func())

Define MySQL service host and port

func MySQL

func MySQL() (disconnectors []func())

Define MySQL service host and port

func Redis

func Redis() (disconnectors []func())

Define MySQL service host and port

func SqLiteClient added in v1.5.0

func SqLiteClient() (disconnectors []func())

Define MySQL service host and port

Types

type SqLiteProvider added in v1.5.0

type SqLiteProvider struct {
	Config *types.SqLite
	// debug bool
	DSN  string
	Gorm *gorm.DB
	Sql  *sql.DB
	Mu   sync.RWMutex
}

func (*SqLiteProvider) Connect added in v1.5.0

func (m *SqLiteProvider) Connect()

func (*SqLiteProvider) Disconnect added in v1.5.0

func (m *SqLiteProvider) Disconnect()

Jump to

Keyboard shortcuts

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