Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bot ¶
type Bot struct {
// contains filtered or unexported fields
}
Bot is a telegram bot which returns events and sends messages
func NewBot ¶
func NewBot(storage storage.DataStorer, deliveryProvider DeliveryProvider) *Bot
NewBot returns an instance of Bot which implements Messenger interface tlgr - is an low-level abstraction for telegram API
func (*Bot) CheckDeliveries ¶
func (b *Bot) CheckDeliveries()
CheckDeliveries checks delivery for subscripions
func (*Bot) DefaultMessageProcessor ¶
DefaultMessageProcessor is a processor for messages to bot
func (*Bot) SetMessenger ¶
SetMessenger sets messenger, because messager includes message processing
type DefaultDeliveryProvider ¶
type DefaultDeliveryProvider struct{}
DefaultDeliveryProvider default implementation
func (*DefaultDeliveryProvider) Get ¶
func (p *DefaultDeliveryProvider) Get(postcode string) DeliverySchedule
Get returns schedule for AH
type DeliveryProvider ¶
type DeliveryProvider interface {
Get(postcode string) DeliverySchedule
}
DeliveryProvider defines provider schedule
type DeliverySchedule ¶
type DeliverySchedule map[string][]DeliveryTimeSlotBase
DeliverySchedule is used to represent time schedule by date
func (DeliverySchedule) String ¶
func (ds DeliverySchedule) String() string
Click to show internal directories.
Click to hide internal directories.