rss

package module
v0.0.0-...-a728eaf Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2013 License: GPL-2.0 Imports: 13 Imported by: 2

README

RSS - an efficient RSS reader for Go

RSS is a library for parsing RSS feeds for the Go language. It's focus is on speed and efficiency, and is not built for robustness. For example, this library does not validate, or even use, XML in any way. Feel free to give it a shot, although it's currently under active development.

Build Status

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Id          int64
	FeedId      int64
	Title       string
	Link        string
	Subtitle    string
	Guid        string
	UpdatedDate time.Time
	Summary     string
	Encoded     string
	Content     string
	Source      string
	Comments    string
	Thumbnail   string
	Length      string
	Type        string
	Url         string
}

func (*Entry) String

func (e *Entry) String() string

type EntryList

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

type Feed

type Feed struct {
	Id          int64
	Url         string
	Feed        string
	Title       string
	Link        string
	Subtitle    string
	Copyright   string
	Author      string
	PublishDate time.Time
	Category    string
	Generator   string
	Icon        string
}

type FeedStub

type FeedStub struct {
	Id    int64
	Title string
}

type RssDatabase

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

func NewRssDatabase

func NewRssDatabase(database, username, password string) *RssDatabase

func (*RssDatabase) AddSubscription

func (rss *RssDatabase) AddSubscription(userId, feedId int64, isRead bool) error

func (*RssDatabase) GetFeedIdByUrl

func (rss *RssDatabase) GetFeedIdByUrl(feedUrl string) (id int64, err error)

type RssEngine

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

func NewRssEngine

func NewRssEngine(database, username, password string) *RssEngine

func (*RssEngine) AddFeedForUser

func (rss *RssEngine) AddFeedForUser(userId int64, feedUrl string) (feed *Feed, entries []*Entry, err error)

func (*RssEngine) AddSubscription

func (rss *RssEngine) AddSubscription(userId, feedId int64) (err error)

Currently this just adds subscription to feed, not to entries. Need to fix

func (*RssEngine) GetEntriesForFeed

func (rss *RssEngine) GetEntriesForFeed(feedId int64) (entries []*Entry, err error)

GetEntriesForFeed gets all entries for a feed.

func (*RssEngine) GetFeedStubsForUser

func (rss *RssEngine) GetFeedStubsForUser(userId int64) (feeds []*FeedStub, err error)

func (*RssEngine) GetFeedsForUser

func (rss *RssEngine) GetFeedsForUser(userId int64) (feeds []*Feed, err error)

type RssParser

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

func NewParser

func NewParser(name, input string) *RssParser

func (*RssParser) Parse

func (r *RssParser) Parse() (feed *Feed, entries []*Entry, err error)

type Scanner

type Scanner interface {
	Scan(dest ...interface{}) error
}

Jump to

Keyboard shortcuts

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