telegram

package
v0.0.0-...-ab5ebe4 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const MarkDownParseMode = "markdown"

Variables

This section is empty.

Functions

This section is empty.

Types

type Bot

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

func NewBot

func NewBot(deps *Deps) *Bot

func (*Bot) Start

func (b *Bot) Start() error

type CommandHandler

type CommandHandler interface {
	HandleAddCategory(message *tgbotapi.Message) error
	HandleRemoveCategory(message *tgbotapi.Message) error
	HandleRenameCategory(message *tgbotapi.Message) error
	HandleListCategories(message *tgbotapi.Message) error

	HandleAddNote(message *tgbotapi.Message) error
	HandleRemoveNotes(message *tgbotapi.Message) error
	HandleListNotes(message *tgbotapi.Message) error
	HandleListAllNotes(message *tgbotapi.Message) error

	HandleStart(message *tgbotapi.Message) error
}

type Deps

type Deps struct {
	Ctx      context.Context
	Bot      *tgbotapi.BotAPI
	Services *services.Services
	Logger   services.Logger
	Messages config.Messages

	CommandHandler     CommandHandler
	QueryHandler       QueryHandler
	InteractionHandler InteractionHandler

	Helper handlers.TelegramHandlerHelper
}

type InteractionHandler

type InteractionHandler interface {
	HandleAddCategory(message *tgbotapi.Message) error
	HandleRenameCategory(message *tgbotapi.Message) error
}

type QueryHandler

type QueryHandler interface {
	HandleRemoveCategory(chatID int64, category string) error
	HandleSelectCategoryToBeRenamed(chatID int64, category string) error
	HandleAddNote(chatID int64, args []string) error
	HandleListNotesToRemoveInCategory(chatID int64, category string) error
	HandleRemoveNotes(chatID int64, args []string) error
	HandleListNotes(chatID int64, category string) error
}

Directories

Path Synopsis
mocks
Package mock_handlers is a generated GoMock package.
Package mock_handlers is a generated GoMock package.
Package mock_telegram is a generated GoMock package.
Package mock_telegram is a generated GoMock package.

Jump to

Keyboard shortcuts

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