reader

package module
v0.0.0-...-85aba21 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2018 License: BSD-3-Clause Imports: 15 Imported by: 0

README

go-feed-reader

There are many syndication feed readers. This one is mine.

Important

Too soon. Move along.

Install

You will need to have both Go (specifically a version of Go more recent than 1.6 so let's just assume you need Go 1.8 or higher) and the make programs installed on your computer. Assuming you do just type:

make bin

All of this package's dependencies are bundled with the code in the vendor directory.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DatabaseRowToFeed

func DatabaseRowToFeed(row *sql.Row) (*gofeed.Feed, error)

func DatabaseRowToFeedItem

func DatabaseRowToFeedItem(row *sql.Row) (*gofeed.Item, error)

func DatabaseRowsToFeedItems

func DatabaseRowsToFeedItems(rows *sql.Rows) ([]*gofeed.Item, error)

func DatabaseRowsToFeeds

func DatabaseRowsToFeeds(rows *sql.Rows) ([]*gofeed.Feed, error)

func NewFRConfig

func NewFRConfig(ck_cfg login.CookieConfig, url_cfg login.URLConfig) (login.Config, error)

func NewFRCookieConfig

func NewFRCookieConfig() (login.CookieConfig, error)

Types

type FRConfig

type FRConfig struct {
	login.Config
	// contains filtered or unexported fields
}

func (*FRConfig) Cookie

func (c *FRConfig) Cookie() login.CookieConfig

func (*FRConfig) URL

func (c *FRConfig) URL() login.URLConfig

type FRCookieConfig

type FRCookieConfig struct {
	login.CookieConfig
	// contains filtered or unexported fields
}

func (*FRCookieConfig) Name

func (c *FRCookieConfig) Name() string

func (*FRCookieConfig) Salt

func (c *FRCookieConfig) Salt() string

func (*FRCookieConfig) Secret

func (c *FRCookieConfig) Secret() string

type FeedReader

type FeedReader struct {
	login.Provider // which implements user.UserDB
	// contains filtered or unexported fields
}

func NewFeedReader

func NewFeedReader(dsn string) (*FeedReader, error)

func (*FeedReader) AddFeedForUser

func (fr *FeedReader) AddFeedForUser(u user.User, feed_url string) (*gofeed.Feed, error)

func (*FeedReader) AddUser

func (fr *FeedReader) AddUser(u user.User) error

func (*FeedReader) Config

func (fr *FeedReader) Config() login.Config

func (*FeedReader) DumpFeedsForUser

func (fr *FeedReader) DumpFeedsForUser(u user.User, wr io.Writer) error

func (*FeedReader) GetFeedByItemGUIDForUser

func (fr *FeedReader) GetFeedByItemGUIDForUser(u user.User, guid string) (*gofeed.Feed, error)

func (*FeedReader) GetFeedByLinkForUser

func (fr *FeedReader) GetFeedByLinkForUser(u user.User, link string) (*gofeed.Feed, error)

func (*FeedReader) GetItemByGUIDForUser

func (fr *FeedReader) GetItemByGUIDForUser(u user.User, guid string) (*gofeed.Item, error)

func (*FeedReader) GetUserByEmail

func (fr *FeedReader) GetUserByEmail(email string) (user.User, error)

func (*FeedReader) GetUserById

func (fr *FeedReader) GetUserById(id string) (user.User, error)

func (*FeedReader) GetUserByUsername

func (fr *FeedReader) GetUserByUsername(name string) (user.User, error)

func (*FeedReader) IndexFeed

func (fr *FeedReader) IndexFeed(feed *gofeed.Feed) error

func (*FeedReader) IndexFeedForUser

func (fr *FeedReader) IndexFeedForUser(u user.User, feed *gofeed.Feed) error

func (*FeedReader) ListFeedsAll

func (fr *FeedReader) ListFeedsAll(feed_cb func(f *gofeed.Feed) error) error

func (*FeedReader) ListFeedsAllForUser

func (fr *FeedReader) ListFeedsAllForUser(u user.User, feed_cb func(f *gofeed.Feed) error) error

func (*FeedReader) ListFeedsForUser

func (fr *FeedReader) ListFeedsForUser(u user.User, pg_opts pagination.PaginatedOptions) (*FeedsResponse, error)

func (*FeedReader) ListItemsForUser

func (fr *FeedReader) ListItemsForUser(u user.User, ls_opts *ListItemsOptions, pg_opts pagination.PaginatedOptions) (*ItemsResponse, error)

func (*FeedReader) ParseFeedURL

func (fr *FeedReader) ParseFeedURL(feed_url string) (*gofeed.Feed, error)

func (*FeedReader) PruneFeed

func (fr *FeedReader) PruneFeed(f *gofeed.Feed) error

func (*FeedReader) RefreshFeed

func (fr *FeedReader) RefreshFeed(feed *gofeed.Feed) error

func (*FeedReader) RefreshFeedForUsers

func (fr *FeedReader) RefreshFeedForUsers(f *gofeed.Feed) error

func (*FeedReader) RefreshFeeds

func (fr *FeedReader) RefreshFeeds() error

func (*FeedReader) RemoveFeedForUser

func (fr *FeedReader) RemoveFeedForUser(u user.User, f *gofeed.Feed) error

func (*FeedReader) SearchForUser

func (fr *FeedReader) SearchForUser(u user.User, q string, opts pagination.PaginatedOptions) (*ItemsResponse, error)

type FeedsResponse

type FeedsResponse struct {
	Feeds      []*gofeed.Feed
	Pagination pagination.Pagination
}

type ItemsResponse

type ItemsResponse struct {
	Items      []*gofeed.Item
	Pagination pagination.Pagination
}

type ListItemsOptions

type ListItemsOptions struct {
	FeedURL  string
	IsRead   bool
	IsUnread bool
}

func NewDefaultListItemsOptions

func NewDefaultListItemsOptions() *ListItemsOptions

Directories

Path Synopsis
assets

Jump to

Keyboard shortcuts

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