setting

package
v0.0.0-...-3570084 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2014 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// App settings.
	AppVer  string // not in ini
	AppName string
	AppUrl  string // not in ini

	// Server settings.
	Protocol           Scheme
	Domain             string
	HttpAddr, HttpPort string
	SshPort            int
	OfflineMode        bool
	DisableRouterLog   bool
	CertFile, KeyFile  string
	StaticRootPath     string

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

	// Webhook settings.
	WebhookTaskInterval   int
	WebhookDeliverTimeout int

	// Log settings.
	LogRootPath string
	LogModes    []string
	LogConfigs  []string

	// Cache settings.
	Cache        cache.Cache
	CacheAdapter string
	CacheConfig  string

	EnableRedis    bool
	EnableMemcache bool

	// Session settings.
	SessionProvider string
	SessionConfig   *session.Config
	SessionManager  *session.Manager

	// Global setting objects.
	Cfg        *goconfig.ConfigFile
	CustomPath string // Custom directory path.
	ProdMode   bool
	RunUser    string
)
View Source
var Service struct {
	RegisterEmailConfirm   bool
	DisableRegistration    bool
	RequireSignInView      bool
	EnableCacheAvatar      bool
	EnableNotifyMail       bool
	EnableReverseProxyAuth bool
	ActiveCodeLives        int
	ResetPwdCodeLives      int
}

Functions

func ExecPath

func ExecPath() (string, error)

Load a file according to the given string

func NewConfigContext

func NewConfigContext()

NewConfigContext initializes configuration context. NOTE: do not print any log except error.

func NewServices

func NewServices()

func WorkDir

func WorkDir() (string, error)

WorkDir returns absolute path of work directory.

Types

type Scheme

type Scheme string
const (
	HTTP  Scheme = "http"
	HTTPS Scheme = "https"
)

Jump to

Keyboard shortcuts

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