Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Telegram const. Telegram = "telegram" // Stdout const. Stdout = "stdout" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Publisher ¶
type Publisher interface {
Publish(item Item)
}
Publisher is a publisher interface.
type Publishers ¶
type Publishers struct { TelegramPublisher *TelegramPublisher StdoutPublisher *StdoutPublisher }
Publishers contains the available publishers.
func (*Publishers) GetPublisher ¶
func (v *Publishers) GetPublisher(scraperName string) Publisher
GetPublisher returns a new Publisher based on a provided name.
type StdoutPublisher ¶
type StdoutPublisher struct{}
StdoutPublisher struct.
func NewStdoutPublisher ¶
func NewStdoutPublisher() *StdoutPublisher
NewStdoutPublisher returns an StdoutPublisher.
func (*StdoutPublisher) Publish ¶
func (dv *StdoutPublisher) Publish(item Item)
Publish publishes the scraped item to stdout.
type TelegramPublisher ¶
type TelegramPublisher struct{}
TelegramPublisher struct.
func NewTelegramPublisher ¶
func NewTelegramPublisher() *TelegramPublisher
NewTelegramPublisher returns a TelegramPublisher.
func (*TelegramPublisher) Publish ¶
func (dv *TelegramPublisher) Publish(item Item)
Publish publishes the scraped item to telegram.
Click to show internal directories.
Click to hide internal directories.