{"modulePath":"github.com/stackdocker/gogs","version":"v0.9.13","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package setting\n\n## Variables\n\n```go\nvar (\n\t// Build information\n\tBuildTime    string\n\tBuildGitHash string\n\n\t// App settings\n\tAppVer         string\n\tAppName        string\n\tAppUrl         string\n\tAppSubUrl      string\n\tAppSubUrlDepth int // Number of slashes\n\tAppPath        string\n\tAppDataPath    string\n\n\t// Server settings\n\tProtocol           Scheme\n\tDomain             string\n\tHttpAddr, HttpPort string\n\tLocalURL           string\n\tOfflineMode        bool\n\tDisableRouterLog   bool\n\tCertFile, KeyFile  string\n\tStaticRootPath     string\n\tEnableGzip         bool\n\tLandingPageUrl     LandingPage\n\n\tSSH struct {\n\t\tDisabled            bool           `ini:\"DISABLE_SSH\"`\n\t\tStartBuiltinServer  bool           `ini:\"START_SSH_SERVER\"`\n\t\tDomain              string         `ini:\"SSH_DOMAIN\"`\n\t\tPort                int            `ini:\"SSH_PORT\"`\n\t\tListenPort          int            `ini:\"SSH_LISTEN_PORT\"`\n\t\tRootPath            string         `ini:\"SSH_ROOT_PATH\"`\n\t\tKeyTestPath         string         `ini:\"SSH_KEY_TEST_PATH\"`\n\t\tKeygenPath          string         `ini:\"SSH_KEYGEN_PATH\"`\n\t\tMinimumKeySizeCheck bool           `ini:\"-\"`\n\t\tMinimumKeySizes     map[string]int `ini:\"-\"`\n\t}\n\n\t// Security settings\n\tInstallLock          bool\n\tSecretKey            string\n\tLogInRememberDays    int\n\tCookieUserName       string\n\tCookieRememberName   string\n\tReverseProxyAuthUser string\n\n\t// Database settings\n\tUseSQLite3    bool\n\tUseMySQL      bool\n\tUsePostgreSQL bool\n\tUseTiDB       bool\n\n\t// Webhook settings\n\tWebhook struct {\n\t\tQueueLength    int\n\t\tDeliverTimeout int\n\t\tSkipTLSVerify  bool\n\t\tTypes          []string\n\t\tPagingNum      int\n\t}\n\n\t// Repository settings\n\tRepository struct {\n\t\tAnsiCharset            string\n\t\tForcePrivate           bool\n\t\tMaxCreationLimit       int\n\t\tPullRequestQueueLength int\n\t}\n\tRepoRootPath string\n\tScriptType   string\n\n\t// UI settings\n\tExplorePagingNum     int\n\tIssuePagingNum       int\n\tFeedMaxCommitNum     int\n\tAdminUserPagingNum   int\n\tAdminRepoPagingNum   int\n\tAdminNoticePagingNum int\n\tAdminOrgPagingNum    int\n\tThemeColorMetaTag    string\n\n\t// Markdown sttings\n\tMarkdown struct {\n\t\tEnableHardLineBreak bool\n\t\tCustomURLSchemes    []string `ini:\"CUSTOM_URL_SCHEMES\"`\n\t}\n\n\t// Picture settings\n\tAvatarUploadPath string\n\tGravatarSource   string\n\tDisableGravatar  bool\n\n\t// Log settings\n\tLogRootPath string\n\tLogModes    []string\n\tLogConfigs  []string\n\n\t// Attachment settings\n\tAttachmentPath         string\n\tAttachmentAllowedTypes string\n\tAttachmentMaxSize      int64\n\tAttachmentMaxFiles     int\n\tAttachmentEnabled      bool\n\n\t// Time settings\n\tTimeFormat string\n\n\t// Cache settings\n\tCacheAdapter  string\n\tCacheInternal int\n\tCacheConn     string\n\n\t// Session settings\n\tSessionConfig  session.Options\n\tCSRFCookieName = \"_csrf\"\n\n\t// Git settings\n\tGit struct {\n\t\tMaxGitDiffLines int\n\t\tGcArgs          []string `delim:\" \"`\n\t\tTimeout         struct {\n\t\t\tMigrate int\n\t\t\tMirror  int\n\t\t\tClone   int\n\t\t\tPull    int\n\t\t} `ini:\"git.timeout\"`\n\t}\n\n\t// Cron tasks\n\tCron struct {\n\t\tUpdateMirror struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t} `ini:\"cron.update_mirrors\"`\n\t\tRepoHealthCheck struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t\tTimeout    time.Duration\n\t\t\tArgs       []string `delim:\" \"`\n\t\t} `ini:\"cron.repo_health_check\"`\n\t\tCheckRepoStats struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t} `ini:\"cron.check_repo_stats\"`\n\t}\n\n\t// I18n settings\n\tLangs, Names []string\n\n\t// Other settings\n\tShowFooterBranding    bool\n\tShowFooterVersion     bool\n\tSupportMiniWinService bool\n\n\t// Global setting objects\n\tCfg          *ini.File\n\tCustomPath   string // Custom directory path\n\tCustomConf   string\n\tProdMode     bool\n\tRunUser      string\n\tIsWindows    bool\n\tHasRobotsTxt bool\n)\n```\n\n```go\nvar Service struct {\n\tActiveCodeLives                int\n\tResetPwdCodeLives              int\n\tRegisterEmailConfirm           bool\n\tDisableRegistration            bool\n\tShowRegistrationButton         bool\n\tRequireSignInView              bool\n\tEnableNotifyMail               bool\n\tEnableReverseProxyAuth         bool\n\tEnableReverseProxyAutoRegister bool\n\tEnableCaptcha                  bool\n}\n```\n\n## Functions\n\n```go\nfunc DateLang(lang string) string\n```\n\n```go\nfunc NewContext()\n```\nNewContext initializes configuration context. NOTE: do not print any log except error.\n\n```go\nfunc NewServices()\n```\n\n```go\nfunc WorkDir() (string, error)\n```\nWorkDir returns absolute path of work directory.\n\n## Types\n\n```go\ntype LandingPage string\n```\n\n```go\nconst (\n\tLANDING_PAGE_HOME    LandingPage = \"/\"\n\tLANDING_PAGE_EXPLORE LandingPage = \"/explore\"\n)\n```\n\n```go\ntype Mailer struct {\n\tQueueLength       int\n\tName              string\n\tHost              string\n\tFrom              string\n\tUser, Passwd      string\n\tDisableHelo       bool\n\tHeloHostname      string\n\tSkipVerify        bool\n\tUseCertificate    bool\n\tCertFile, KeyFile string\n}\n```\nMailer represents mail service.\n\n```go\nvar (\n\tMailService *Mailer\n)\n```\n\n```go\ntype Scheme string\n```\n\n```go\nconst (\n\tHTTP  Scheme = \"http\"\n\tHTTPS Scheme = \"https\"\n\tFCGI  Scheme = \"fcgi\"\n)\n```\n\n","path":"github.com/stackdocker/gogs/modules/setting","name":"setting","synopsis":"","isRedistributable":true}
