driver

package
v0.0.0-...-a54da22 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCache

func NewCache(option CacheOption) *redis.Pool

NewCache create cache pool

func NewMysqlDatabase

func NewMysqlDatabase(option config.DatabaseConfig) (*gorm.DB, error)

NewMysqlDatabase return gorp dbmap object with MySQL options param

Types

type CacheOption

type CacheOption struct {
	Host               string
	Port               int
	DialConnectTimeout time.Duration
	ReadTimeout        time.Duration
	WriteTimeout       time.Duration
	MaxIdle            int
	MaxActive          int
	IdleTimeout        time.Duration
	Wait               bool
	MaxConnLifetime    time.Duration
	Password           string
	Namespace          string
}

CacheOption properties for cache DB

Jump to

Keyboard shortcuts

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