Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeZone ¶ added in v0.14.0
GetTimeZone returns the time zone configured for vikunja It is a separate function and not done through viper because that makes handling it way easier, especially when testing.
func InitDefaultConfig ¶
func InitDefaultConfig()
InitDefaultConfig sets default config values This is an extra function so we can call it when initializing tests without initializing the full config
Types ¶
type Key ¶
type Key string
Key is used as a config key
const ( // #nosec ServiceJWTSecret Key = `service.JWTSecret` ServiceInterface Key = `service.interface` ServiceFrontendurl Key = `service.frontendurl` ServiceEnableCaldav Key = `service.enablecaldav` ServiceRootpath Key = `service.rootpath` ServiceMaxItemsPerPage Key = `service.maxitemsperpage` ServiceEnableMetrics Key = `service.enablemetrics` ServiceMotd Key = `service.motd` ServiceEnableLinkSharing Key = `service.enablelinksharing` ServiceEnableRegistration Key = `service.enableregistration` ServiceEnableTaskAttachments Key = `service.enabletaskattachments` ServiceTimeZone Key = `service.timezone` ServiceEnableTaskComments Key = `service.enabletaskcomments` ServiceEnableTotp Key = `service.enabletotp` ServiceSentryDsn Key = `service.sentrydsn` ServiceTestingtoken Key = `service.testingtoken` ServiceEnableEmailReminders Key = `service.enableemailreminders` AuthLocalEnabled Key = `auth.local.enabled` AuthOpenIDEnabled Key = `auth.openid.enabled` AuthOpenIDRedirectURL Key = `auth.openid.redirecturl` AuthOpenIDProviders Key = `auth.openid.providers` LegalImprintURL Key = `legal.imprinturl` LegalPrivacyURL Key = `legal.privacyurl` DatabaseType Key = `database.type` DatabaseHost Key = `database.host` DatabaseUser Key = `database.user` DatabasePassword Key = `database.password` DatabaseDatabase Key = `database.database` DatabasePath Key = `database.path` DatabaseMaxOpenConnections Key = `database.maxopenconnections` DatabaseMaxIdleConnections Key = `database.maxidleconnections` DatabaseMaxConnectionLifetime Key = `database.maxconnectionlifetime` DatabaseSslMode Key = `database.sslmode` CacheEnabled Key = `cache.enabled` CacheType Key = `cache.type` CacheMaxElementSize Key = `cache.maxelementsize` MailerEnabled Key = `mailer.enabled` MailerHost Key = `mailer.host` MailerPort Key = `mailer.port` MailerUsername Key = `mailer.username` MailerPassword Key = `mailer.password` MailerSkipTLSVerify Key = `mailer.skiptlsverify` MailerFromEmail Key = `mailer.fromemail` MailerQueuelength Key = `mailer.queuelength` MailerQueueTimeout Key = `mailer.queuetimeout` MailerForceSSL Key = `mailer.forcessl` RedisEnabled Key = `redis.enabled` RedisHost Key = `redis.host` RedisPassword Key = `redis.password` RedisDB Key = `redis.db` LogEnabled Key = `log.enabled` LogStandard Key = `log.standard` LogLevel Key = `log.level` LogDatabase Key = `log.database` LogDatabaseLevel Key = `log.databaselevel` LogHTTP Key = `log.http` LogEcho Key = `log.echo` LogPath Key = `log.path` RateLimitEnabled Key = `ratelimit.enabled` RateLimitKind Key = `ratelimit.kind` RateLimitPeriod Key = `ratelimit.period` RateLimitLimit Key = `ratelimit.limit` RateLimitStore Key = `ratelimit.store` FilesBasePath Key = `files.basepath` FilesMaxSize Key = `files.maxsize` MigrationWunderlistEnable Key = `migration.wunderlist.enable` MigrationWunderlistClientID Key = `migration.wunderlist.clientid` MigrationWunderlistClientSecret Key = `migration.wunderlist.clientsecret` MigrationWunderlistRedirectURL Key = `migration.wunderlist.redirecturl` MigrationTodoistEnable Key = `migration.todoist.enable` MigrationTodoistClientID Key = `migration.todoist.clientid` MigrationTodoistClientSecret Key = `migration.todoist.clientsecret` MigrationTodoistRedirectURL Key = `migration.todoist.redirecturl` MigrationTrelloEnable Key = `migration.trello.enable` MigrationTrelloKey Key = `migration.trello.key` MigrationTrelloRedirectURL Key = `migration.trello.redirecturl` MigrationMicrosoftTodoEnable Key = `migration.microsofttodo.enable` MigrationMicrosoftTodoClientID Key = `migration.microsofttodo.clientid` MigrationMicrosoftTodoClientSecret Key = `migration.microsofttodo.clientsecret` MigrationMicrosoftTodoRedirectURL Key = `migration.microsofttodo.redirecturl` CorsEnable Key = `cors.enable` CorsOrigins Key = `cors.origins` CorsMaxAge Key = `cors.maxage` AvatarGravaterExpiration Key = `avatar.gravatarexpiration` BackgroundsEnabled Key = `backgrounds.enabled` BackgroundsUploadEnabled Key = `backgrounds.providers.upload.enabled` BackgroundsUnsplashEnabled Key = `backgrounds.providers.unsplash.enabled` BackgroundsUnsplashAccessToken Key = `backgrounds.providers.unsplash.accesstoken` BackgroundsUnsplashApplicationID Key = `backgrounds.providers.unsplash.applicationid` KeyvalueType Key = `keyvalue.type` )
These constants hold all config value keys
func (Key) Get ¶ added in v0.16.0
func (k Key) Get() interface{}
Get returns the raw value from a config option
func (Key) GetDuration ¶
GetDuration returns a duration config value
func (Key) GetStringSlice ¶
GetStringSlice returns a string slice from a config option
Click to show internal directories.
Click to hide internal directories.