xdb

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SecretKey = "glue.xdb12345678"

默认数据库环境变量加密key

View Source
var SecretMode = "cbc/pkcs7"

Functions

func DecryptConn added in v0.1.5

func DecryptConn(conn string) (newConn string, err error)

func NewDB

func NewDB(proto string, setting *Setting) (obj xdb.IDB, err error)

NewDB 创建DB实例

func RegisterDbType added in v0.1.36

func RegisterDbType(dbType string, reflectType reflect.Type) error

注册自定义类型转换

Types

type Setting added in v0.2.3

type Setting struct {
	Cfg *xdb.Config `json:"-"`
	// contains filtered or unexported fields
}

DB 数据库配置

func NewConfig added in v0.2.3

func NewConfig(opts ...xdb.Option) *Setting

New 构建DB连接信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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