{"modulePath":"github.com/mapmeld/codemingler","version":"v0.6.9","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package setting\n\n## Variables\n\n```go\nvar (\n\t// App settings.\n\tAppVer    string\n\tAppName   string\n\tAppUrl    string\n\tAppSubUrl string\n\n\t// Server settings.\n\tProtocol           Scheme\n\tDomain             string\n\tHttpAddr, HttpPort string\n\tDisableSSH         bool\n\tSSHPort            int\n\tSSHDomain          string\n\tOfflineMode        bool\n\tDisableRouterLog   bool\n\tCertFile, KeyFile  string\n\tStaticRootPath     string\n\tEnableGzip         bool\n\tLandingPageUrl     LandingPage\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\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\tRepoRootPath string\n\tScriptType   string\n\tAnsiCharset  string\n\n\t// UI settings.\n\tExplorePagingNum int\n\tIssuePagingNum   int\n\n\t// Markdown sttings.\n\tMarkdown struct {\n\t\tEnableHardLineBreak bool\n\t}\n\n\t// Picture settings.\n\tPictureService   string\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\tEnableRedis    bool\n\tEnableMemcache bool\n\n\t// Session settings.\n\tSessionConfig session.Options\n\n\t// Git settings.\n\tGit struct {\n\t\tMaxGitDiffLines int\n\t\tGcArgs          []string `delim:\" \"`\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\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\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 (\n\tMailService  *Mailer\n\tOauthService *Oauther\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\tEnableCacheAvatar              bool\n\tEnableNotifyMail               bool\n\tEnableReverseProxyAuth         bool\n\tEnableReverseProxyAutoRegister bool\n\tDisableMinimumKeySizeCheck     bool\n}\n```\n\n## Functions\n\n```go\nfunc DateLang(lang string) string\n```\n\n```go\nfunc ExecPath() (string, error)\n```\n\n```go\nfunc NewConfigContext()\n```\nNewConfigContext 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\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\ntype OauthInfo struct {\n\toauth2.Options\n\tAuthUrl, TokenUrl string\n}\n```\n\n```go\ntype Oauther struct {\n\tGitHub, Google, Tencent,\n\tTwitter, Weibo bool\n\tOauthInfos map[string]*OauthInfo\n}\n```\nOauther represents oauth service.\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/mapmeld/codemingler/modules/setting","name":"setting","synopsis":"","isRedistributable":true}
