conf

package
v0.0.0-...-89754d3 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitConfig

func InitConfig(ctx *cli.Context) error

initConfig initializes the app configuration by first setting defaults, then overriding settings from the app config file, then overriding It returns an error if any.

Types

type Config

type Config struct {
	Log       Log
	Pyroscope Pyroscope

	SessionStore string `json:"session_store"`
	CacheStore   string `json:"cache_store"`

	// 应用配置
	App app

	Server server

	Auth auth

	Broker broker

	Sessions sessions

	// MySQL、PostgreSQL
	DB database `json:"database"`

	// Redis
	Redis redis

	// Opentracing
	Opentracing opentracing
	// contains filtered or unexported fields
}
var (
	Conf Config // holds the global app config.
)

func (Config) LogLvl

func (c Config) LogLvl() log.Lvl

type Log

type Log struct {
	Level string
	Debug bool
	E     bool
}

type Pyroscope

type Pyroscope struct {
	Enable bool
}

Jump to

Keyboard shortcuts

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