config

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveState

func SaveState(filename string, state State)

Types

type Config

type Config struct {
	Feeds []Feed `yaml:"feeds"`
}

func LoadConfig

func LoadConfig(filename string) (Config, error)

type Feed

type Feed struct {
	Name      string `yaml:"name"`
	URL       string `yaml:"url"`
	Enabled   bool   `yaml:"enabled"`
	OutputDir string `yaml:"output"`
	Template  string `yaml:"template"`
	Rules     []Rule `yaml:"rules"`
	Exclude   []Rule `yaml:"exclude"`
}

type FeedState

type FeedState struct {
	FetchedAt time.Time `json:"timestamp"`
}

type Rule

type Rule struct {
	Type  string `yaml:"type"`
	Value string `yaml:"value"`
}

type State

type State struct {
	FeedState map[string]FeedState `json:"feeds"`
}

func LoadState

func LoadState(filename string) (State, error)

Jump to

Keyboard shortcuts

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