feeds2imap

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2019 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendNewItemsViaIMAP

func AppendNewItemsViaIMAP(items ItemsWithFolders) error

AppendNewItemsViaIMAP puts items in to corresponding imap folders

func CloseDB

func CloseDB()

CloseDB will close sqlx db

func CommitToCache

func CommitToCache(items ItemsWithFolders) error

CommitToCache saves item data to db

func CommitToDB

func CommitToDB(item *dbFeedItem) error

CommitToDB stores entry in the db

func InitDB

func InitDB()

InitDB will init sqlx sqlite3 db

func IsExistingID

func IsExistingID(guid string) bool

IsExistingID tries to find matching id in db

func MigrateDB

func MigrateDB()

MigrateDB will create test db

Types

type FeedWithFolder

type FeedWithFolder struct {
	Feed   *gofeed.Feed
	Folder string
}

FeedWithFolder represents folder name and feed item combined

type FeedsWithFolders

type FeedsWithFolders []FeedWithFolder

FeedsWithFolders represents collection of FeedWithFolder

type FlatURLs

type FlatURLs map[string]string

FlatURLs represents url -> folder map

type InputURLs

type InputURLs map[string][]string

InputURLs represents freshly parsed configuration

type ItemWithFolder

type ItemWithFolder struct {
	Item      *gofeed.Item
	Folder    string
	FeedTitle string
	FeedLink  string
}

ItemWithFolder represents rss item (post), folder and original feed title cobined

type ItemsCache

type ItemsCache []string

ItemsCache represents GUIDs cache

type ItemsWithFolders

type ItemsWithFolders []ItemWithFolder

ItemsWithFolders represents collection of ItemWithFolder

func FetchNewFeedItems

func FetchNewFeedItems() ItemsWithFolders

FetchNewFeedItems loads configuration, fetches rss items and discards ones that are in cache already returning new items and new version of a cache

Jump to

Keyboard shortcuts

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