setting

package
v0.0.0-...-eca3c71 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2014 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LangEnUS = iota
	LangZhCN
)
View Source
const (
	APP_VER = "0.1.0.1114"
)

Variables

View Source
var (
	AppName             string
	AppVer              string
	AppHost             string
	AppUrl              string
	EnforceRedirect     bool
	AvatarURL           string
	SecretKey           string
	IsProMode           bool
	ActiveCodeLives     int
	ResetPwdCodeLives   int
	DateFormat          string
	DateTimeFormat      string
	DateTimeShortFormat string
	TimeZone            string
	RealtimeRenderMD    bool
	ImageSizeSmall      int
	ImageSizeMiddle     int
	ImageLinkAlphabets  []byte
	ImageXSend          bool
	ImageXSendHeader    string
	Langs               []string

	LoginRememberDays int
	LoginMaxRetries   int
	LoginFailedBlocks int

	CookieRememberName string
	CookieUserName     string

	// search
	SearchEnabled bool
	NativeSearch  bool

	// sphinx search setting
	SphinxEnabled bool
	SphinxHost    string
	SphinxIndex   string
	SphinxMaxConn int

	// mail setting
	MailUser     string
	MailFrom     string
	MailHost     string
	MailAuthUser string
	MailAuthPass string
)
View Source
var (
	// OAuth
	GithubClientId     string
	GithubClientSecret string
	GoogleClientId     string
	GoogleClientSecret string
	WeiboClientId      string
	WeiboClientSecret  string
	QQClientId         string
	QQClientSecret     string
)
View Source
var (
	// Social Auth
	GithubAuth *apps.Github
	GoogleAuth *apps.Google
	SocialAuth *social.SocialAuth
)
View Source
var (
	Cfg     *goconfig.ConfigFile
	Cache   cache.Cache
	Captcha *captcha.Captcha
)
View Source
var (
	GlobalConfPath   = "conf/global/app.ini"
	AppConfPath      = "conf/app.ini"
	CompressConfPath = "conf/compress.json"
)

Functions

func IsMatchHost

func IsMatchHost(uri string) bool

func LoadConfig

func LoadConfig() *goconfig.ConfigFile

LoadConfig loads configuration file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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