system

package
v0.0.0-...-5f88e8a Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadConfig

func LoadConfig(filename string) *config.Engine

Types

type AppConf

type AppConf struct {
	Main *MainConf
	Site *SiteConf
}

type Application

type Application struct {
	Cf *AppConf
	Db *youdb.DB
	Sc *securecookie.SecureCookie
}

func (*Application) Close

func (app *Application) Close()

func (*Application) Init

func (app *Application) Init(c *config.Engine, currentFilePath string)

type MainConf

type MainConf struct {
	HttpPort       int
	HttpsOn        bool
	Domain         string // 若启用https 则该domain 为注册的域名,eg: domain.com、www.domain.com
	HttpsPort      int
	PubDir         string
	ViewDir        string
	Youdb          string
	CookieSecure   bool
	CookieHttpOnly bool
	OldSiteDomain  string
	TLSCrtFile     string
	TLSKeyFile     string
}

type SiteConf

type SiteConf struct {
	GoVersion         string
	MD5Sums           string
	Name              string
	Desc              string
	AdminEmail        string
	MainDomain        string // 上传图片后添加网址前缀, eg: http://domian.comhttp://234.21.35.89:8082
	MainNodeIds       string
	MustLoginNodeIds  string
	NotHomeNodeIds    string
	ProverbId         string
	AvatarMinId       int
	AvatarMaxId       int
	HomeNode          string
	AdminBotId        int
	AnonymousBotId    int
	TimeZone          int
	HomeShowNum       int
	PageShowNum       int
	TagShowNum        int
	CategoryShowNum   int
	TitleMaxLen       int
	ContentMaxLen     int
	PostInterval      int
	CommentListNum    int
	CommentInterval   int
	Authorized        bool
	RegReview         bool
	CloseReg          bool
	AutoDataBackup    bool
	ResetCookieKey    bool
	AutoGetTag        bool
	GetTagApi         string
	UploadSuffix      string
	UploadImgOnly     bool
	UploadImgResize   bool
	UploadMaxSize     int
	UploadMaxSizeByte int64
}

Jump to

Keyboard shortcuts

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