settings

package
v0.0.0-...-b745f0c Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

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 (
	AddTypeQueue    = make(map[int]bool)
	RemoveTypeQueue = make(map[int]bool)
)
View Source
var (
	AddProductQueue = make(map[int]*betypes.Product)
)

Queue of users who are trying to add new product

Functions

func AddNewType

func AddNewType(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func AddNewTypeHandler

func AddNewTypeHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func AddProduct

func AddProduct(bot *tgbotapi.BotAPI, update tgbotapi.Update)

AddProduct prompt user to get name, type and prise of product. Save it in DB

func AddProductHandler

func AddProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

AddProductHandler adds product to database collection "products"

func AddTypeToProduct

func AddTypeToProduct(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func EditProductHandler

func EditProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

EditProductHandler edit product from "products" collection

func EditProductMargin

func EditProductMargin(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func EditProductName

func EditProductName(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func EditProductPrice

func EditProductPrice(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func EditProductPrime

func EditProductPrime(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func EditProductUnit

func EditProductUnit(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func GetAllProducts

func GetAllProducts(bot *tgbotapi.BotAPI, update tgbotapi.Update)

GetAllProducts prints all produtcs from "products" collection.

func GetAllProductsHandler

func GetAllProductsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func GetEntityToEdit

func GetEntityToEdit(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func RemoveProductHandler

func RemoveProductHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

RemoveProductHandler removes product from "products" collection

func RemoveType

func RemoveType(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func RemoveTypeHandler

func RemoveTypeHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

func SettingsHandler

func SettingsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

SettingsHandler handle "Configuration" callback (button)

func ShowAllProductsHandler

func ShowAllProductsHandler(bot *tgbotapi.BotAPI, update tgbotapi.Update)

Types

This section is empty.

Jump to

Keyboard shortcuts

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