config

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DB_Music        = "music"
	DB_Music_Read_1 = "music_read_1"
	DB_Music_Read_2 = "music_read_2"
)

Variables

View Source
var (
	ErrConfigFileMissing = errors.New("config file missing")
)
View Source
var (
	Pay *pay
)

Functions

func InitJSONConfig

func InitJSONConfig(receiver any, fileName string)

func InitYAMLConfig

func InitYAMLConfig(receiver any, fileName string)

func SearchConfigFile

func SearchConfigFile(fileName string, searchPaths ...string) (string, error)

Types

type AppConfig

type AppConfig struct {
	MySQL types.Map[string] `yaml:"mysql"`
}
var (
	Config *AppConfig
	DB     *gorm.DB
)

func (*AppConfig) String

func (a *AppConfig) String() string

type RoundRobinPolicy

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

func (*RoundRobinPolicy) Resolve

func (r *RoundRobinPolicy) Resolve(connPools []gorm.ConnPool) gorm.ConnPool

Jump to

Keyboard shortcuts

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