feed

package
v0.0.0-...-b533b9f Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2018 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package feed is a Atom/RSS news feed fetcher.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feed

type Feed interface {
	io.Closer

	GetSources() (Sources, error)
	PutSources(Sources) error
}

Feed is a RSS/ATOM feeds scraper for a list of Source (Sources). It shall provide a scheduler to automatically refresh data.

func NewFeed

func NewFeed(store store.Store) (Feed, error)

NewFeed returns a Feed able to fetch data with HTTP requests, and uses the provided store to save its data.

type Source

type Source struct {
	Name       string
	Link       string
	Categories []string
}

Source represents one RSS/ATOM feed.

type Sources

type Sources []Source

Sources holds multiple Source, and might be used for easy (un)marshalling

func (Sources) MarshalBinary

func (s Sources) MarshalBinary() (data []byte, err error)

MarshalBinary is used to store Sources

func (*Sources) UnmarshalBinary

func (s *Sources) UnmarshalBinary(data []byte) error

UnmarshalBinary is used to retrieve Sources from store

Jump to

Keyboard shortcuts

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