goo_db

package
v1.0.47 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(ctx context.Context, configs ...Config)

Types

type Config

type Config struct {
	Name        string   `yaml:"name"`
	Driver      string   `yaml:"driver"`
	Master      string   `yaml:"master"`
	Slaves      []string `yaml:"slaves"`
	LogModel    bool     `yaml:"log_model"`
	MaxIdle     int      `yaml:"max_idle"`
	MaxOpen     int      `yaml:"max_open"`
	AutoPing    bool     `yaml:"auto_ping"`
	LogFilePath string   `yaml:"log_file_path"`
	LogFileName string   `yaml:"log_file_name"`
}

type DB

type DB interface {
	// contains filtered or unexported methods
}

func Client

func Client(names ...string) DB

type XOrm

type XOrm struct {
	*xorm.EngineGroup
	// contains filtered or unexported fields
}

func NewXOrmAdapter

func NewXOrmAdapter(ctx context.Context, config Config) *XOrm

func XOrmClient

func XOrmClient(names ...string) *XOrm

Jump to

Keyboard shortcuts

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