dsn

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource struct {
	Code       string
	DriverName string
	Dsn        string
}

type DsnConf

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

func GetDsnConf

func GetDsnConf(cf *DsnConf) *DsnConf

func NewDsnConf

func NewDsnConf(fpath string) *DsnConf

NewDsnConf 初始化数据源配置。

func (DsnConf) GetDsnGroup

func (d DsnConf) GetDsnGroup(dgp *DsnGroup) error

func (DsnConf) SaveDsnGroup

func (d DsnConf) SaveDsnGroup(dgp DsnGroup) error

type DsnConfData

type DsnConfData = DsnGroup

type DsnGroup

type DsnGroup struct {
	ActiveCode string
	DsnList    []DataSource
}

func (*DsnGroup) Active

func (d *DsnGroup) Active(dsnCode string) error

func (*DsnGroup) AppendDsn

func (d *DsnGroup) AppendDsn(driverName, dsn string) error

func (DsnGroup) GetActiveDSN

func (d DsnGroup) GetActiveDSN() DataSource

func (DsnGroup) GetDefaultDSN

func (d DsnGroup) GetDefaultDSN() DataSource

func (DsnGroup) HasActive

func (d DsnGroup) HasActive(dsnCode string) bool

func (DsnGroup) HasDsn

func (d DsnGroup) HasDsn(dsn string) bool

Jump to

Keyboard shortcuts

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