conf

package
v0.0.0-...-d222f89 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2020 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Conf

type Conf struct {
	StorageDriverName string                       `toml:"storage_driver"`
	StorageDrivers    map[string]StorageDriverConf `toml:"storage"`
	ListenAddr        string                       `toml:"listen"`
	Daemon            bool                         `toml:"daemon"`
	LogLevel          string                       `toml:"log_level"`
	LogType           string                       `toml:"log_type"`
	LogFile           string                       `toml:"log_file"`
	PublicURL         string                       `toml:"public_url"`
}

Conf 是配置对象

func GetConf

func GetConf() Conf

GetConf 获取配置

func ParseConf

func ParseConf(configFilePath string) Conf

ParseConf 解析配置文件

type StorageDriverConf

type StorageDriverConf struct {
	Host     string `toml:"host"`
	Username string `toml:"username"`
	Password string `toml:"password"`
	Port     int    `toml:"port"`
	DBName   string `toml:"dbname"`
}

StorageDriverConf 是每个存储驱动的配置

Jump to

Keyboard shortcuts

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