Documentation
¶
Index ¶
- Constants
- type TelegramService
- func (t *TelegramService) AskForHost(chatID int64) error
- func (t *TelegramService) AskForMailbox(chatID int64) error
- func (t *TelegramService) AskForPassword(chatID int64) error
- func (t *TelegramService) AskForPort(chatID int64) error
- func (t *TelegramService) AskForSubmit(chatID int64, request *pb.MailboxV1) error
- func (t *TelegramService) AskForUsername(chatID int64) error
- func (t *TelegramService) ChangeKeyboardToDetail(chatID int64, messageID int, mailbox *pb.MailboxV1) error
- func (t *TelegramService) CloseKeyboard(chatID int64, messageID int, text string) error
- func (t *TelegramService) InsertSubmitResponse(chatID int64, messageID int) error
- func (t *TelegramService) NotifyAboutStart(chatID int64) error
- func (t *TelegramService) ResponseToAcquire(chatID int64) error
- func (t *TelegramService) ReturnToMailboxes(chatID int64, messageID int, mailboxes []*pb.MailboxV1) error
- func (t *TelegramService) SendHelpText(chatID int64) error
- func (t *TelegramService) SendMailboxesList(chatID int64, mailboxes []*pb.MailboxV1) error
- func (t *TelegramService) SendText(chatID int64, text string) error
- func (t *TelegramService) Start(ctx context.Context) error
Constants ¶
View Source
const ( DetailReturnButtonData = "return" DetailDeleteButtonData = "delete" )
View Source
const ( InsertSubmitButtonData = "submit" InsertCorrectHostButtonData = "host" InsertCorrectPortButtonData = "port" InsertCorrectMailboxButtonData = "mailbox" InsertCorrectUsernameButtonData = "username" InsertCorrectPasswordButtonData = "password" )
View Source
const (
ListMailboxesPathPrefix = "/list"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TelegramService ¶
type TelegramService struct {
// contains filtered or unexported fields
}
func NewTelegramService ¶
func NewTelegramService( bot *tgbotapi.BotAPI, notifications <-chan *pb.NotificationV1, errors chan error, ) *TelegramService
func (*TelegramService) AskForHost ¶
func (t *TelegramService) AskForHost(chatID int64) error
func (*TelegramService) AskForMailbox ¶
func (t *TelegramService) AskForMailbox(chatID int64) error
func (*TelegramService) AskForPassword ¶
func (t *TelegramService) AskForPassword(chatID int64) error
func (*TelegramService) AskForPort ¶
func (t *TelegramService) AskForPort(chatID int64) error
func (*TelegramService) AskForSubmit ¶
func (t *TelegramService) AskForSubmit(chatID int64, request *pb.MailboxV1) error
func (*TelegramService) AskForUsername ¶
func (t *TelegramService) AskForUsername(chatID int64) error
func (*TelegramService) ChangeKeyboardToDetail ¶
func (*TelegramService) CloseKeyboard ¶
func (t *TelegramService) CloseKeyboard(chatID int64, messageID int, text string) error
func (*TelegramService) InsertSubmitResponse ¶
func (t *TelegramService) InsertSubmitResponse(chatID int64, messageID int) error
func (*TelegramService) NotifyAboutStart ¶
func (t *TelegramService) NotifyAboutStart(chatID int64) error
func (*TelegramService) ResponseToAcquire ¶
func (t *TelegramService) ResponseToAcquire(chatID int64) error
func (*TelegramService) ReturnToMailboxes ¶
func (*TelegramService) SendHelpText ¶
func (t *TelegramService) SendHelpText(chatID int64) error
func (*TelegramService) SendMailboxesList ¶
func (t *TelegramService) SendMailboxesList(chatID int64, mailboxes []*pb.MailboxV1) error
Click to show internal directories.
Click to hide internal directories.