setting

package
v0.0.0-...-1f55c80 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2018 License: Apache-2.0 Imports: 3 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AppSetting           = &App{}
	ServerSetting        = &Server{}
	HTTPHeadParamSetting = &HTTPHeadParam{}
	DatabaseSetting      = &Database{}
	SchedulerSetting     = &Scheduler{}
)

统一实例化设置对象

Functions

func SetUp

func SetUp()

SetUp 设置初始化函数

Types

type App

type App struct {
	PageSize        int
	RuntimeRootPath string
	LogSavePath     string
	LogSaveName     string
	LogFileExt      string
	TimeFormat      string
}

App 设置对象

type Database

type Database struct {
	Type        string
	User        string
	PassWord    string
	Host        string
	DBName      string
	TablePrefix string
}

Database 数据库设置对象

type HTTPHeadParam

type HTTPHeadParam struct {
	HeadweFieldSession string
	HeadweFieldUname   string
}

HTTPHeadParam http前端填充的头部参数

type Scheduler

type Scheduler struct {
	Host  string
	Param string
}

Scheduler 定时任务服务配置

type Server

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

Server 服务端设置对象

Jump to

Keyboard shortcuts

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