Discover Packages
github.com/bmoneill/sreader
feed
package
Version:
v0.0.0-...-bcf2fa8
Opens a new window with list of versions in this module.
Published: Nov 3, 2025
License: MIT
Opens a new window with license information.
Imports: 17
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Adds an entry to the database if it does not already exist.
Adds a feed to the database.
If the feed already exists, it adds any new entries.
If the feed does not exist, it inserts a new feed and its entries.
Initialize SQLite database connection and creates the necessary tables if they do not exist.
Update the last updated time for a feed
Sync feeds
This function asynchronously GETs feeds, using the last_updated field
in the database to only grab/update feeds that were updated since the last sync.
The new feed contents are then stored in the database.
type Entry struct {
ID int64 `json:"id"`
FeedID int64 `json:"feed_id"`
URL string `json:"url"`
Title string `json:"title"`
Description string `json:"description"`
Content string `json:"content"`
DatePublished string `json:"date_published"`
Read bool `json:"read"`
}
Get all entries for feed with feedID
type Feed struct {
ID int64 `json:"id"`
URL string `json:"url"`
Title string `json:"title"`
Description string `json:"description"`
LastUpdated string `json:"last_updated"`
Entries []*Entry `json:"entries,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.