config

package
v2.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backends

type Backends struct {
	Miniflux *MinifluxBackend `yaml:"miniflux,omitempty"`
	FreshRSS *FreshRSSBackend `yaml:"freshrss,omitempty"`
}

type Config

type Config struct {
	ConfigDir string `yaml:"-"`
	Pager     string `yaml:"pager,omitempty"`
	Feeds     []Feed `yaml:"feeds"`
	// Preview feeds are distinguished from Feeds because we don't want to inadvertenly write those into the config file.
	PreviewFeeds   []Feed    `yaml:"previewfeeds,omitempty"`
	Backends       *Backends `yaml:"backends,omitempty"`
	ShowRead       bool      `yaml:"showread,omitempty"`
	AutoRead       bool      `yaml:"autoread,omitempty"`
	ShowFavourites bool
	Openers        []Opener `yaml:"openers,omitempty"`
	// contains filtered or unexported fields
}

need to add to Load() below if loading from config file

func New

func New(configPath string, pager string, previewFeeds []string) (Config, error)

func (*Config) AddFeed

func (c *Config) AddFeed(feed Feed) error

func (*Config) GetFeeds

func (c *Config) GetFeeds() []Feed

func (*Config) IsPreviewMode

func (c *Config) IsPreviewMode() bool

func (*Config) Load

func (c *Config) Load() error

func (*Config) ToggleShowFavourites added in v2.1.5

func (c *Config) ToggleShowFavourites()

func (*Config) ToggleShowRead

func (c *Config) ToggleShowRead()

func (*Config) Write

func (c *Config) Write() error

Write writes to a config file

type Feed

type Feed struct {
	URL  string `yaml:"url"`
	Name string `yaml:"name,omitempty"`
}

type FreshRSSBackend

type FreshRSSBackend struct {
	Host     string `yaml:"host"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
}

type FreshRSSFeed

type FreshRSSFeed struct {
	URL string `yaml:"url,omitempty"`
}

type FreshRSSResponse

type FreshRSSResponse struct {
	Subscriptions []FreshRSSFeed `yaml:"subscriptions,omitempty"`
}

type MinifluxBackend

type MinifluxBackend struct {
	Host   string `yaml:"host"`
	APIKey string `yaml:"api_key"`
}

type Opener added in v2.1.6

type Opener struct {
	Regex string `yaml:"regex"`
	Cmd   string `yaml:"cmd"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL