setting

package
v0.0.0-...-e0e8746 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppSetting = &App{}

AppSetting app配置

View Source
var DatabaseSetting = &Database{}

DatabaseSetting 数据库配置

View Source
var RedisSetting = &Redis{}

RedisSetting Redis配置

View Source
var ServerSetting = &Server{}

ServerSetting 服务器配置

Functions

func Setup

func Setup()

Setup 初始化

Types

type App

type App struct {
	JwtSecret       string
	PageSize        int
	RuntimeRootPath string

	PrefixURL      string
	ImageSavePath  string
	ImageMaxSize   int
	ImageAllowExts []string

	ExportSavePath string

	LogSavePath string
	LogSaveName string
	LogFileExt  string
	TimeFormat  string
}

App app配置Model

type Database

type Database struct {
	Type        string
	User        string
	Password    string
	Host        string
	Name        string
	TablePrefix string
}

Database 数据库配置Model

type Redis

type Redis struct {
	Host        string
	Password    string
	MaxIdle     int
	MaxActive   int
	IdleTimeout time.Duration
}

Redis Redis配置结构体

type Server

type Server struct {
	RunMode      string
	HTTPPort     int
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

Server 服务器配置Model

Jump to

Keyboard shortcuts

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