zdbconfig

package
v0.18.3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGormConfig

func BuildGormConfig(logConfig LogConfig) *gorm.Config

Types

type Config

type Config struct {
	RetryInterval    int
	MaxAttempts      int
	ConnectionParams ConnectionParams
	LogConfig        LogConfig
	MaxIdleConns     int
	MaxOpenConns     int
	ConnMaxLifetime  time.Duration
}

type ConnectionParams

type ConnectionParams struct {
	User     string
	Password string
	Name     string
	Host     string
	Port     uint
	Params   string
	Protocol string
}

type LogConfig

type LogConfig struct {
	Prefix                    string
	LogLevel                  string
	SlowThreshold             int
	IgnoreRecordNotFoundError bool
	ParameterizedQuery        bool
	Colorful                  bool
}

Jump to

Keyboard shortcuts

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