Documentation ¶
Index ¶
- func AuthenticationRequired(handler func(http.ResponseWriter, *http.Request, httprouter.Params)) func(http.ResponseWriter, *http.Request, httprouter.Params)
- func CloseDB()
- func CommitToCache(items ItemsWithFolders) error
- func CommitToDB(uuid, guid, title, link, author, feedtitle, feedlink, folder, content string, ...) error
- func FeedsHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func FolderReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func FoldersHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func GetFullTextReadability(url string) (string, error)
- func IndexHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
- func InitDB()
- func IsExistingID(guid string) bool
- func ItemReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
- func MarkAsReadInDBByFolder(folder string) error
- func MarkAsReadInDBByID(uuid string) error
- func MigrateDB()
- func ScanRowToItem(rows *sql.Rows) (i dbFeedItem, err error)
- func StartHTTPD()
- type FeedWithFolder
- type FeedsWithFolders
- type FlatURLs
- type InputURLs
- type ItemWithFolder
- type ItemsCache
- type ItemsWithFolders
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthenticationRequired ¶
func AuthenticationRequired(handler func(http.ResponseWriter, *http.Request, httprouter.Params)) func(http.ResponseWriter, *http.Request, httprouter.Params)
func CommitToCache ¶
func CommitToCache(items ItemsWithFolders) error
CommitToCache saves item data to db
func CommitToDB ¶
func CommitToDB(uuid, guid, title, link, author, feedtitle, feedlink, folder, content string, time time.Time) error
CommitToDB stores entry in the db
func FeedsHandler ¶
func FeedsHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func FolderReadHandler ¶
func FolderReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func FoldersHandler ¶
func FoldersHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func GetFullTextReadability ¶
GetFullTextReadability fetches full article description for url
func IndexHandler ¶
func IndexHandler(w http.ResponseWriter, r *http.Request, _ httprouter.Params)
func ItemReadHandler ¶
func ItemReadHandler(w http.ResponseWriter, r *http.Request, ps httprouter.Params)
func MarkAsReadInDBByFolder ¶
func MarkAsReadInDBByID ¶
MarkAsReadInDB sets read field to true on the given id
func ScanRowToItem ¶
ScanRowToItem scans a single row into a struct
Types ¶
type FeedWithFolder ¶
FeedWithFolder represents folder name and feed item combined
type FeedsWithFolders ¶
type FeedsWithFolders []FeedWithFolder
FeedsWithFolders represents collection of FeedWithFolder
type ItemWithFolder ¶
ItemsWithFolders represents rss item (post), folder and original feed title cobined
func FetchFullContent ¶
func FetchFullContent(entry ItemWithFolder) ItemWithFolder
FetchFullContent fetches the full content for a entry that only publishes partial content in it's feed
type ItemsWithFolders ¶
type ItemsWithFolders []ItemWithFolder
ItemsWithFolders represents collection of ItemWithFolder
func AppendNewItemsViaIMAP ¶
func AppendNewItemsViaIMAP(items ItemsWithFolders) (ItemsWithFolders, error)
AppendNewItemsViaIMAP puts items in to corresponding imap folders
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