{"modulePath":"github.com/developerspl/gogs","version":"v0.5.2","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\n\t// Server settings.\n\tProtocol           Scheme\n\tDomain             string\n\tHttpAddr, HttpPort string\n\tSshPort            int\n\tOfflineMode        bool\n\tDisableRouterLog   bool\n\tCertFile, KeyFile  string\n\tStaticRootPath     string\n\tEnableGzip         bool\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// Webhook settings.\n\tWebhookTaskInterval   int\n\tWebhookDeliverTimeout int\n\n\t// Repository settings.\n\tRepoRootPath string\n\tScriptType   string\n\n\t// Picture settings.\n\tPictureService  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\tSessionProvider string\n\tSessionConfig   *session.Config\n\n\t// Git settings.\n\tMaxGitDiffLines int\n\n\t// I18n settings.\n\tLangs, Names []string\n\n\t// Global setting objects.\n\tCfg          *goconfig.ConfigFile\n\tConfRootPath string\n\tCustomPath   string // Custom directory path.\n\tProdMode     bool\n\tRunUser      string\n\tIsWindows    bool\n)\n```\n\n```go\nvar (\n\tMailService  *Mailer\n\tOauthService *Oauther\n)\n```\n\n```go\nvar Service struct {\n\tRegisterEmailConfirm   bool\n\tDisableRegistration    bool\n\tRequireSignInView      bool\n\tEnableCacheAvatar      bool\n\tEnableNotifyMail       bool\n\tEnableReverseProxyAuth bool\n\tLdapAuth               bool\n\tActiveCodeLives        int\n\tResetPwdCodeLives      int\n}\n```\n\n## Functions\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 Mailer struct {\n\tName         string\n\tHost         string\n\tFrom         string\n\tUser, Passwd string\n}\n```\nMailer represents mail service.\n\n```go\ntype OauthInfo struct {\n\tClientId, ClientSecret string\n\tScopes                 string\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)\n```\n\n","path":"github.com/developerspl/gogs/modules/setting","name":"setting","synopsis":"","isRedistributable":true}
