db

package
v0.0.0-...-a39f72a Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(opts *MysQLOptions) (*gorm.DB, error)

func NewRedis

func NewRedis(opts *RedisOptions) *redis.Pool

Types

type MysQLOptions

type MysQLOptions struct {
	Host                  string
	Username              string
	Password              string
	Database              string
	MaxIdleConnections    int
	MaxOpenConnections    int
	MaxConnectionLifeTime time.Duration
}

type RedisOptions

type RedisOptions struct {
	Host                  string
	Port                  int
	Addrs                 []string
	Username              string
	Password              string
	Database              int
	MasterName            string
	MaxIdle               int
	MaxActive             int
	Timeout               int
	EnableCluster         bool
	UseSSL                bool
	SSLInsecureSkipVerify bool
}

RedisOptions defines options for redis cluster.

Jump to

Keyboard shortcuts

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