mysql

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormMysql

func GormMysql(iniSection, PasswordDecryptionKey string) (*gorm.DB, error)

GormMysql 初始化Mysql数据库。 参数PasswordDecryptionKey密码解密密钥,密钥为空时表示配置文件中的密码是明文. 密码加密是用 encrypt.TripleDesDecrypt 进行加密的 需要用一个toml类型的配置文件: config.toml

func GormMysqlByDSN

func GormMysqlByDSN(dsn string) (*gorm.DB, error)

GormMysqlByDSN 根据DSN初始化Mysql数据库

Types

This section is empty.

Jump to

Keyboard shortcuts

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