Documentation ¶
Overview ¶
Package proc provided the primary blocking loop updating from sources and making feeds
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DurationService ¶
DurationService is the interface for reading duration from files
type Processor ¶
type Processor struct { Conf *config.Conf Store *BoltDB TelegramNotif TelegramNotif TwitterNotif TwitterNotif }
Processor is a feed reader and store writer
type TelegramClient ¶
type TelegramClient struct { Bot *tb.Bot Timeout time.Duration DurationService DurationService TelegramSender TelegramSender }
TelegramClient client
func NewTelegramClient ¶
func NewTelegramClient(token, apiURL string, timeout time.Duration, ds DurationService, tgs TelegramSender) (*TelegramClient, error)
NewTelegramClient init telegram client
type TelegramNotif ¶
TelegramNotif is interface to send messages to telegram
type TelegramSender ¶
type TelegramSender interface {
Send(tb.Audio, *tb.Bot, tb.Recipient, *tb.SendOptions) (*tb.Message, error)
}
TelegramSender is the interface for sending messages to telegram
type TelegramSenderImpl ¶
type TelegramSenderImpl struct{}
TelegramSenderImpl is a TelegramSender implementation that sends messages to Telegram for real
type TweetPoster ¶
type TweetPoster interface {
PostTweet(msg string, v url.Values) (tweet anaconda.Tweet, err error)
}
TweetPoster is the interface for posting Tweets to Twitter
type TwitterAuth ¶
TwitterAuth contains keys and secrets for twitter API
type TwitterClient ¶
type TwitterClient struct { TwitterAuth // contains filtered or unexported fields }
TwitterClient implements basic publisher of rss item to twitter
func NewTwitterClient ¶
func NewTwitterClient(auth TwitterAuth, formatter func(feed.Item) string, twitterSender TweetPoster) *TwitterClient
NewTwitterClient makes twitter notifier
type TwitterNotif ¶
TwitterNotif is interface to send message to twitter