conf

package
v0.0.0-...-b1f09d4 Latest Latest
Warning

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

Go to latest
Published: May 22, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Template Type
	PONGO2   = "PONGO2"
	TEMPLATE = "TEMPLATE"

	// Bindata
	BINDATA = "BINDATA"

	// File
	FILE = "FILE"

	// Redis
	REDIS = "REDIS"

	// Memcached
	MEMCACHED = "MEMCACHED"

	// Cookie
	COOKIE = "COOKIE"

	// In Memory
	IN_MEMORY = "IN_MEMARY"
)

Variables

View Source
var (
	Conf config // holds the global app config.

)

Functions

func GetLogLvl

func GetLogLvl() log.Lvl

func InitConfig

func InitConfig(configFile string) 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 Secret

type Secret struct {
	UploadAesKey string `toml:"upload_aes_key"`
}

type Upload

type Upload struct {
	Type        string `toml:"type"`          //上传方式 local:本地 QiNiu:七牛云存储
	Ext         string `toml:"ext"`           //允许上传后缀
	RootPath    string `toml:"root_path"`     //上传文件目录
	RootPathTmp string `toml:"root_path_tmp"` //临时文件目录
	Size        int    `toml:"size"`          //最大上传文件大小 5*1024*1024
	LocalSaveIs bool   `toml:"local_save_is"` //是否本地保存
	Http        string `toml:"http"`          //域名
}

Jump to

Keyboard shortcuts

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