config

package
v0.0.0-...-a1674a9 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Save

func Save(config *Config, filePath string) error

Types

type Config

type Config struct {
	Feeds    []*Feed
	Webhooks []*Webhook
}

func Read

func Read(configFile string) (*Config, error)

func ReadOrInit

func ReadOrInit(configFile string) (*Config, error)

func (*Config) AddFeed

func (c *Config) AddFeed(url url.URL, feedType string, interval time.Duration)

func (*Config) AddFilesystemHook

func (c *Config) AddFilesystemHook(feedId string, directory string)

func (*Config) AddStdoutHook

func (c *Config) AddStdoutHook(feedId string)

func (*Config) AddWebHook

func (c *Config) AddWebHook(feedId string, url string)

func (*Config) GetWebhooks

func (c *Config) GetWebhooks(feedId string) []*Webhook

func (*Config) HasFeed

func (c *Config) HasFeed(feedId string) bool

type Feed

type Feed struct {
	ID              string
	URL             string
	PollingInterval int64
	Type            string
}

type Webhook

type Webhook struct {
	ID     string
	FeedID string
	URL    string
	Type   string
}

Jump to

Keyboard shortcuts

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