Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FeedItem ¶
type FeedItem struct { Description string FeedName string FeedTitle string FeedURL string IconURL string ImageURL string IsUpdated bool ItemURL string Published time.Time Title string }
FeedItem represents a feed item to be posted to a webhook
func NewFeedItem ¶
type Message ¶
Message represents a wrapper around a feed item with additional header information for queue processing.
type Messenger ¶
type Messenger struct {
// contains filtered or unexported fields
}
A Messenger handles posting messages to a webhook. Failed messages are automatically retried and rate limits are respected. Unsent messages are queued and will be picked up again after a process restart.
func NewMessenger ¶
func NewMessenger(client *dhooks.Client, queue *pqueue.PQueue, name, url string, st *storage.Storage, cfg config.Config) *Messenger
NewMessenger returns a new Messenger.
func (*Messenger) AddMessage ¶
func (wh *Messenger) AddMessage(feedName string, feed *gofeed.Feed, item *gofeed.Item, isUpdated bool) error
AddMessage adds a new message for being send to to webhook
Click to show internal directories.
Click to hide internal directories.