data

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Type            string `yaml:"type"`
	Host            string `yaml:"host"`
	Database        string `yaml:"database"`
	Username        string `yaml:"username"`
	Password        string `yaml:"password"`
	Tunnel          string `yaml:"tunnel"`
	ConnMaxLifeTime int64  `yaml:"max_life_time"`
	ConnMaxIdleTime int64  `yaml:"max_idle_time"`
	MaxIdleConns    int    `yaml:"max_idle_conn"`
	MaxOpenConns    int    `yaml:"max_open_conn"`
	LazyFetch       bool   `yaml:"lazy_fetch"`
}

type Configure

type Configure interface {
	bean.Bean
	Config() Config
}

type DatasourceWrapper

type DatasourceWrapper interface {
	DB() *sql.DB
	Configure() Configure
}

func NewDatasourceWrapper

func NewDatasourceWrapper(DB *sql.DB, configure Configure) DatasourceWrapper

type DatasourceWrapperImpl

type DatasourceWrapperImpl struct {
	// contains filtered or unexported fields
}

func (*DatasourceWrapperImpl) Configure

func (d *DatasourceWrapperImpl) Configure() Configure

func (*DatasourceWrapperImpl) DB

func (d *DatasourceWrapperImpl) DB() *sql.DB

Directories

Path Synopsis
ssh
tcp

Jump to

Keyboard shortcuts

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