setting

package
v2.0.0-beta1+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2015 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEV  string = "development"
	PROD string = "production"
	TEST string = "test"
)

Variables

View Source
var (
	// App settings.
	Env       string = DEV
	AppName   string
	AppUrl    string
	AppSubUrl string

	// build
	BuildVersion string
	BuildCommit  string
	BuildStamp   int64

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

	// Http server options
	Protocol           Scheme
	Domain             string
	HttpAddr, HttpPort string
	SshPort            int
	CertFile, KeyFile  string
	RouterLogging      bool
	StaticRootPath     string
	EnableGzip         bool

	// Security settings.
	SecretKey          string
	LogInRememberDays  int
	CookieUserName     string
	CookieRememberName string

	// User settings
	AllowUserSignUp    bool
	AllowUserOrgCreate bool
	AutoAssignOrg      bool
	AutoAssignOrgRole  string

	// Http auth
	AdminUser     string
	AdminPassword string

	AnonymousEnabled bool
	AnonymousOrgName string
	AnonymousOrgRole string

	// Session settings.
	SessionOptions session.Options

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

	// PhantomJs Rendering
	ImagesDir  string
	PhantomDir string

	ReportingEnabled  bool
	GoogleAnalyticsId string
)

Functions

func LogLoadedConfigFiles

func LogLoadedConfigFiles()

func NewConfigContext

func NewConfigContext(config string)

func ToAbsUrl

func ToAbsUrl(relativeUrl string) string

Types

type OAuthInfo

type OAuthInfo struct {
	ClientId, ClientSecret string
	Scopes                 []string
	AuthUrl, TokenUrl      string
	Enabled                bool
}

type OAuther

type OAuther struct {
	GitHub, Google, Twitter bool
	OAuthInfos              map[string]*OAuthInfo
}
var OAuthService *OAuther

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