package conf

import (
	ut "github.com/go-playground/universal-translator"
	"gopkg.in/go-playground/validator.v9"
	"time"
)


type Conf struct {
	AppPort string `yaml:"AppPort"`
	AppUrl string `yaml:"AppUrl"`
	AppImgUrl string `yaml:"AppImgUrl"`
	DefaultLimit string `yaml:"DefaultLimit"`
	DefaultIndexLimit string `yaml:"DefaultIndexLimit"`
	TokenSecretKey string `yaml:"TokenSecretKey"`
	Applog string `yaml:"Applog"`
	AppUploads string `yaml:"AppUploads"`

	DbUser string `yaml:"DbUser"`
	DbPassword string `yaml:"DbPassword"`
	DbPort string `yaml:"DbPort"`
	DbDataBase string `yaml:"DbDataBase"`
	DbHost string `yaml:"DbHost"`

	JwtIss string `yaml:"JwtIss"`
	JwtAudience string `yaml:"JwtAudience"`
	JwtJti string `yaml:"JwtJti"`
	JwtSecretKey string `yaml:"JwtSecretKey"`
	JwtTokenLife time.Duration `yaml:"JwtTokenLife"`

	RedisAddr string `yaml:"RedisAddr"`
	RedisPwd string `yaml:"RedisPwd"`
	RedisDb int `yaml:"RedisDb"`


	//qiniu
	QiNiuUploadImg bool `yaml:"QiNiuUploadImg"`
	QiNiuHostName string `yaml:"QiNiuHostName"`
	QiNiuAccessKey string `yaml:"QiNiuAccessKey"`
	QiNiuSecretKey string `yaml:"QiNiuSecretKey"`
	QiNiuBucket string `yaml:"QiNiuBucket"`
	QiNiuZone string `yaml:"QiNiuZone"`
}


var (
	Uni      *ut.UniversalTranslator
	Validate *validator.Validate
	Trans *ut.Translator
)
