Documentation
¶
Index ¶
- func GetStockMap(stockColl *mongo.Collection) map[string]models.StockInfo
- func PostmanDeliver(ctx context.Context, bot *tg.Bot, mailbox chan Mail)
- func RegisterTelegramBotHandlers(bot *tg.Bot, handler *Handler)
- func RenderOneUserOutput(user *models.User, stockMap map[string]models.StockInfo) *bytes.Buffer
- type BotPlatform
- type Handler
- type Mail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStockMap ¶
func GetStockMap(stockColl *mongo.Collection) map[string]models.StockInfo
GetStockMap create stock map cache
func PostmanDeliver ¶
PostmanDeliver will response message to bot client
func RegisterTelegramBotHandlers ¶
RegisterTelegramBotHandlers register bot handers
Types ¶
type BotPlatform ¶
type BotPlatform int
defined bot platform
const TelegramBot BotPlatform = 1
TelegramBot is a bot platform
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the handler structure, communicate with postman
func NewHandler ¶
NewHandler create a handler
func (*Handler) QueryStock ¶
QueryStock handle query command
Click to show internal directories.
Click to hide internal directories.