Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultFeedOptions = Options{ Body: "default", MinFreq: 1, InclImages: true, EmbedImages: false, IgnHash: false, AlwaysNew: false, Disable: false, NoTLS: false, }
Default feed options
View Source
var DefaultGlobalOptions = GlobalOptions{ Timeout: 30, MaxFailures: 10, DefaultEmail: username() + "@" + Hostname(), Target: "", Parts: []string{"text", "html"}, }
Default global options
Functions ¶
Types ¶
type Config ¶
type Config struct { GlobalOptions `yaml:",inline"` FeedOptions Options `yaml:"options"` Feeds Feeds `yaml:"-"` }
Config holds the global configuration options and the configured feeds
func WithDefault ¶
func WithDefault() *Config
WithDefault returns a configuration initialized with default values.
type GlobalOptions ¶
type GlobalOptions struct { Timeout int `yaml:"timeout"` DefaultEmail string `yaml:"default-email"` Target string `yaml:"target"` Parts []string `yaml:"parts"` MaxFailures int `yaml:"max-failures"` }
Global options, not feed specific
func (GlobalOptions) WithPartHtml ¶
func (opt GlobalOptions) WithPartHtml() bool
Marks whether 'html' part should be included in mails
func (GlobalOptions) WithPartText ¶
func (opt GlobalOptions) WithPartText() bool
Marks whether 'text' part should be included in mails
type Map ¶
type Map map[string]interface{}
Convenience type for the non-mapped configuration options Mostly used for legacy options
type Options ¶
type Options struct { MinFreq int `yaml:"min-frequency"` InclImages bool `yaml:"include-images"` EmbedImages bool `yaml:"embed-images"` Disable bool `yaml:"disable"` IgnHash bool `yaml:"ignore-hash"` AlwaysNew bool `yaml:"always-new"` Reupload bool `yaml:"reupload-if-updated"` NoTLS bool `yaml:"tls-no-verify"` Body Body `yaml:"body"` }
Per feed options NB: Always specify a yaml name, as it is later used in processing
Click to show internal directories.
Click to hide internal directories.