dialer

package
v1.1.47 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2025 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultUserName = "root"
)

Variables

This section is empty.

Functions

func ConfigDB added in v1.1.1

func ConfigDB(sqlDB *sql.DB)

func DefaultGormConfig added in v1.1.1

func DefaultGormConfig(opt *DialOption) *gorm.Config

Types

type DialOption

type DialOption struct {
	User     string
	Password string
	DBName   string

	SqliteCache bool
	Logger      logger.Interface
}

func PackDialOption added in v1.1.1

func PackDialOption(opts ...OptionFunc) *DialOption

type OptionFunc

type OptionFunc func(*DialOption)

func WithAuth

func WithAuth(user, pwd string) OptionFunc

func WithDBName

func WithDBName(db string) OptionFunc

func WithLogger

func WithLogger(log logger.Interface) OptionFunc

func WithSqliteCache

func WithSqliteCache() OptionFunc

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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