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 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
Click to show internal directories.
Click to hide internal directories.