setting

package
v0.0.0-...-928417b Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppSetting = &App{}
View Source
var DatabaseSetting = &Database{}
View Source
var RedisSetting = &Redis{}
View Source
var ServerSetting = &Server{}

Functions

func Setup

func Setup()

Types

type App

type App struct {
	JwtSecret       string
	JwtIssuer       string
	PageSize        int
	RuntimeRootPath string

	PrefixUrl string

	ImagePrefixUrl string
	ImageSavePath  string
	ImageMaxSize   int
	ImageAllowExts []string

	LogSavePath string
	LogSaveName string
	LogFileExt  string
	TimeFormat  string

	QrCodeSavePath string
	FontSavePath   string
}

type Database

type Database struct {
	Driver      string
	User        string
	Password    string
	Host        string
	Port        string
	Name        string
	TablePrefix string
}

type Redis

type Redis struct {
	Host        string
	Password    string
	MaxIdle     int           // 最大空闲连接数
	MaxActive   int           // 给定时间内,允许分配的最大连接数
	IdleTimeout time.Duration // 给定时间内将保持空闲状态,超过时间关闭链接, 为0时,无限制
}

type Server

type Server struct {
	RunModel     string
	HttpPort     int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Jump to

Keyboard shortcuts

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