domain

package
v0.0.0-...-5665f0c Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatID

type ChatID int64

type Command

type Command int
const (
	UnknownCommand Command = iota
	StartCommand
)

type Event

type Event struct {
	ChatID    ChatID
	EventType EventType
	Message   string
	Command   Command
}

type EventType

type EventType int
const (
	MessageEventType EventType = iota
	CommandEventType
)

type GoTgBot

type GoTgBot interface {
	SendMessage(ctx context.Context, params *bot.SendMessageParams) (*models.Message, error)
}

type MultiplyTaskUseCase

type MultiplyTaskUseCase interface {
	Get() domain.MultiplyTask
	Solve(task domain.MultiplyTask, solution int) bool
}

type Session

type Session struct {
	State        State
	MultiplyTask *domain.MultiplyTask
}

type State

type State string
const (
	StartState              State = "start"
	HomeState               State = "home"
	WaitingForResponseState State = "waiting-for-response"
	SolvedCorrectlyState    State = "solved-correctly"
	SolvedIncorrectlyState  State = "solved-incorrectly"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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