service

package
v0.0.0-...-87e7b27 Latest Latest
Warning

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

Go to latest
Published: May 27, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MailboxBuilderServiceInsertCallbackCapabilities

type MailboxBuilderServiceInsertCallbackCapabilities interface {
	Unmount(chatID int64) error
	Get(chatID int64) (*builder.MailboxBuilder, bool)
}

type MailboxBuilderServiceInsertCapabilities

type MailboxBuilderServiceInsertCapabilities interface {
	Mount(chatID int64, builder *builder.MailboxBuilder) error
	Get(chatID int64) (*builder.MailboxBuilder, bool)
}

type Service

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

func NewService

func NewService(
	telegramService TelegramCapabilities,
	mailboxBuilderService MailboxBuilderServiceCapabilities,
	client client.ImapConcentratorClient,
) *Service

func (*Service) Acquire

func (s *Service) Acquire(chatID int64) error

func (*Service) BuilderMounted

func (s *Service) BuilderMounted(chatID int64) bool

func (*Service) CorrectHost

func (s *Service) CorrectHost(chatID int64, host string) error

func (*Service) CorrectHostCallback

func (s *Service) CorrectHostCallback(chatID int64, messageID int, text string) error

func (*Service) CorrectMailbox

func (s *Service) CorrectMailbox(chatID int64, mailbox string) error

func (*Service) CorrectMailboxCallback

func (s *Service) CorrectMailboxCallback(chatID int64, messageID int, text string) error

func (*Service) CorrectPassword

func (s *Service) CorrectPassword(chatID int64, password string) error

func (*Service) CorrectPasswordCallback

func (s *Service) CorrectPasswordCallback(chatID int64, messageID int, text string) error

func (*Service) CorrectPort

func (s *Service) CorrectPort(chatID int64, port int32) error

func (*Service) CorrectPortCallback

func (s *Service) CorrectPortCallback(chatID int64, messageID int, text string) error

func (*Service) CorrectUsername

func (s *Service) CorrectUsername(chatID int64, username string) error

func (*Service) CorrectUsernameCallback

func (s *Service) CorrectUsernameCallback(chatID int64, messageID int, text string) error

func (*Service) DeleteMailbox

func (s *Service) DeleteMailbox(chatID int64, mailboxID int64, messageID int) error

func (*Service) GetBuilderStage

func (s *Service) GetBuilderStage(chatID int64) (int, error)

func (*Service) Help

func (s *Service) Help(chatID int64) error

func (*Service) Host

func (s *Service) Host(chatID int64, host string) error

func (*Service) Initial

func (s *Service) Initial(chatID int64) error

func (*Service) Insert

func (s *Service) Insert(chatID int64) error

func (*Service) ListMailboxes

func (s *Service) ListMailboxes(chatID int64) error

func (*Service) Mailbox

func (s *Service) Mailbox(chatID int64, mailbox string) error

func (*Service) MailboxDetail

func (s *Service) MailboxDetail(chatID int64, mailboxID int64, messageID int) error

func (*Service) Password

func (s *Service) Password(chatID int64, password string) error

func (*Service) Poll

func (s *Service) Poll(chatID int64) error

func (*Service) Port

func (s *Service) Port(chatID int64, port int32) error

func (*Service) ReturnToList

func (s *Service) ReturnToList(chatID int64, mailboxID int, messageID int) error

func (*Service) Start

func (s *Service) Start(chatID int64) error

func (*Service) Submit

func (s *Service) Submit(chatID int64) error

func (*Service) SubmitCallback

func (s *Service) SubmitCallback(chatID int64, messageID int, text string) error

func (*Service) Username

func (s *Service) Username(chatID int64, username string) error

type TelegramAcquireCapabilities

type TelegramAcquireCapabilities interface {
	ResponseToAcquire(chatID int64) error
}

type TelegramDetailCallbackCapabilities

type TelegramDetailCallbackCapabilities interface {
	CloseKeyboard(chatID int64, messageID int, text string) error
	ReturnToMailboxes(chatID int64, messageID int, mailboxes []*pb.MailboxV1) error
}

type TelegramHelpCapabilities

type TelegramHelpCapabilities interface {
	SendHelpText(chatID int64) error
}

type TelegramInsertCallbackCapabilities

type TelegramInsertCallbackCapabilities interface {
	InsertSubmitResponse(chatID int64, messageID int) error
	AskForHost(chatID int64) error
	AskForPort(chatID int64) error
	AskForMailbox(chatID int64) error
	AskForUsername(chatID int64) error
	AskForPassword(chatID int64) error
	AskForSubmit(chatID int64, request *pb.MailboxV1) error
}

type TelegramInsertCapabilities

type TelegramInsertCapabilities interface {
	AskForHost(chatID int64) error
	AskForPort(chatID int64) error
	AskForMailbox(chatID int64) error
	AskForUsername(chatID int64) error
	AskForPassword(chatID int64) error
	AskForSubmit(chatID int64, request *pb.MailboxV1) error
}

type TelegramListCallbackCapabilities

type TelegramListCallbackCapabilities interface {
	ChangeKeyboardToDetail(chatID int64, messageID int, mailbox *pb.MailboxV1) error
}

type TelegramListCapabilities

type TelegramListCapabilities interface {
	SendMailboxesList(chatID int64, mailboxes []*pb.MailboxV1) error
}

type TelegramPollCapabilities

type TelegramPollCapabilities interface {
}

type TelegramStartCapabilities

type TelegramStartCapabilities interface {
	NotifyAboutStart(chatID int64) error
}

Jump to

Keyboard shortcuts

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