notifications

package
v0.0.0-...-9dc5689 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 18, 2019 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type NoopNotifier

type NoopNotifier struct {
}

func (*NoopNotifier) OnFinish

func (n *NoopNotifier) OnFinish(item media.SearchItem) error

func (*NoopNotifier) OnQueued

func (n *NoopNotifier) OnQueued(item media.SearchItem) error

type Notifier

type Notifier interface {
	OnQueued(item media.SearchItem) error
	OnFinish(item media.SearchItem) error
}

type Telegram

type Telegram struct {
	// contains filtered or unexported fields
}

func NewTelegramClient

func NewTelegramClient(bot *tgbotapi.BotAPI, db *sql.DB) *Telegram

func (*Telegram) GetSubscribedChats

func (t *Telegram) GetSubscribedChats() (ids []int64)

func (*Telegram) OnFinish

func (t *Telegram) OnFinish(item media.SearchItem) error

func (*Telegram) OnQueued

func (t *Telegram) OnQueued(item media.SearchItem) error

func (*Telegram) RegisterChat

func (t *Telegram) RegisterChat(id int64) error

func (*Telegram) StartListener

func (t *Telegram) StartListener() error

func (*Telegram) UnregisterChat

func (t *Telegram) UnregisterChat(id int64) error

func (*Telegram) UpdateSubscribers

func (t *Telegram) UpdateSubscribers(text string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL