dbx

package
v0.0.0-...-53d1e61 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(opts ...DBOptions) (*gorm.DB, error)

Types

type DBOptions

type DBOptions = func(*Options)

type Options

type Options struct {
	Debug   bool     `json:"debug"`
	Name    string   `json:"name"`
	Idle    int      `json:"idle"`
	Open    int      `json:"open"`
	Source  []Server `json:"source"`
	Replica []Server `json:"replica"`
	Logger  logger.Interface
}

type Server

type Server struct {
	Host string `json:"host"`
	Port int32  `json:"port"`
	User string `json:"user"`
	Pwd  string `json:"pwd"`
}

Jump to

Keyboard shortcuts

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