telegram

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventsProvider

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

EventsProvider represents telegram events provider.

func NewEventsProvider

func NewEventsProvider(log *zap.Logger, opts *Opts) *EventsProvider

NewEventsProvider creates new instance of EventsProvider.

func (*EventsProvider) EventsStream

func (ep *EventsProvider) EventsStream() chan domain.Event

EventsStream method returns a stream of domain.Event.

func (*EventsProvider) Run

func (ep *EventsProvider) Run(ctx context.Context) error

Run method starts the main goroutine of EventsProvider. The call is blocking.

type Opts

type Opts struct {
	// TelegramUpdates is a channel to receive telegram updates from.
	TelegramUpdates tgbotapi.UpdatesChannel
}

Opts represents options to create new instance of EventsProvider.

Jump to

Keyboard shortcuts

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