dbs

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Sqlite   = "lite"
	Mysql    = "mysql"
	Postgres = "pgsql"
)

Variables

This section is empty.

Functions

func DB

func DB(con *Connection, cfg *gorm.Config) *gorm.DB

func MysqlInit

func MysqlInit() *gorm.DB

func PostgresInit

func PostgresInit() *gorm.DB

func RC

func RC() redis.Cmdable

func Redis

func Redis() redis.Cmdable

func RedisCluster

func RedisCluster() redis.Cmdable

func SqliteInit

func SqliteInit() *gorm.DB

Types

type Connection

type Connection struct {
	Kind   string
	Host   string
	Port   int
	User   string
	Pass   string
	Dbname string
	Prefix string
}

Jump to

Keyboard shortcuts

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