Documentation ¶
Index ¶
- Variables
- func AddNewType(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func AddNewTypeHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func AddProduct(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func AddProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func AddTypeToProduct(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductMargin(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductName(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductPrice(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductPrime(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func EditProductUnit(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func GetAllProducts(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func GetAllProductsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func GetEntityToEdit(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func RemoveProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func RemoveType(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func RemoveTypeHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func SettingsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
- func ShowAllProductsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( EditProductQueue = make(map[int]bson.ObjectId) EditProductNameQueue = make(map[int]bson.ObjectId) EditProductMarginQueue = make(map[int]bson.ObjectId) EditProductPrimeQueue = make(map[int]bson.ObjectId) EditProductPriceQueue = make(map[int]bson.ObjectId) EditProductUnitQueue = make(map[int]bson.ObjectId) )
View Source
var (
AddProductQueue = make(map[int]*betypes.Product)
)
Queue of users who are trying to add new product
Functions ¶
func AddProduct ¶
AddProduct prompt user to get name, type and prise of product. Save it in DB
func AddProductHandler ¶
AddProductHandler adds product to database collection "products"
func EditProductHandler ¶
EditProductHandler edit product from "products" collection
func GetAllProducts ¶
GetAllProducts prints all produtcs from "products" collection.
func GetAllProductsHandler ¶
func RemoveProductHandler ¶
RemoveProductHandler removes product from "products" collection
func SettingsHandler ¶
SettingsHandler handle "Configuration" callback (button)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.