config

package
v0.0.0-...-654a53c Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfiguration

func LoadConfiguration(data []byte) error

Types

type Configuration

type Configuration struct {
	Database string `yaml:"database"` // 数据库类型,决定Schema和驱动的位置,支持sqlite3和mysql
	DSN      string `yaml:"dsn"`      // 数据库DSN
	Port     string `yaml:"port"`     // HTTP服务端口号
	Logger   struct {
		Level           string `yaml:"level"`  // 日志级别
		TimestampFormat string `yaml:"format"` // 日志时间格式
	}
}

func GetConfiguration

func GetConfiguration() *Configuration

func (*Configuration) LoggerLevel

func (c *Configuration) LoggerLevel() logrus.Level

Jump to

Keyboard shortcuts

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