appconfig

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseConfig

func ParseConfig(confPath string, configPtr *AppConfig) (err error)

Types

type AppConfig

type AppConfig struct {
	Env env.Option

	FilterKeys     []string
	Log            Log
	Default        Default
	AsyncService   AsyncService
	MigrateService MigrateService
}

func MustLoadAppConfig

func MustLoadAppConfig(configPath string) *AppConfig

MustLoadAppConfig 加载 app.toml ,若失败,会 panic

func (*AppConfig) Check

func (c *AppConfig) Check() (err error)

type AsyncService

type AsyncService struct {
	Support         bool
	QueueSize       int
	ConsumerSize    int
	TaskMaxRetryCnt int
}

type Default

type Default struct {
	MySQLSupport         bool
	SQLiteSupport        bool
	ClickhouseSupport    bool
	RedisSupport         bool
	MongoDBSupport       bool
	LRUCacheSupport      bool
	AliyunOSSSupport     bool
	LocalLockPoolSupport bool
}

type Log

type Log struct {
	LogDir                 string
	UseRotateLog           bool
	StdRedirectFileSupport bool
}

type MigrateService

type MigrateService struct {
	Support            bool
	DefaultVersion     int
	FileVersionSaveDir string
	MigrateSQLFileDir  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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