Documentation
¶
Index ¶
- type Feed
- type Post
- type Store
- func (store *Store) AddFeed(url string) (int64, error)
- func (store *Store) AddFeedForUser(userId int64, url string) (int64, error)
- func (store *Store) AddPost(feedId int64, guid, title, link string, publishedAt time.Time, content string) error
- func (store *Store) DeleteFeed(feedId string) error
- func (store *Store) GetAllFeeds() ([]Feed, error)
- func (store *Store) GetFeedByURL(url string) (*Feed, error)
- func (store *Store) GetFeedPosts(feedId int64, userId int64, limit int) ([]Post, error)
- func (store *Store) GetOrCreateUser(oidcSubject, oidcIssuer string) (int64, error)
- func (store *Store) GetPost(postID int64) (*Post, error)
- func (store *Store) GetUserFeeds(userId int64) ([]Feed, error)
- func (store *Store) GetUserPostsPerFeed(userId int64) (int, error)
- func (store *Store) InitAndVerifyDb(dbPath string) error
- func (store *Store) MarkAllFeedPostsAsSeen(userId int64, feedId string) error
- func (store *Store) MarkPostAsSeen(userId int64, postId string) error
- func (store *Store) SetUserPostsPerFeed(userId int64, postsPerFeed int) error
- func (store *Store) UpdateFeedCacheInfo(feedId int64, etag, lastModified string, cacheUntil time.Time) error
- func (store *Store) UpdateFeedLastFetched(feedId int64, timestamp time.Time) error
- func (store *Store) UpdateFeedTitle(feedId int64, title string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AddFeedForUser ¶
AddFeedForUser adds a feed for a specific user, handling duplicates gracefully
func (*Store) AddPost ¶
func (store *Store) AddPost(feedId int64, guid, title, link string, publishedAt time.Time, content string) error
AddPost adds a post to the database but makes sure that the contents of the post are sanitized using the UGC policy of bluemonday
func (*Store) DeleteFeed ¶
func (*Store) GetAllFeeds ¶
func (*Store) GetFeedPosts ¶
GetFeedPosts gets the posts for a given feed and user, and returns them in descending order of published_at
func (*Store) GetOrCreateUser ¶
func (*Store) GetUserPostsPerFeed ¶
GetUserPostsPerFeed gets the number of posts per feed for a user
func (*Store) InitAndVerifyDb ¶
func (*Store) MarkAllFeedPostsAsSeen ¶
func (*Store) MarkPostAsSeen ¶
MarkPostAsSeen marks a post as seen for a given user
func (*Store) SetUserPostsPerFeed ¶
SetUserPostsPerFeed sets the number of posts per feed for a user
func (*Store) UpdateFeedCacheInfo ¶
func (*Store) UpdateFeedLastFetched ¶
Click to show internal directories.
Click to hide internal directories.