Documentation ¶
Index ¶
- func AddFeed(Bot *tgbotapi.BotAPI, name string, url string, chatid int64, userid int) error
- func DeleteFeedByID(feedid int, chatid int64, userid int) error
- func Exists(url string, chatid int64) (bool, error)
- func FeedExistsByID(id int, chatid int64, userid int) error
- func GetAllUnPublishedFeedData() (*[]models.FeedData, error)
- func GetFeed(feedUrl string, feedID int) error
- func GetFeedUpdatesChan() chan models.Feed
- func LinkExists(link string) bool
- func ListAllFeeds() (*[]models.Feed, error)
- func ListFeeds(userid int, chatid int64) (*[]models.Feed, error)
- func PostFeedUpdatesChan() chan models.FeedData
- func UpdateFeedDataPublished(data *models.FeedData) (bool, error)
- func WriteFeedData(feedT *gofeed.Item, feedID int) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteFeedByID ¶
Delete a feed by a feedID parameter
func Exists ¶
Check for a feed if it exists by its url returns true if exists and false if it does not
func GetAllUnPublishedFeedData ¶
Get all unpublished feed data from the database, this will contain all feeds which were not yet posted to the specific channels
func GetFeedUpdatesChan ¶
This channel is used for getting the feed updates from the database Here we send all the feed data to the channel
func LinkExists ¶
This function checks for the URL if it is contained in the feedData table We use this function to not write the same feed data into the table twice
func ListAllFeeds ¶
Get a list of all Feeds added to the database
func PostFeedUpdatesChan ¶
This channel is use for getting all the unpublished feed data from the database We write all the unpublished feed data into the channel
func UpdateFeedDataPublished ¶
This function updates the Feed data and sets the respective feed data entry to published
Types ¶
This section is empty.