config

package
v0.0.0-...-e86600b Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(file string, c *Config) error

Load 加载配置

func Unmarshal

func Unmarshal(c *Config) error

Types

type Config

type Config struct {
	Server     Server            `mapstructure:"server"`
	Database   db.Config         `mapstructure:"database"`
	Log        zap.Config        `mapstructure:"log"`
	Redis      redis.Config      `mapstructure:"redis"`
	Prometheus prometheus.Config `mapstructure:"prometheus"`
}

Config 配置信息

type Server

type Server struct {
	Addr string `mapstructure:"addr"`
}

Jump to

Keyboard shortcuts

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