Version: v0.4.2 Latest Latest

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

Go to latest
Published: Jun 6, 2014 License: BSD-3-Clause Imports: 12 Imported by: 0




This section is empty.


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

	// 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

	// Repository settings.
	RepoRootPath string
	ScriptType   string

	// Picture settings.
	PictureService  string
	DisableGravatar bool

	// 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 (
	MailService  *Mailer
	OauthService *Oauther
View Source
var Service struct {
	RegisterEmailConfirm bool
	DisableRegistration  bool
	RequireSignInView    bool
	EnableCacheAvatar    bool
	NotifyMail           bool
	ActiveCodeLives      int
	ResetPwdCodeLives    int
	LdapAuth             bool


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.


type Mailer

type Mailer struct {
	Name         string
	Host         string
	From         string
	User, Passwd string

Mailer represents mail service.

type OauthInfo

type OauthInfo struct {
	ClientId, ClientSecret string
	Scopes                 string
	AuthUrl, TokenUrl      string

type Oauther

type Oauther struct {
	GitHub, Google, Tencent,
	Twitter, Weibo bool
	OauthInfos map[string]*OauthInfo

Oauther represents oauth service.

type Scheme

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

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL