conn

package
v0.0.0-...-5eb3688 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2023 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CachesGet

func CachesGet(key string) (value interface{}, isOk bool)

func CachesGetStr

func CachesGetStr(key string) (value string)

func CachesInit

func CachesInit()

func CachesSet

func CachesSet(key string, value interface{})

func CachesSetAlways

func CachesSetAlways(key string, value interface{})

func CreateMysqlDB

func CreateMysqlDB(host, port, user, password, dbname string) (bool, error)

func CreatePgsqlDB

func CreatePgsqlDB(host, user, password, dbname string) (bool, error)

Pgsql 连接并创建

func CreateSqliteDB

func CreateSqliteDB() (bool, error)

func GetDBConns

func GetDBConns() *gorm.DB

func GetPgsqlConn

func GetPgsqlConn() (*gorm.DB, error)

获取Pgsql连接

func GetSqliteConn

func GetSqliteConn() (*gorm.DB, error)

获取Sqlite 连接

func MysqlConnTest

func MysqlConnTest(host, port, user, password, dbname string) (bool, error)

func MysqlDB

func MysqlDB() *gorm.DB

func MysqlInit

func MysqlInit()

func NotesDB

func NotesDB() *gorm.DB

func PgsqlConnTest

func PgsqlConnTest(host, user, password, dbname string) (bool, error)

Pgsql 测试连接

func SetDBConn

func SetDBConn()

func TestConnAliOSS

func TestConnAliOSS(endPoint, accessKeyID, ossSecret, bucketName string) (bool, error)

测试阿里云对象存储连接

func TestConnTencentCOS

func TestConnTencentCOS(cos_url, secretid, secretkey string) (bool, error)

请求示例,使用永久密钥

Types

type Caches

type Caches struct {
	C *cache.Cache
}

Jump to

Keyboard shortcuts

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