Documentation ¶
Index ¶
- func GetHandlerParamsWithMocks(t *testing.T) (HandlerParams, *MockBag)
- type HandlerParams
- type Helper
- func (c *Helper) GetKeyboardCategories(categories []core.Category, callable func(category core.Category) []string) tgbotapi.InlineKeyboardMarkup
- func (c *Helper) GetKeyboardNotes(notes []core.Note, callable func(note core.Note) []string) tgbotapi.InlineKeyboardMarkup
- func (c *Helper) GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error)
- func (c *Helper) NewMessage(chatID int64, text string) tgbotapi.MessageConfig
- func (c *Helper) NewUpdateChannel(offset int) tgbotapi.UpdateConfig
- func (c *Helper) SendMessage(msg tgbotapi.MessageConfig) error
- type MockBag
- type TelegramHandlerHelper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetHandlerParamsWithMocks ¶
func GetHandlerParamsWithMocks(t *testing.T) (HandlerParams, *MockBag)
Types ¶
type HandlerParams ¶
type Helper ¶
type Helper struct {
// contains filtered or unexported fields
}
func (*Helper) GetKeyboardCategories ¶
func (*Helper) GetKeyboardNotes ¶
func (*Helper) GetUpdatesChan ¶
func (c *Helper) GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error)
func (*Helper) NewMessage ¶
func (c *Helper) NewMessage(chatID int64, text string) tgbotapi.MessageConfig
func (*Helper) NewUpdateChannel ¶
func (c *Helper) NewUpdateChannel(offset int) tgbotapi.UpdateConfig
func (*Helper) SendMessage ¶
func (c *Helper) SendMessage(msg tgbotapi.MessageConfig) error
type MockBag ¶
type MockBag struct { Categories *mock_services.MockCategories Interactions *mock_services.MockInteractions Users *mock_services.MockUsers Notes *mock_services.MockNotes Logger *mock_services.MockLogger Helper *mock_handlers.MockTelegramHandlerHelper }
type TelegramHandlerHelper ¶
type TelegramHandlerHelper interface { GetKeyboardCategories( categories []core.Category, callable func(category core.Category) []string, ) tgbotapi.InlineKeyboardMarkup GetKeyboardNotes( notes []core.Note, callable func(note core.Note) []string, ) tgbotapi.InlineKeyboardMarkup NewMessage(chatID int64, text string) tgbotapi.MessageConfig SendMessage(msg tgbotapi.MessageConfig) error NewUpdateChannel(offset int) tgbotapi.UpdateConfig GetUpdatesChan(config tgbotapi.UpdateConfig) (tgbotapi.UpdatesChannel, error) }
Directories ¶
Path | Synopsis |
---|---|
Package mock_handlers is a generated GoMock package.
|
Package mock_handlers is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.