setting

package
v0.0.0-...-411a92d Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: MIT Imports: 7 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{}
View Source
var UserCenter = &UserCenterSetting{}

Functions

func Setup

func Setup(runmode string)

Types

type App

type App struct {
	JwtSecret string
	PageSize  int
	PrefixUrl string

	RuntimeRootPath string

	ImageSavePath  string
	ImageMaxSize   int
	ImageAllowExts []string

	ExportSavePath string
	QrCodeSavePath string
	FontSavePath   string

	LogLevel string
}

type Database

type Database struct {
	Type        string
	Name        string
	TablePrefix string
	WUser       string
	WPassword   string
	WHost       string
	RUser       string
	RPassword   string
	RHost       string
}

type Redis

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

type Server

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

type UserCenterSetting

type UserCenterSetting struct {
	ConfigUrl1             string `ini:"getConfigUrl1"`
	ConfigUrl2             string `ini:"getConfigUrl2"`
	GetStudentByTokenUrl   string `ini:"getStudentByTokenUrl"`
	GetTokenByStudentIdUrl string `ini:"getTokenByStudentIdUrl"`
	WeChatCreateStudentUrl string `ini:"weChatCreateStudentUrl"`
	WeChatLoginUrl         string `ini:"weChatLoginUrl"`
}

Jump to

Keyboard shortcuts

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