telegram

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RouteNotFoundError = errors.New("Route not found")

Functions

This section is empty.

Types

type ActionRepository added in v1.0.0

type ActionRepository interface {
	Keyboard(i ...interface{}) interface{}
	Output(...interface{}) (string, error)
	SetChat(int64)
	GetChat() int64
	SetData(interface{})
	GetData() interface{}
	SetBot(interface{})
	GetBot() interface{}
}

ActionService implement three basic functions Send - resposible for collect keyboard and text for sending Keyboard - return keyboard based on some data from message Output - return message text prepared for sending

type ActionService added in v1.0.0

type ActionService interface {
	Keyboard(i ...interface{}) interface{}
	Output(...interface{}) (string, error)
	SetChat(int64)
	GetChat() int64
	SetData(interface{})
	GetData() interface{}
	SetBot(interface{})
	GetBot() interface{}
}

func NewAction added in v1.0.0

func NewAction(repo ActionRepository) ActionService

type RouteRepository added in v1.0.0

type RouteRepository interface {
	Analyze() (int64, error)
	Response(int64) error
	SetBot(tgbotapi.BotAPI)
	SetUpdate(update tgbotapi.Update)
	SetupRoutes() RouteService
}

type RouteService added in v1.0.0

type RouteService interface {
	Analyze() (int64, error)
	Response(int64) error
	SetBot(tgbotapi.BotAPI)
	SetUpdate(update tgbotapi.Update)
	SetupRoutes() RouteService
}

func NewRouteService added in v1.0.0

func NewRouteService(repository RouteRepository) RouteService

Jump to

Keyboard shortcuts

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