{"modulePath":"github.com/RedAFD/code-core","version":"v1.8.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package setting\n\n## Constants\n\n```go\nconst (\n\tLevelQueueType   = \"levelqueue\"\n\tChannelQueueType = \"channel\"\n)\n```\nenumerates all the indexer queue types\n\n```go\nconst (\n\tRepoCreatingLastUserVisibility = \"last\"\n\tRepoCreatingPrivate            = \"private\"\n\tRepoCreatingPublic             = \"public\"\n)\n```\nenumerates all the policy repository creating\n\n```go\nconst (\n\tImageCaptcha = \"image\"\n\tReCaptcha    = \"recaptcha\"\n)\n```\nenumerates all the types of captchas\n\n## Variables\n\n```go\nvar (\n\tRepository = struct {\n\t\tAnsiCharset                             string\n\t\tForcePrivate                            bool\n\t\tDefaultPrivate                          string\n\t\tMaxCreationLimit                        int\n\t\tMirrorQueueLength                       int\n\t\tPullRequestQueueLength                  int\n\t\tPreferredLicenses                       []string\n\t\tDisableHTTPGit                          bool\n\t\tAccessControlAllowOrigin                string\n\t\tUseCompatSSHURI                         bool\n\t\tDefaultCloseIssuesViaCommitsInAnyBranch bool\n\n\t\t// Repository editor settings\n\t\tEditor struct {\n\t\t\tLineWrapExtensions   []string\n\t\t\tPreviewableFileModes []string\n\t\t} `ini:\"-\"`\n\n\t\t// Repository upload settings\n\t\tUpload struct {\n\t\t\tEnabled      bool\n\t\t\tTempPath     string\n\t\t\tAllowedTypes []string `delim:\"|\"`\n\t\t\tFileMaxSize  int64\n\t\t\tMaxFiles     int\n\t\t} `ini:\"-\"`\n\n\t\t// Repository local settings\n\t\tLocal struct {\n\t\t\tLocalCopyPath string\n\t\t\tLocalWikiPath string\n\t\t} `ini:\"-\"`\n\n\t\t// Pull request settings\n\t\tPullRequest struct {\n\t\t\tWorkInProgressPrefixes []string\n\t\t} `ini:\"repository.pull-request\"`\n\n\t\t// Issue Setting\n\t\tIssue struct {\n\t\t\tLockReasons []string\n\t\t} `ini:\"repository.issue\"`\n\t}{\n\t\tAnsiCharset:                             \"\",\n\t\tForcePrivate:                            false,\n\t\tDefaultPrivate:                          RepoCreatingLastUserVisibility,\n\t\tMaxCreationLimit:                        -1,\n\t\tMirrorQueueLength:                       1000,\n\t\tPullRequestQueueLength:                  1000,\n\t\tPreferredLicenses:                       []string{\"Apache License 2.0,MIT License\"},\n\t\tDisableHTTPGit:                          false,\n\t\tAccessControlAllowOrigin:                \"\",\n\t\tUseCompatSSHURI:                         false,\n\t\tDefaultCloseIssuesViaCommitsInAnyBranch: false,\n\n\t\tEditor: struct {\n\t\t\tLineWrapExtensions   []string\n\t\t\tPreviewableFileModes []string\n\t\t}{\n\t\t\tLineWrapExtensions:   strings.Split(\".txt,.md,.markdown,.mdown,.mkd,\", \",\"),\n\t\t\tPreviewableFileModes: []string{\"markdown\"},\n\t\t},\n\n\t\tUpload: struct {\n\t\t\tEnabled      bool\n\t\t\tTempPath     string\n\t\t\tAllowedTypes []string `delim:\"|\"`\n\t\t\tFileMaxSize  int64\n\t\t\tMaxFiles     int\n\t\t}{\n\t\t\tEnabled:      true,\n\t\t\tTempPath:     \"data/tmp/uploads\",\n\t\t\tAllowedTypes: []string{},\n\t\t\tFileMaxSize:  3,\n\t\t\tMaxFiles:     5,\n\t\t},\n\n\t\tLocal: struct {\n\t\t\tLocalCopyPath string\n\t\t\tLocalWikiPath string\n\t\t}{\n\t\t\tLocalCopyPath: \"tmp/local-repo\",\n\t\t\tLocalWikiPath: \"tmp/local-wiki\",\n\t\t},\n\n\t\tPullRequest: struct {\n\t\t\tWorkInProgressPrefixes []string\n\t\t}{\n\t\t\tWorkInProgressPrefixes: []string{\"WIP:\", \"[WIP]\"},\n\t\t},\n\n\t\tIssue: struct {\n\t\t\tLockReasons []string\n\t\t}{\n\t\t\tLockReasons: strings.Split(\"Too heated,Off-topic,Spam,Resolved\", \",\"),\n\t\t},\n\t}\n\tRepoRootPath string\n\tScriptType   = \"bash\"\n)\n```\nRepository settings\n\n```go\nvar (\n\t// AppVer settings\n\tAppVer         string\n\tAppBuiltWith   string\n\tAppName        string\n\tAppURL         string\n\tAppSubURL      string\n\tAppSubURLDepth int // Number of slashes\n\tAppPath        string\n\tAppDataPath    string\n\tAppWorkPath    string\n\n\t// Server settings\n\tProtocol             Scheme\n\tDomain               string\n\tHTTPAddr             string\n\tHTTPPort             string\n\tLocalURL             string\n\tRedirectOtherPort    bool\n\tPortToRedirect       string\n\tOfflineMode          bool\n\tDisableRouterLog     bool\n\tCertFile             string\n\tKeyFile              string\n\tStaticRootPath       string\n\tEnableGzip           bool\n\tLandingPageURL       LandingPage\n\tUnixSocketPermission uint32\n\tEnablePprof          bool\n\tPprofDataPath        string\n\tEnableLetsEncrypt    bool\n\tLetsEncryptTOS       bool\n\tLetsEncryptDirectory string\n\tLetsEncryptEmail     string\n\n\tSSH = struct {\n\t\tDisabled                 bool           `ini:\"DISABLE_SSH\"`\n\t\tStartBuiltinServer       bool           `ini:\"START_SSH_SERVER\"`\n\t\tBuiltinServerUser        string         `ini:\"BUILTIN_SSH_SERVER_USER\"`\n\t\tDomain                   string         `ini:\"SSH_DOMAIN\"`\n\t\tPort                     int            `ini:\"SSH_PORT\"`\n\t\tListenHost               string         `ini:\"SSH_LISTEN_HOST\"`\n\t\tListenPort               int            `ini:\"SSH_LISTEN_PORT\"`\n\t\tRootPath                 string         `ini:\"SSH_ROOT_PATH\"`\n\t\tServerCiphers            []string       `ini:\"SSH_SERVER_CIPHERS\"`\n\t\tServerKeyExchanges       []string       `ini:\"SSH_SERVER_KEY_EXCHANGES\"`\n\t\tServerMACs               []string       `ini:\"SSH_SERVER_MACS\"`\n\t\tKeyTestPath              string         `ini:\"SSH_KEY_TEST_PATH\"`\n\t\tKeygenPath               string         `ini:\"SSH_KEYGEN_PATH\"`\n\t\tAuthorizedKeysBackup     bool           `ini:\"SSH_AUTHORIZED_KEYS_BACKUP\"`\n\t\tMinimumKeySizeCheck      bool           `ini:\"-\"`\n\t\tMinimumKeySizes          map[string]int `ini:\"-\"`\n\t\tCreateAuthorizedKeysFile bool           `ini:\"SSH_CREATE_AUTHORIZED_KEYS_FILE\"`\n\t\tExposeAnonymous          bool           `ini:\"SSH_EXPOSE_ANONYMOUS\"`\n\t}{\n\t\tDisabled:           false,\n\t\tStartBuiltinServer: false,\n\t\tDomain:             \"\",\n\t\tPort:               22,\n\t\tServerCiphers:      []string{\"aes128-ctr\", \"aes192-ctr\", \"aes256-ctr\", \"aes128-gcm@openssh.com\", \"arcfour256\", \"arcfour128\"},\n\t\tServerKeyExchanges: []string{\"diffie-hellman-group1-sha1\", \"diffie-hellman-group14-sha1\", \"ecdh-sha2-nistp256\", \"ecdh-sha2-nistp384\", \"ecdh-sha2-nistp521\", \"curve25519-sha256@libssh.org\"},\n\t\tServerMACs:         []string{\"hmac-sha2-256-etm@openssh.com\", \"hmac-sha2-256\", \"hmac-sha1\", \"hmac-sha1-96\"},\n\t\tKeygenPath:         \"ssh-keygen\",\n\t}\n\n\tLFS struct {\n\t\tStartServer     bool          `ini:\"LFS_START_SERVER\"`\n\t\tContentPath     string        `ini:\"LFS_CONTENT_PATH\"`\n\t\tJWTSecretBase64 string        `ini:\"LFS_JWT_SECRET\"`\n\t\tJWTSecretBytes  []byte        `ini:\"-\"`\n\t\tHTTPAuthExpiry  time.Duration `ini:\"LFS_HTTP_AUTH_EXPIRY\"`\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\tReverseProxyAuthEmail string\n\tMinPasswordLength     int\n\tImportLocalPaths      bool\n\tDisableGitHooks       bool\n\n\t// Database settings\n\tUseSQLite3       bool\n\tUseMySQL         bool\n\tUseMSSQL         bool\n\tUsePostgreSQL    bool\n\tUseTiDB          bool\n\tLogSQL           bool\n\tDBConnectRetries int\n\tDBConnectBackoff time.Duration\n\n\t// UI settings\n\tUI = struct {\n\t\tExplorePagingNum    int\n\t\tIssuePagingNum      int\n\t\tRepoSearchPagingNum int\n\t\tFeedMaxCommitNum    int\n\t\tGraphMaxCommitNum   int\n\t\tCodeCommentLines    int\n\t\tReactionMaxUserNum  int\n\t\tThemeColorMetaTag   string\n\t\tMaxDisplayFileSize  int64\n\t\tShowUserEmail       bool\n\t\tDefaultTheme        string\n\t\tThemes              []string\n\n\t\tAdmin struct {\n\t\t\tUserPagingNum   int\n\t\t\tRepoPagingNum   int\n\t\t\tNoticePagingNum int\n\t\t\tOrgPagingNum    int\n\t\t} `ini:\"ui.admin\"`\n\t\tUser struct {\n\t\t\tRepoPagingNum int\n\t\t} `ini:\"ui.user\"`\n\t\tMeta struct {\n\t\t\tAuthor      string\n\t\t\tDescription string\n\t\t\tKeywords    string\n\t\t} `ini:\"ui.meta\"`\n\t}{\n\t\tExplorePagingNum:    20,\n\t\tIssuePagingNum:      10,\n\t\tRepoSearchPagingNum: 10,\n\t\tFeedMaxCommitNum:    5,\n\t\tGraphMaxCommitNum:   100,\n\t\tCodeCommentLines:    4,\n\t\tReactionMaxUserNum:  10,\n\t\tThemeColorMetaTag:   `#6cc644`,\n\t\tMaxDisplayFileSize:  8388608,\n\t\tDefaultTheme:        `gitea`,\n\t\tThemes:              []string{`gitea`, `arc-green`},\n\t\tAdmin: struct {\n\t\t\tUserPagingNum   int\n\t\t\tRepoPagingNum   int\n\t\t\tNoticePagingNum int\n\t\t\tOrgPagingNum    int\n\t\t}{\n\t\t\tUserPagingNum:   50,\n\t\t\tRepoPagingNum:   50,\n\t\t\tNoticePagingNum: 25,\n\t\t\tOrgPagingNum:    50,\n\t\t},\n\t\tUser: struct {\n\t\t\tRepoPagingNum int\n\t\t}{\n\t\t\tRepoPagingNum: 15,\n\t\t},\n\t\tMeta: struct {\n\t\t\tAuthor      string\n\t\t\tDescription string\n\t\t\tKeywords    string\n\t\t}{\n\t\t\tAuthor:      \"Gitea - Git with a cup of tea\",\n\t\t\tDescription: \"Gitea (Git with a cup of tea) is a painless self-hosted Git service written in Go\",\n\t\t\tKeywords:    \"go,git,self-hosted,gitea\",\n\t\t},\n\t}\n\n\t// Markdown settings\n\tMarkdown = struct {\n\t\tEnableHardLineBreak bool\n\t\tCustomURLSchemes    []string `ini:\"CUSTOM_URL_SCHEMES\"`\n\t\tFileExtensions      []string\n\t}{\n\t\tEnableHardLineBreak: false,\n\t\tFileExtensions:      strings.Split(\".md,.markdown,.mdown,.mkd\", \",\"),\n\t}\n\n\t// Admin settings\n\tAdmin struct {\n\t\tDisableRegularOrgCreation bool\n\t}\n\n\t// Picture settings\n\tAvatarUploadPath      string\n\tAvatarMaxWidth        int\n\tAvatarMaxHeight       int\n\tGravatarSource        string\n\tGravatarSourceURL     *url.URL\n\tDisableGravatar       bool\n\tEnableFederatedAvatar bool\n\tLibravatarService     *libravatar.Libravatar\n\n\t// Log settings\n\tLogLevel           string\n\tLogRootPath        string\n\tLogModes           []string\n\tLogConfigs         []string\n\tRedirectMacaronLog bool\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\tCSRFCookieName = \"_csrf\"\n\n\t// Mirror settings\n\tMirror struct {\n\t\tDefaultInterval time.Duration\n\t\tMinInterval     time.Duration\n\t}\n\n\t// API settings\n\tAPI = struct {\n\t\tEnableSwagger          bool\n\t\tMaxResponseItems       int\n\t\tDefaultPagingNum       int\n\t\tDefaultGitTreesPerPage int\n\t}{\n\t\tEnableSwagger:          true,\n\t\tMaxResponseItems:       50,\n\t\tDefaultPagingNum:       30,\n\t\tDefaultGitTreesPerPage: 1000,\n\t}\n\n\tOAuth2 = struct {\n\t\tEnable                     bool\n\t\tAccessTokenExpirationTime  int64\n\t\tRefreshTokenExpirationTime int64\n\t\tInvalidateRefreshTokens    bool\n\t\tJWTSecretBytes             []byte `ini:\"-\"`\n\t\tJWTSecretBase64            string `ini:\"JWT_SECRET\"`\n\t}{\n\t\tEnable:                     true,\n\t\tAccessTokenExpirationTime:  3600,\n\t\tRefreshTokenExpirationTime: 730,\n\t\tInvalidateRefreshTokens:    false,\n\t}\n\n\tU2F = struct {\n\t\tAppID         string\n\t\tTrustedFacets []string\n\t}{}\n\n\t// Metrics settings\n\tMetrics = struct {\n\t\tEnabled bool\n\t\tToken   string\n\t}{\n\t\tEnabled: false,\n\t\tToken:   \"\",\n\t}\n\n\t// I18n settings\n\tLangs []string\n\tNames []string\n\n\t// Other settings\n\tShowFooterBranding         bool\n\tShowFooterVersion          bool\n\tShowFooterTemplateLoadTime bool\n\n\t// Global setting objects\n\tCfg               *ini.File\n\tCustomPath        string // Custom directory path\n\tCustomConf        string\n\tCustomPID         string\n\tProdMode          bool\n\tRunUser           string\n\tIsWindows         bool\n\tHasRobotsTxt      bool\n\tInternalToken     string // internal access token\n\tIterateBufferSize int\n\n\t// UILocation is the location on the UI, so that we can display the time on UI.\n\t// Currently only show the default time.Local, it could be added to app.ini after UI is ready\n\tUILocation = time.Local\n)\n```\nsettings\n\n```go\nvar (\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\tArchiveCleanup struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t\tOlderThan  time.Duration\n\t\t} `ini:\"cron.archive_cleanup\"`\n\t\tSyncExternalUsers struct {\n\t\t\tEnabled        bool\n\t\t\tRunAtStart     bool\n\t\t\tSchedule       string\n\t\t\tUpdateExisting bool\n\t\t} `ini:\"cron.sync_external_users\"`\n\t\tDeletedBranchesCleanup struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t\tOlderThan  time.Duration\n\t\t} `ini:\"cron.deleted_branches_cleanup\"`\n\t}{\n\t\tUpdateMirror: struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t}{\n\t\t\tEnabled:    true,\n\t\t\tRunAtStart: false,\n\t\t\tSchedule:   \"@every 10m\",\n\t\t},\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}{\n\t\t\tEnabled:    true,\n\t\t\tRunAtStart: false,\n\t\t\tSchedule:   \"@every 24h\",\n\t\t\tTimeout:    60 * time.Second,\n\t\t\tArgs:       []string{},\n\t\t},\n\t\tCheckRepoStats: struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t}{\n\t\t\tEnabled:    true,\n\t\t\tRunAtStart: true,\n\t\t\tSchedule:   \"@every 24h\",\n\t\t},\n\t\tArchiveCleanup: struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t\tOlderThan  time.Duration\n\t\t}{\n\t\t\tEnabled:    true,\n\t\t\tRunAtStart: true,\n\t\t\tSchedule:   \"@every 24h\",\n\t\t\tOlderThan:  24 * time.Hour,\n\t\t},\n\t\tSyncExternalUsers: struct {\n\t\t\tEnabled        bool\n\t\t\tRunAtStart     bool\n\t\t\tSchedule       string\n\t\t\tUpdateExisting bool\n\t\t}{\n\t\t\tEnabled:        true,\n\t\t\tRunAtStart:     false,\n\t\t\tSchedule:       \"@every 24h\",\n\t\t\tUpdateExisting: true,\n\t\t},\n\t\tDeletedBranchesCleanup: struct {\n\t\t\tEnabled    bool\n\t\t\tRunAtStart bool\n\t\t\tSchedule   string\n\t\t\tOlderThan  time.Duration\n\t\t}{\n\t\t\tEnabled:    true,\n\t\t\tRunAtStart: true,\n\t\t\tSchedule:   \"@every 24h\",\n\t\t\tOlderThan:  24 * time.Hour,\n\t\t},\n\t}\n)\n```\n\n```go\nvar (\n\tExternalMarkupParsers []MarkupParser\n)\n```\nExternalMarkupParsers represents the external markup parsers\n\n```go\nvar (\n\t// Git settings\n\tGit = struct {\n\t\tVersion                  string `ini:\"-\"`\n\t\tDisableDiffHighlight     bool\n\t\tMaxGitDiffLines          int\n\t\tMaxGitDiffLineCharacters int\n\t\tMaxGitDiffFiles          int\n\t\tGCArgs                   []string `ini:\"GC_ARGS\" delim:\" \"`\n\t\tTimeout                  struct {\n\t\t\tDefault int\n\t\t\tMigrate int\n\t\t\tMirror  int\n\t\t\tClone   int\n\t\t\tPull    int\n\t\t\tGC      int `ini:\"GC\"`\n\t\t} `ini:\"git.timeout\"`\n\t}{\n\t\tDisableDiffHighlight:     false,\n\t\tMaxGitDiffLines:          1000,\n\t\tMaxGitDiffLineCharacters: 5000,\n\t\tMaxGitDiffFiles:          100,\n\t\tGCArgs:                   []string{},\n\t\tTimeout: struct {\n\t\t\tDefault int\n\t\t\tMigrate int\n\t\t\tMirror  int\n\t\t\tClone   int\n\t\t\tPull    int\n\t\t\tGC      int `ini:\"GC\"`\n\t\t}{\n\t\t\tDefault: int(git.DefaultCommandExecutionTimeout / time.Second),\n\t\t\tMigrate: 600,\n\t\t\tMirror:  300,\n\t\t\tClone:   300,\n\t\t\tPull:    300,\n\t\t\tGC:      60,\n\t\t},\n\t}\n)\n```\n\n```go\nvar (\n\t// Indexer settings\n\tIndexer = struct {\n\t\tIssueType                    string\n\t\tIssuePath                    string\n\t\tRepoIndexerEnabled           bool\n\t\tRepoPath                     string\n\t\tUpdateQueueLength            int\n\t\tMaxIndexerFileSize           int64\n\t\tIssueIndexerQueueType        string\n\t\tIssueIndexerQueueDir         string\n\t\tIssueIndexerQueueBatchNumber int\n\t}{\n\t\tIssueType:                    \"bleve\",\n\t\tIssuePath:                    \"indexers/issues.bleve\",\n\t\tIssueIndexerQueueType:        LevelQueueType,\n\t\tIssueIndexerQueueDir:         \"indexers/issues.queue\",\n\t\tIssueIndexerQueueBatchNumber: 20,\n\t}\n)\n```\n\n```go\nvar Service struct {\n\tDefaultOrgVisibility                    string\n\tDefaultOrgVisibilityMode                structs.VisibleType\n\tActiveCodeLives                         int\n\tResetPwdCodeLives                       int\n\tRegisterEmailConfirm                    bool\n\tEmailDomainWhitelist                    []string\n\tDisableRegistration                     bool\n\tAllowOnlyExternalRegistration           bool\n\tShowRegistrationButton                  bool\n\tRequireSignInView                       bool\n\tEnableNotifyMail                        bool\n\tEnableReverseProxyAuth                  bool\n\tEnableReverseProxyAutoRegister          bool\n\tEnableReverseProxyEmail                 bool\n\tEnableCaptcha                           bool\n\tCaptchaType                             string\n\tRecaptchaSecret                         string\n\tRecaptchaSitekey                        string\n\tDefaultKeepEmailPrivate                 bool\n\tDefaultAllowCreateOrganization          bool\n\tEnableTimetracking                      bool\n\tDefaultEnableTimetracking               bool\n\tDefaultEnableDependencies               bool\n\tDefaultAllowOnlyContributorsToTrackTime bool\n\tNoReplyAddress                          string\n\tEnableUserHeatmap                       bool\n\tAutoWatchNewRepos                       bool\n\n\t// OpenID settings\n\tEnableOpenIDSignIn bool\n\tEnableOpenIDSignUp bool\n\tOpenIDWhitelist    []*regexp.Regexp\n\tOpenIDBlacklist    []*regexp.Regexp\n}\n```\nService settings\n\n```go\nvar (\n\t// SessionConfig difines Session settings\n\tSessionConfig session.Options\n)\n```\n\n```go\nvar (\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\t\tQueueLength:    1000,\n\t\tDeliverTimeout: 5,\n\t\tSkipTLSVerify:  false,\n\t\tPagingNum:      10,\n\t}\n)\n```\n\n## Functions\n\n```go\nfunc CheckLFSVersion()\n```\nCheckLFSVersion will check lfs version, if not satisfied, then disable it.\n\n```go\nfunc DateLang(lang string) string\n```\nDateLang transforms standard language locale name to corresponding value in datetime plugin.\n\n```go\nfunc IsRunUserMatchCurrentUser(runUser string) (string, bool)\n```\nIsRunUserMatchCurrentUser returns false if configured run user does not match actual user that runs the app. The first return value is the actual user name. This check is ignored under Windows since SSH remote login is not the main method to login on Windows.\n\n```go\nfunc NewContext()\n```\nNewContext initializes configuration context. NOTE: do not print any log except error.\n\n```go\nfunc NewServices()\n```\nNewServices initializes the services\n\n```go\nfunc NewXORMLogService(disableConsole bool)\n```\nNewXORMLogService initializes xorm logger service\n\n## Types\n\n```go\ntype Cache struct {\n\tAdapter  string\n\tInterval int\n\tConn     string\n\tTTL      time.Duration\n}\n```\nCache represents cache settings\n\n```go\nvar (\n\t// CacheService the global cache\n\tCacheService *Cache\n)\n```\n\n```go\ntype LandingPage string\n```\nLandingPage describes the default page\n\n```go\nconst (\n\tLandingPageHome          LandingPage = \"/\"\n\tLandingPageExplore       LandingPage = \"/explore\"\n\tLandingPageOrganizations LandingPage = \"/explore/organizations\"\n)\n```\nenumerates all the landing page types\n\n```go\ntype Mailer struct {\n\t// Mailer\n\tQueueLength     int\n\tName            string\n\tFrom            string\n\tFromName        string\n\tFromEmail       string\n\tSendAsPlainText bool\n\tMailerType      string\n\n\t// SMTP sender\n\tHost              string\n\tUser, Passwd      string\n\tDisableHelo       bool\n\tHeloHostname      string\n\tSkipVerify        bool\n\tUseCertificate    bool\n\tCertFile, KeyFile string\n\tIsTLSEnabled      bool\n\n\t// Sendmail sender\n\tSendmailPath string\n\tSendmailArgs []string\n}\n```\nMailer represents mail service.\n\n```go\nvar (\n\t// MailService the global mailer\n\tMailService *Mailer\n)\n```\n\n```go\ntype MarkupParser struct {\n\tEnabled        bool\n\tMarkupName     string\n\tCommand        string\n\tFileExtensions []string\n\tIsInputFile    bool\n}\n```\nMarkupParser defines the external parser configured in ini\n\n```go\ntype Scheme string\n```\nScheme describes protocol types\n\n```go\nconst (\n\tHTTP       Scheme = \"http\"\n\tHTTPS      Scheme = \"https\"\n\tFCGI       Scheme = \"fcgi\"\n\tUnixSocket Scheme = \"unix\"\n)\n```\nenumerates all the scheme types\n\n","path":"github.com/RedAFD/code-core/modules/setting","name":"setting","synopsis":"","isRedistributable":true}
