setting

package
v0.8.25 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2016 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Build information
	BuildTime    string
	BuildGitHash string

	// App settings
	AppVer      string
	AppName     string
	AppUrl      string
	AppSubUrl   string
	AppPath     string
	AppDataPath = "data"

	// Server settings
	Protocol           Scheme
	Domain             string
	HttpAddr, HttpPort string
	LocalURL           string
	DisableSSH         bool
	StartSSHServer     bool
	SSHDomain          string
	SSHPort            int
	SSHRootPath        string
	OfflineMode        bool
	DisableRouterLog   bool
	CertFile, KeyFile  string
	StaticRootPath     string
	EnableGzip         bool
	LandingPageUrl     LandingPage

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

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

	// Webhook settings
	Webhook struct {
		QueueLength    int
		DeliverTimeout int
		SkipTLSVerify  bool
		Types          []string
		PagingNum      int
	}

	// Repository settings
	Repository struct {
		AnsiCharset            string
		ForcePrivate           bool
		MaxCreationLimit       int
		PullRequestQueueLength int
	}
	RepoRootPath string
	ScriptType   string

	// UI settings
	ExplorePagingNum     int
	IssuePagingNum       int
	FeedMaxCommitNum     int
	AdminUserPagingNum   int
	AdminRepoPagingNum   int
	AdminNoticePagingNum int
	AdminOrgPagingNum    int

	// Markdown sttings
	Markdown struct {
		EnableHardLineBreak bool
	}

	// Picture settings
	PictureService   string
	AvatarUploadPath string
	GravatarSource   string
	DisableGravatar  bool

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

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

	// Time settings
	TimeFormat string

	// Cache settings
	CacheAdapter  string
	CacheInternal int
	CacheConn     string

	// Session settings
	SessionConfig session.Options

	// Git settings
	Git struct {
		MaxGitDiffLines int
		GcArgs          []string `delim:" "`
	}

	// Cron tasks
	Cron struct {
		UpdateMirror struct {
			Enabled    bool
			RunAtStart bool
			Schedule   string
		} `ini:"cron.update_mirrors"`
		RepoHealthCheck struct {
			Enabled    bool
			RunAtStart bool
			Schedule   string
			Timeout    time.Duration
			Args       []string `delim:" "`
		} `ini:"cron.repo_health_check"`
		CheckRepoStats struct {
			Enabled    bool
			RunAtStart bool
			Schedule   string
		} `ini:"cron.check_repo_stats"`
	}

	// I18n settings
	Langs, Names []string

	// Other settings
	ShowFooterBranding    bool
	ShowFooterVersion     bool
	SupportMiniWinService bool

	// Global setting objects
	Cfg          *ini.File
	CustomPath   string // Custom directory path
	CustomConf