setting

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2017 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// App settings.
	AppVer      string
	AppName     string
	AppURL      string
	AppSubURL   string
	AppDataPath string

	// Server settings.
	Protocol           Scheme
	Domain             string
	HTTPAddr, HTTPPort string
	LocalURL           string
	SSHPort            int
	OfflineMode        bool
	DisableRouterLog   bool
	CertFile, KeyFile  string
	StaticRootPath     string
	EnableGzip         bool

	// Attachment settings
	AttachmentPath         string
	AttachmentAllowedTypes string
	AttachmentMaxSize      int64
	AttachmentMaxFiles     int
	AttachmentEnabled      bool

	// Database settings
	UseSQLite3    bool
	UseMySQL      bool
	UsePostgreSQL bool
	UseMSSQL      bool
	UseTiDB       bool

	// Security settings.
	InstallLock          bool
	SecretKey            string
	LogInRememberDays    int
	CookieUserName       string
	CookieRememberName   string
	CookieSecure         bool
	ReverseProxyAuthUser string

	// Log settings.
	LogRootPath string
	LogModes    []string
	LogConfigs  []interface{}

	// Time settings.
	TimeFormat string

	// Cache settings.
	CacheAdapter                  string
	CacheInternal                 int
	CacheConn                     string
	CacheClientCheckUpdateTimeOut int64
	CacheTokenTimeOut             int64

	EnableRedis    bool
	EnableMemcache bool

	// Session settings.
	SessionConfig  session.Options
	CSRFCookieName = "_csrf"

	// Global setting objects.
	Cfg          *ini.File
	ConfRootPath string
	CustomPath   string // Custom directory path.
	CustomConf   string
	ProdMode     bool
	RunUser      string

	HasRobotsTxt bool
)
View Source
var DBConfig model.DbCfg
View Source
var (
	MailService *mailer.Mailer
)
View Source
var PackageConfig struct {
	EnableGoogleDiff bool
	MAXDiffCount     int
}
View Source
var Service struct {
	RegisterEmailConfirm   bool
	DisableRegistration    bool
	RequireSignInView      bool
	EnableCacheAvatar      bool
	EnableNotifyMail       bool
	EnableReverseProxyAuth bool
	ActiveCodeLives        int
	ResetPwdCodeLives      int
	EnableCaptcha          bool
}
View Source
var Storage struct {
	StorageType   string
	StorageConfig *storage.Config
}

Functions

func ExecPath

func ExecPath() (string, error)

func InitConfig

func InitConfig()

func WorkDir

func WorkDir() (string, error)

Types

type Scheme

type Scheme string
const (
	SCHEME_HTTP  Scheme = "http"
	SCHEME_HTTPS Scheme = "https"
)

Jump to

Keyboard shortcuts

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