config

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version   = "unknown"
	BuildTime = "unknown"
	GitCommit = "unknown"
)

版本信息,在编译时自动生成

Functions

func Init

func Init(cfgFile string)

Init 初始化配置

Types

type Config

type Config struct {
	Server   serverConfig `envPrefix:"SERVER_"`
	Logger   loggerConfig `envPrefix:"LOGGER_"`
	Database db.Config    `envPrefix:"DATABASE_"`
	JWT      JWT          `envPrefix:"JWT_"`
}

func GetConfig

func GetConfig() *Config

GetConfig 获取配置

type JWT

type JWT struct {
	Key string
}

Jump to

Keyboard shortcuts

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