conf

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllConfig

func AllConfig() map[string]any

获取全部配置

func GetJwtExpirationTime

func GetJwtExpirationTime() (time.Duration, error)

func GetJwtIssuer

func GetJwtIssuer() string

func GetJwtSecret

func GetJwtSecret() (string, error)

jwt 配置

func GetLogLevel

func GetLogLevel() string

日志配置

func GetMysqlDsn

func GetMysqlDsn() (dsn string, err error)

mysql 配置

func GetMysqlMaxIdleConns

func GetMysqlMaxIdleConns() int

func GetMysqlMaxLifetime

func GetMysqlMaxLifetime() time.Duration

func GetMysqlMaxOpenConns

func GetMysqlMaxOpenConns() int

func GetRedisConnMaxLifetime

func GetRedisConnMaxLifetime() time.Duration

func GetRedisDB

func GetRedisDB() int

func GetRedisExpireTime

func GetRedisExpireTime() (time.Duration, error)

func GetRedisHost

func GetRedisHost() (string, error)

func GetRedisKeyPrefix

func GetRedisKeyPrefix() (string, error)

func GetRedisMasterName

func GetRedisMasterName() (string, error)

func GetRedisMinIdleConns

func GetRedisMinIdleConns() int

func GetRedisMode

func GetRedisMode() string

func GetRedisPassword

func GetRedisPassword() (string, error)

func GetRedisPoolSize

func GetRedisPoolSize() int

redis 配置

func GetRedisSentinelHosts

func GetRedisSentinelHosts() ([]string, error)

func GetRedisSentinelPassword

func GetRedisSentinelPassword() (string, error)

func GetRedisUser

func GetRedisUser() string

func GetServerBind

func GetServerBind() string

服务配置

func GetServerTimeZone

func GetServerTimeZone() string

func LoadConfig

func LoadConfig(configPath string) (err error)

加载配置

Types

This section is empty.

Jump to

Keyboard shortcuts

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