|
|
@ -43,11 +43,11 @@ const ( |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
var ( |
|
|
|
// Build information.
|
|
|
|
// Build information
|
|
|
|
BuildTime string |
|
|
|
BuildTime string |
|
|
|
BuildGitHash string |
|
|
|
BuildGitHash string |
|
|
|
|
|
|
|
|
|
|
|
// App settings.
|
|
|
|
// App settings
|
|
|
|
AppVer string |
|
|
|
AppVer string |
|
|
|
AppName string |
|
|
|
AppName string |
|
|
|
AppUrl string |
|
|
|
AppUrl string |
|
|
@ -55,7 +55,7 @@ var ( |
|
|
|
AppPath string |
|
|
|
AppPath string |
|
|
|
AppDataPath = "data" |
|
|
|
AppDataPath = "data" |
|
|
|
|
|
|
|
|
|
|
|
// Server settings.
|
|
|
|
// Server settings
|
|
|
|
Protocol Scheme |
|
|
|
Protocol Scheme |
|
|
|
Domain string |
|
|
|
Domain string |
|
|
|
HttpAddr, HttpPort string |
|
|
|
HttpAddr, HttpPort string |
|
|
@ -71,7 +71,7 @@ var ( |
|
|
|
EnableGzip bool |
|
|
|
EnableGzip bool |
|
|
|
LandingPageUrl LandingPage |
|
|
|
LandingPageUrl LandingPage |
|
|
|
|
|
|
|
|
|
|
|
// Security settings.
|
|
|
|
// Security settings
|
|
|
|
InstallLock bool |
|
|
|
InstallLock bool |
|
|
|
SecretKey string |
|
|
|
SecretKey string |
|
|
|
LogInRememberDays int |
|
|
|
LogInRememberDays int |
|
|
@ -79,13 +79,13 @@ var ( |
|
|
|
CookieRememberName string |
|
|
|
CookieRememberName string |
|
|
|
ReverseProxyAuthUser string |
|
|
|
ReverseProxyAuthUser string |
|
|
|
|
|
|
|
|
|
|
|
// Database settings.
|
|
|
|
// Database settings
|
|
|
|
UseSQLite3 bool |
|
|
|
UseSQLite3 bool |
|
|
|
UseMySQL bool |
|
|
|
UseMySQL bool |
|
|
|
UsePostgreSQL bool |
|
|
|
UsePostgreSQL bool |
|
|
|
UseTiDB bool |
|
|
|
UseTiDB bool |
|
|
|
|
|
|
|
|
|
|
|
// Webhook settings.
|
|
|
|
// Webhook settings
|
|
|
|
Webhook struct { |
|
|
|
Webhook struct { |
|
|
|
QueueLength int |
|
|
|
QueueLength int |
|
|
|
DeliverTimeout int |
|
|
|
DeliverTimeout int |
|
|
@ -94,7 +94,7 @@ var ( |
|
|
|
PagingNum int |
|
|
|
PagingNum int |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Repository settings.
|
|
|
|
// Repository settings
|
|
|
|
Repository struct { |
|
|
|
Repository struct { |
|
|
|
AnsiCharset string |
|
|
|
AnsiCharset string |
|
|
|
ForcePrivate bool |
|
|
|
ForcePrivate bool |
|
|
@ -104,7 +104,7 @@ var ( |
|
|
|
RepoRootPath string |
|
|
|
RepoRootPath string |
|
|
|
ScriptType string |
|
|
|
ScriptType string |
|
|
|
|
|
|
|
|
|
|
|
// UI settings.
|
|
|
|
// UI settings
|
|
|
|
ExplorePagingNum int |
|
|
|
ExplorePagingNum int |
|
|
|
IssuePagingNum int |
|
|
|
IssuePagingNum int |
|
|
|
FeedMaxCommitNum int |
|
|
|
FeedMaxCommitNum int |
|
|
@ -113,47 +113,47 @@ var ( |
|
|
|
AdminNoticePagingNum int |
|
|
|
AdminNoticePagingNum int |
|
|
|
AdminOrgPagingNum int |
|
|
|
AdminOrgPagingNum int |
|
|
|
|
|
|
|
|
|
|
|
// Markdown sttings.
|
|
|
|
// Markdown sttings
|
|
|
|
Markdown struct { |
|
|
|
Markdown struct { |
|
|
|
EnableHardLineBreak bool |
|
|
|
EnableHardLineBreak bool |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Picture settings.
|
|
|
|
// Picture settings
|
|
|
|
PictureService string |
|
|
|
PictureService string |
|
|
|
AvatarUploadPath string |
|
|
|
AvatarUploadPath string |
|
|
|
GravatarSource string |
|
|
|
GravatarSource string |
|
|
|
DisableGravatar bool |
|
|
|
DisableGravatar bool |
|
|
|
|
|
|
|
|
|
|
|
// Log settings.
|
|
|
|
// Log settings
|
|
|
|
LogRootPath string |
|
|
|
LogRootPath string |
|
|
|
LogModes []string |
|
|
|
LogModes []string |
|
|
|
LogConfigs []string |
|
|
|
LogConfigs []string |
|
|
|
|
|
|
|
|
|
|
|
// Attachment settings.
|
|
|
|
// Attachment settings
|
|
|
|
AttachmentPath string |
|
|
|
AttachmentPath string |
|
|
|
AttachmentAllowedTypes string |
|
|
|
AttachmentAllowedTypes string |
|
|
|
AttachmentMaxSize int64 |
|
|
|
AttachmentMaxSize int64 |
|
|
|
AttachmentMaxFiles int |
|
|
|
AttachmentMaxFiles int |
|
|
|
AttachmentEnabled bool |
|
|
|
AttachmentEnabled bool |
|
|
|
|
|
|
|
|
|
|
|
// Time settings.
|
|
|
|
// Time settings
|
|
|
|
TimeFormat string |
|
|
|
TimeFormat string |
|
|
|
|
|
|
|
|
|
|
|
// Cache settings.
|
|
|
|
// Cache settings
|
|
|
|
CacheAdapter string |
|
|
|
CacheAdapter string |
|
|
|
CacheInternal int |
|
|
|
CacheInternal int |
|
|
|
CacheConn string |
|
|
|
CacheConn string |
|
|
|
|
|
|
|
|
|
|
|
// Session settings.
|
|
|
|
// Session settings
|
|
|
|
SessionConfig session.Options |
|
|
|
SessionConfig session.Options |
|
|
|
|
|
|
|
|
|
|
|
// Git settings.
|
|
|
|
// Git settings
|
|
|
|
Git struct { |
|
|
|
Git struct { |
|
|
|
MaxGitDiffLines int |
|
|
|
MaxGitDiffLines int |
|
|
|
GcArgs []string `delim:" "` |
|
|
|
GcArgs []string `delim:" "` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Cron tasks.
|
|
|
|
// Cron tasks
|
|
|
|
Cron struct { |
|
|
|
Cron struct { |
|
|
|
UpdateMirror struct { |
|
|
|
UpdateMirror struct { |
|
|
|
Enabled bool |
|
|
|
Enabled bool |
|
|
@ -174,17 +174,19 @@ var ( |
|
|
|
} `ini:"cron.check_repo_stats"` |
|
|
|
} `ini:"cron.check_repo_stats"` |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// I18n settings.
|
|
|
|
// I18n settings
|
|
|
|
Langs, Names []string |
|
|
|
Langs, Names []string |
|
|
|
dateLangs map[string]string |
|
|
|
dateLangs map[string]string |
|
|
|
|
|
|
|
|
|
|
|
// Other settings.
|
|
|
|
// Highlight settings are loaded in modules/template/hightlight.go
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Other settings
|
|
|
|
ShowFooterBranding bool |
|
|
|
ShowFooterBranding bool |
|
|
|
ShowFooterVersion bool |
|
|
|
ShowFooterVersion bool |
|
|
|
|
|
|
|
|
|
|
|
// Global setting objects.
|
|
|
|
// Global setting objects
|
|
|
|
Cfg *ini.File |
|
|
|
Cfg *ini.File |
|
|
|
CustomPath string // Custom directory path.
|
|
|
|
CustomPath string // Custom directory path
|
|
|
|
CustomConf string |
|
|
|
CustomConf string |
|
|
|
ProdMode bool |
|
|
|
ProdMode bool |
|
|
|
RunUser string |
|
|
|
RunUser string |
|
|
|