Documentation
¶
Index ¶
- Constants
- type AIClient
- type LogicHandlers
- func (h *LogicHandlers) CancelGettingDiet(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) CancelUserRegistration(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) ConfirmUserRegistrationNo(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) ConfirmUserRegistrationYes(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserAge(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserGenderFemale(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserGenderMale(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserHeight(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserName(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserPhysicalActivityHigh(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserPhysicalActivityLow(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserPhysicalActivityMedium(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) RegisterUserWeight(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) SelectMeals2(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) SelectMeals3(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) SelectOrderProducts(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) SelectOrderProductsNo(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) SelectOrderProductsYes(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
- func (h *LogicHandlers) SelectSnacks0(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) SelectSnacks1(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) SelectSnacks2(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) Start(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) StartGettingDiet(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) StartGettingDietFromAI(b *gotgbot.Bot, ctx *ext.Context) error
- func (h *LogicHandlers) StartUserRegistration(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
Constants ¶
const ( GetDietFromAISelectMeals = "select_meals" GetDietFromAISelectSnacks = "select_snacks" GetDietFromAISelectOrderProducts = "select_order_products" )
Handler states for getting diet from AI
const ( GetDietFromAICbSelectMeals2 = "select_meals_2" GetDietFromAICbSelectMeals3 = "select_meals_3" GetDietFromAICbSelectSnacks0 = "select_snacks_0" GetDietFromAICbSelectSnacks1 = "select_snacks_1" GetDietFromAICbSelectSnacks2 = "select_snacks_2" GetDietFromAISelectOrderProductsYes = "select_order_products_y" GetDietFromAISelectOrderProductsNo = "select_order_products_n" )
Callback keys for getting diet from AI
const ( RegisterName = "name" RegisterAge = "age" RegisterWeight = "weight" RegisterHeight = "height" RegisterGender = "gender" RegisterPhysicalActivity = "physicalactivity" RegisterConfirm = "сonfirm" )
Handler states for user registration
const ( RegisterGenderCbMale = "gender_male" RegisterGenderCbFemale = "gender_female" RegisterPhysicalActivityCbLow = "physicalactivity_low" RegisterPhysicalActivityCbMedium = "physicalactivity_medium" RegisterPhysicalActivityCbHigh = "physicalactivity_high" RegisterConfirmCbYes = "сonfirm_yes" RegisterConfirmCbNo = "сonfirm_no" )
Callback keys for getting diet from AI
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogicHandlers ¶
type LogicHandlers struct {
// contains filtered or unexported fields
}
func (*LogicHandlers) CancelGettingDiet ¶
func (h *LogicHandlers) CancelGettingDiet(b *gotgbot.Bot, ctx *ext.Context) error
CancelGettingDiet .
func (*LogicHandlers) CancelUserRegistration ¶
func (h *LogicHandlers) CancelUserRegistration(b *gotgbot.Bot, ctx *ext.Context) error
CancelUserRegistration cancels user registration
func (*LogicHandlers) ConfirmUserRegistrationNo ¶
func (h *LogicHandlers) ConfirmUserRegistrationNo(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
ConfirmUserRegistrationNo confirms user registration with No value
func (*LogicHandlers) ConfirmUserRegistrationYes ¶
func (h *LogicHandlers) ConfirmUserRegistrationYes(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
ConfirmUserRegistrationYes confirms user registration with Yes value
func (*LogicHandlers) RegisterUserAge ¶
func (h *LogicHandlers) RegisterUserAge(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserAge registers user age
func (*LogicHandlers) RegisterUserGenderFemale ¶
func (h *LogicHandlers) RegisterUserGenderFemale(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserGenderFemale registers user gender with Female value
func (*LogicHandlers) RegisterUserGenderMale ¶
func (h *LogicHandlers) RegisterUserGenderMale(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserGenderMale registers user gender with Male value
func (*LogicHandlers) RegisterUserHeight ¶
func (h *LogicHandlers) RegisterUserHeight(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserHeight registers user height
func (*LogicHandlers) RegisterUserName ¶
func (h *LogicHandlers) RegisterUserName(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserName registers user name
func (*LogicHandlers) RegisterUserPhysicalActivityHigh ¶
func (h *LogicHandlers) RegisterUserPhysicalActivityHigh(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserPhysicalActivityHigh registers user physical activity with High value
func (*LogicHandlers) RegisterUserPhysicalActivityLow ¶
func (h *LogicHandlers) RegisterUserPhysicalActivityLow(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserPhysicalActivityLow registers user physical activity with Low value
func (*LogicHandlers) RegisterUserPhysicalActivityMedium ¶
func (h *LogicHandlers) RegisterUserPhysicalActivityMedium(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserPhysicalActivityMedium registers user physical activity with Medium value
func (*LogicHandlers) RegisterUserWeight ¶
func (h *LogicHandlers) RegisterUserWeight(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
RegisterUserWeight registers user weight
func (*LogicHandlers) SelectMeals2 ¶
func (h *LogicHandlers) SelectMeals2(b *gotgbot.Bot, ctx *ext.Context) error
SelectMeals2 .
func (*LogicHandlers) SelectMeals3 ¶
func (h *LogicHandlers) SelectMeals3(b *gotgbot.Bot, ctx *ext.Context) error
SelectMeals3 .
func (*LogicHandlers) SelectOrderProducts ¶
func (h *LogicHandlers) SelectOrderProducts(b *gotgbot.Bot, ctx *ext.Context) error
SelectOrderProducts .
func (*LogicHandlers) SelectOrderProductsNo ¶
func (h *LogicHandlers) SelectOrderProductsNo(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
SelectOrderProductsNo .
func (*LogicHandlers) SelectOrderProductsYes ¶
func (h *LogicHandlers) SelectOrderProductsYes(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
SelectOrderProductsYes .
func (*LogicHandlers) SelectSnacks0 ¶
func (h *LogicHandlers) SelectSnacks0(b *gotgbot.Bot, ctx *ext.Context) error
SelectSnacks0 .
func (*LogicHandlers) SelectSnacks1 ¶
func (h *LogicHandlers) SelectSnacks1(b *gotgbot.Bot, ctx *ext.Context) error
SelectSnacks1 .
func (*LogicHandlers) SelectSnacks2 ¶
func (h *LogicHandlers) SelectSnacks2(b *gotgbot.Bot, ctx *ext.Context) error
SelectSnacks2 .
func (*LogicHandlers) Start ¶
func (h *LogicHandlers) Start(b *gotgbot.Bot, ctx *ext.Context) error
Start introduces the bot.
func (*LogicHandlers) StartGettingDiet ¶
func (h *LogicHandlers) StartGettingDiet(b *gotgbot.Bot, ctx *ext.Context) error
StartGettingDiet .
func (*LogicHandlers) StartGettingDietFromAI ¶
func (h *LogicHandlers) StartGettingDietFromAI(b *gotgbot.Bot, ctx *ext.Context) error
StartGettingDietFromAI .
func (*LogicHandlers) StartUserRegistration ¶
func (h *LogicHandlers) StartUserRegistration(b *gotgbot.Bot, ctx *ext.Context) (nextState error)
StartUserRegistration starts user registration