feed

package
v0.0.0-...-3b39f08 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FormatRDF     = "rdf"
	FormatRSS     = "rss"
	FormatAtom    = "atom"
	FormatJSON    = "json"
	FormatUnknown = "unknown"
)

List of feed formats.

Variables

This section is empty.

Functions

func DetectFeedFormat

func DetectFeedFormat(r io.Reader) string

DetectFeedFormat detect feed format from input data.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler contains all the logic to create and refresh feeds.

func NewFeedHandler

func NewFeedHandler(store *storage.Storage, translator *locale.Translator) *Handler

NewFeedHandler returns a feed handler.

func (*Handler) CreateFeed

func (h *Handler) CreateFeed(userID, categoryID int64, url string, crawler bool) (*model.Feed, error)

CreateFeed fetch, parse and store a new feed.

func (*Handler) RefreshFeed

func (h *Handler) RefreshFeed(userID, feedID int64) error

RefreshFeed fetch and update a feed if necessary.

Jump to

Keyboard shortcuts

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