setting

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Build infos added by -ldflags
	BuildTime    string
	BuildGitHash string

	AppVer          string
	AppPath         string
	AppName         string
	AppURL          string
	AppSubURL       string
	AppSubURLDepth  int // Number of slashes
	CanRegister     bool
	AnonymousCreate bool
	ProdMode        bool

	// Cron tasks
	Cron struct {
		RepoArchiveCleanup struct {
			Enabled    bool
			RunAtStart bool
			Schedule   string
			OlderThan  time.Duration
		} `ini:"cron.repo_archive_cleanup"`
	}

	Protocol             Scheme
	UnixSocketPermission uint32
	Domain               string
	HTTPAddr             string
	HTTPPort             string
	DisableRouterLog     bool
	StaticRootPath       string

	HTTP struct {
		AccessControlAllowOrigin string
	}

	UseSQLite3    bool
	UseMySQL      bool
	UsePostgreSQL bool
	UseMSSQL      bool

	CustomConf    string
	IsWindows     bool
	Cfg           *ini.File
	HasRobotsTxt  bool
	RobotsTxtPath string

	LogRootPath string
	LogModes    []string
	LogConfigs  []interface{}

	RepositoryRoot string
	DisableHTTPGit bool
	GitBinary      string

	SessionConfig  session.Options
	CSRFCookieName string

	InstallLock             bool
	SecretKey               string
	LoginRememberDays       int
	CookieUserName          string
	CookieRememberName      string
	CookieSecure            bool
	EnableLoginStatusCookie bool
	LoginStatusCookieName   string

	CacheAdapter  string
	CacheInterval int
	CacheConn     string

	// Langs settings
	Langs []string
	Names []string

	// Markdown sttings
	Markdown struct {
		EnableHardLineBreak bool
		CustomURLSchemes    []string `ini:"CUSTOM_URL_SCHEMES"`
		FileExtensions      []string
	}

	// Smartypants settings
	Smartypants struct {
		Enabled      bool
		Fractions    bool
		Dashes       bool
		LatexDashes  bool
		AngledQuotes bool
	}

	// Bloby struct for static limitations
	Bloby struct {
		MaxSizeDisplay int64
		MaxPageDisplay int64
		MaxRawSize     int64
	}
)

Settings

Functions

func DateLang

func DateLang(lang string) string

DateLang transforms standard language locale name to corresponding value in datetime plugin.

func InitConfig

func InitConfig()

InitConfig from file

func WorkDir

func WorkDir() (string, error)

WorkDir returns absolute path of work directory.

Types

type Mailer

type Mailer struct {
	QueueLength       int
	Subject           string
	Host              string
	From              string
	FromEmail         string
	User, Passwd      string
	DisableHelo       bool
	HeloHostname      string
	SkipVerify        bool
	UseCertificate    bool
	CertFile, KeyFile string
	UsePlainText      bool
}

Mailer represents mail service.

var (
	// MailService Mailer
	MailService *Mailer
)

type Scheme

type Scheme string

Scheme type

const (
	SchemeHTTP       Scheme = "http"
	SchemeHTTPS      Scheme = "https"
	SchemeFCGI       Scheme = "fcgi"
	SchemeUnixSocket Scheme = "unix"
)

Schemes

Jump to

Keyboard shortcuts

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