telegram

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fetcher

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

func NewFetcher

func NewFetcher() *Fetcher

func (*Fetcher) Fetch

func (fetcher *Fetcher) Fetch(ctx context.Context) <-chan multibot.Update

func (*Fetcher) LongPoll

func (fetcher *Fetcher) LongPoll(token string, offset int, timeout time.Duration) error

func (*Fetcher) Webhook

func (fetcher *Fetcher) Webhook(token, webhookURLPrefix string, certFile interface{}) error

func (*Fetcher) WithDebug

func (fetcher *Fetcher) WithDebug(debug bool) *Fetcher

type Notifier

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

func (Notifier) Notify

func (notifier Notifier) Notify(ctx context.Context, message string)

type Update

type Update struct {
	Text     string
	Notifier Notifier
}

func (Update) Body

func (update Update) Body() string

func (Update) Hook

func (update Update) Hook() multibot.Notifier

Jump to

Keyboard shortcuts

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