package config
import "miniflux.app/config"
Index ¶
- type Option
- type Options
- func NewOptions() *Options
- func (o *Options) AdminPassword() string
- func (o *Options) AdminUsername() string
- func (o *Options) AuthProxyHeader() string
- func (o *Options) BasePath() string
- func (o *Options) BaseURL() string
- func (o *Options) BatchSize() int
- func (o *Options) CertDomain() string
- func (o *Options) CertFile() string
- func (o *Options) CertKeyFile() string
- func (o *Options) CleanupArchiveBatchSize() int
- func (o *Options) CleanupArchiveReadDays() int
- func (o *Options) CleanupArchiveUnreadDays() int
- func (o *Options) CleanupFrequencyHours() int
- func (o *Options) CleanupRemoveSessionsDays() int
- func (o *Options) CreateAdmin() bool
- func (o *Options) DatabaseConnectionLifetime() time.Duration
- func (o *Options) DatabaseMaxConns() int
- func (o *Options) DatabaseMinConns() int
- func (o *Options) DatabaseURL() string
- func (o *Options) FetchYouTubeWatchTime() bool
- func (o *Options) HTTPClientMaxBodySize() int64
- func (o *Options) HTTPClientProxy() string
- func (o *Options) HTTPClientTimeout() int
- func (o *Options) HTTPClientUserAgent() string
- func (o *Options) HTTPServerTimeout() int
- func (o *Options) HasDebugMode() bool
- func (o *Options) HasHSTS() bool
- func (o *Options) HasHTTPClientProxyConfigured() bool
- func (o *Options) HasHTTPService() bool
- func (o *Options) HasMaintenanceMode() bool
- func (o *Options) HasMetricsCollector() bool
- func (o *Options) HasSchedulerService() bool
- func (o *Options) HasServerTimingHeader() bool
- func (o *Options) HasWatchdog() bool
- func (o *Options) InvidiousInstance() string
- func (o *Options) IsAuthProxyUserCreationAllowed() bool
- func (o *Options) IsDefaultDatabaseURL() bool
- func (o *Options) IsOAuth2UserCreationAllowed() bool
- func (o *Options) ListenAddr() string
- func (o *Options) LogDateTime() bool
- func (o *Options) MaintenanceMessage() string
- func (o *Options) MetricsAllowedNetworks() []string
- func (o *Options) MetricsPassword() string
- func (o *Options) MetricsRefreshInterval() int
- func (o *Options) MetricsUsername() string
- func (o *Options) OAuth2ClientID() string
- func (o *Options) OAuth2ClientSecret() string
- func (o *Options) OAuth2OidcDiscoveryEndpoint() string
- func (o *Options) OAuth2Provider() string
- func (o *Options) OAuth2RedirectURL() string
- func (o *Options) PocketConsumerKey(defaultValue string) string
- func (o *Options) PollingFrequency() int
- func (o *Options) PollingParsingErrorLimit() int
- func (o *Options) PollingScheduler() string
- func (o *Options) ProxyHTTPClientTimeout() int
- func (o *Options) ProxyMediaTypes() []string
- func (o *Options) ProxyOption() string
- func (o *Options) ProxyPrivateKey() []byte
- func (o *Options) ProxyUrl() string
- func (o *Options) RootURL() string
- func (o *Options) RunMigrations() bool
- func (o *Options) SchedulerEntryFrequencyMaxInterval() int
- func (o *Options) SchedulerEntryFrequencyMinInterval() int
- func (o *Options) SortedOptions(redactSecret bool) []*Option
- func (o *Options) String() string
- func (o *Options) WorkerPoolSize() int
- func (o *Options) YouTubeEmbedUrlOverride() string
- type Parser
Types ¶
type Option ¶
type Option struct { Key string Value interface{} }
Option contains a key to value map of a single option. It may be used to output debug strings.
type Options ¶
type Options struct { HTTPS bool // contains filtered or unexported fields }
Options contains configuration options.
var Opts *Options
Opts holds parsed configuration options.
func NewOptions ¶
func NewOptions() *Options
NewOptions returns Options with default values.
func (*Options) AdminPassword ¶
AdminPassword returns the admin password if defined.
func (*Options) AdminUsername ¶
AdminUsername returns the admin username if defined.
func (*Options) AuthProxyHeader ¶
AuthProxyHeader returns an HTTP header name that contains username for authentication using auth proxy.
func (*Options) BasePath ¶
BasePath returns the application base path according to the base URL.
func (*Options) BaseURL ¶
BaseURL returns the application base URL with path.
func (*Options) BatchSize ¶
BatchSize returns the number of feeds to send for background processing.
func (*Options) CertDomain ¶
CertDomain returns the domain to use for Let's Encrypt certificate.
func (*Options) CertFile ¶
CertFile returns the SSL certificate filename if any.
func (*Options) CertKeyFile ¶
CertKeyFile returns the private key filename for custom SSL certificate.
func (*Options) CleanupArchiveBatchSize ¶
CleanupArchiveBatchSize returns the number of entries to archive for each interval.
func (*Options) CleanupArchiveReadDays ¶
CleanupArchiveReadDays returns the number of days after which marking read items as removed.
func (*Options) CleanupArchiveUnreadDays ¶
CleanupArchiveUnreadDays returns the number of days after which marking unread items as removed.
func (*Options) CleanupFrequencyHours ¶
CleanupFrequencyHours returns the interval in hours for cleanup jobs.
func (*Options) CleanupRemoveSessionsDays ¶
CleanupRemoveSessionsDays returns the number of days after which to remove sessions.
func (*Options) CreateAdmin ¶
CreateAdmin returns true if the environment variable CREATE_ADMIN is not empty.
func (*Options) DatabaseConnectionLifetime ¶
DatabaseConnectionLifetime returns the maximum amount of time a connection may be reused.
func (*Options) DatabaseMaxConns ¶
DatabaseMaxConns returns the maximum number of database connections.
func (*Options) DatabaseMinConns ¶
DatabaseMinConns returns the minimum number of database connections.
func (*Options) DatabaseURL ¶
DatabaseURL returns the database URL.
func (*Options) FetchYouTubeWatchTime ¶
FetchYouTubeWatchTime returns true if the YouTube video duration should be fetched and used as a reading time.
func (*Options) HTTPClientMaxBodySize ¶
HTTPClientMaxBodySize returns the number of bytes allowed for the HTTP client to transfer.
func (*Options) HTTPClientProxy ¶
HTTPClientProxy returns the proxy URL for HTTP client.
func (*Options) HTTPClientTimeout ¶
HTTPClientTimeout returns the time limit in seconds before the HTTP client cancel the request.
func (*Options) HTTPClientUserAgent ¶
HTTPClientUserAgent returns the global User-Agent header for miniflux.
func (*Options) HTTPServerTimeout ¶
HTTPServerTimeout returns the time limit in seconds before the HTTP server cancel the request.
func (*Options) HasDebugMode ¶
HasDebugMode returns true if debug mode is enabled.
func (*Options) HasHSTS ¶
HasHSTS returns true if HTTP Strict Transport Security is enabled.
func (*Options) HasHTTPClientProxyConfigured ¶
HasHTTPClientProxyConfigured returns true if the HTTP proxy is configured.
func (*Options) HasHTTPService ¶
HasHTTPService returns true if the HTTP service is enabled.
func (*Options) HasMaintenanceMode ¶
HasMaintenanceMode returns true if maintenance mode is enabled.
func (*Options) HasMetricsCollector ¶
HasMetricsCollector returns true if metrics collection is enabled.
func (*Options) HasSchedulerService ¶
HasSchedulerService returns true if the scheduler service is enabled.
func (*Options) HasServerTimingHeader ¶
HasServerTimingHeader returns true if server-timing headers enabled.
func (*Options) HasWatchdog ¶
HasWatchdog returns true if the systemd watchdog is enabled.
func (*Options) InvidiousInstance ¶
InvidiousInstance returns the invidious instance used by miniflux
func (*Options) IsAuthProxyUserCreationAllowed ¶
IsAuthProxyUserCreationAllowed returns true if user creation is allowed for users authenticated using auth proxy.
func (*Options) IsDefaultDatabaseURL ¶
IsDefaultDatabaseURL returns true if the default database URL is used.
func (*Options) IsOAuth2UserCreationAllowed ¶
IsOAuth2UserCreationAllowed returns true if user creation is allowed for OAuth2 users.
func (*Options) ListenAddr ¶
ListenAddr returns the listen address for the HTTP server.
func (*Options) LogDateTime ¶
LogDateTime returns true if the date/time should be displayed in log messages.
func (*Options) MaintenanceMessage ¶
MaintenanceMessage returns maintenance message.
func (*Options) MetricsAllowedNetworks ¶
MetricsAllowedNetworks returns the list of networks allowed to connect to the metrics endpoint.
func (*Options) MetricsPassword ¶
func (*Options) MetricsRefreshInterval ¶
MetricsRefreshInterval returns the refresh interval in seconds.
func (*Options) MetricsUsername ¶
func (*Options) OAuth2ClientID ¶
OAuth2ClientID returns the OAuth2 Client ID.
func (*Options) OAuth2ClientSecret ¶
OAuth2ClientSecret returns the OAuth2 client secret.
func (*Options) OAuth2OidcDiscoveryEndpoint ¶
OAuth2OidcDiscoveryEndpoint returns the OAuth2 OIDC discovery endpoint.
func (*Options) OAuth2Provider ¶
OAuth2Provider returns the name of the OAuth2 provider configured.
func (*Options) OAuth2RedirectURL ¶
OAuth2RedirectURL returns the OAuth2 redirect URL.
func (*Options) PocketConsumerKey ¶
PocketConsumerKey returns the Pocket Consumer Key if configured.
func (*Options) PollingFrequency ¶
PollingFrequency returns the interval to refresh feeds in the background.
func (*Options) PollingParsingErrorLimit ¶
PollingParsingErrorLimit returns the limit of errors when to stop polling.
func (*Options) PollingScheduler ¶
PollingScheduler returns the scheduler used for polling feeds.
func (*Options) ProxyHTTPClientTimeout ¶
ProxyHTTPClientTimeout returns the time limit in seconds before the proxy HTTP client cancel the request.
func (*Options) ProxyMediaTypes ¶
ProxyMediaTypes returns a slice of media types to proxy.
func (*Options) ProxyOption ¶
ProxyOption returns "none" to never proxy, "http-only" to proxy non-HTTPS, "all" to always proxy.
func (*Options) ProxyPrivateKey ¶
ProxyPrivateKey returns the private key used by the media proxy
func (*Options) ProxyUrl ¶
ProxyUrl returns a string of a URL to use to proxy image requests
func (*Options) RootURL ¶
RootURL returns the base URL without path.
func (*Options) RunMigrations ¶
RunMigrations returns true if the environment variable RUN_MIGRATIONS is not empty.
func (*Options) SchedulerEntryFrequencyMaxInterval ¶
SchedulerEntryFrequencyMaxInterval returns the maximum interval in minutes for the entry frequency scheduler.
func (*Options) SchedulerEntryFrequencyMinInterval ¶
SchedulerEntryFrequencyMinInterval returns the minimum interval in minutes for the entry frequency scheduler.
func (*Options) SortedOptions ¶
SortedOptions returns options as a list of key value pairs, sorted by keys.
func (*Options) String ¶
func (*Options) WorkerPoolSize ¶
WorkerPoolSize returns the number of background worker.
func (*Options) YouTubeEmbedUrlOverride ¶
YouTubeEmbedUrlOverride returns YouTube URL which will be used for embeds
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles configuration parsing.
func NewParser ¶
func NewParser() *Parser
NewParser returns a new Parser.
func (*Parser) ParseEnvironmentVariables ¶
ParseEnvironmentVariables loads configuration values from environment variables.
func (*Parser) ParseFile ¶
ParseFile loads configuration values from a local file.
Source Files ¶
config.go options.go parser.go
- Version
- v1.0.46 (latest)
- Published
- Jul 22, 2023
- Platform
- linux/amd64
- Imports
- 13 packages
- Last checked
- 2 weeks ago –
Tools for package owners.