meals

package
v0.0.0-...-e6b71c9 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMealIngredientsToStore

func AddMealIngredientsToStore(meal models.Meal, storeID uuid.UUID, userID uuid.UUID, itemsArg []interface{}) (addedItems []*models.Item, err error)

AddMealIngredientsToStore will add the items associated with this meal to the user's selected store

func CompileRecipeIngredients

func CompileRecipeIngredients(ingArg []interface{}) (ingredients []models.RecipeIngredient, err error)

CompileRecipeIngredients compiles []models.RecipeIngredient for insertion in a recipe

func CreateRecipe

func CreateRecipe(userID uuid.UUID, args map[string]interface{}) (recipe *models.Recipe, err error)

CreateRecipe creates a recipe record and associated records

func DeleteMeal

func DeleteMeal(mealID interface{}, userID uuid.UUID, appScheme string) (meal models.Meal, err error)

DeleteMeal deletes a meal by ID

func DeleteRecipe

func DeleteRecipe(recipeID interface{}, userID uuid.UUID) (recipe models.Recipe, err error)

DeleteRecipe deletes a recipe

func PlanMeal

func PlanMeal(userID uuid.UUID, args map[string]interface{}) (meal models.Meal, err error)

PlanMeal creates a meal record and associated records

func RetrieveMealForUser

func RetrieveMealForUser(mealID interface{}, userID uuid.UUID) (meal models.Meal, err error)

RetrieveMealForUser retrieves a specific meal by mealID and userID

func RetrieveMeals

func RetrieveMeals(userID uuid.UUID, args map[string]interface{}) (meals []models.Meal, err error)

RetrieveMeals fetches the planned meals within the provided week/year for the current user Note: when used via the plannedMeals query, it is possible to leave the weekNumber/year nil and it will use the current time

func RetrieveRecipe

func RetrieveRecipe(id interface{}) (recipe models.Recipe, err error)

RetrieveRecipe retrieves a recipe by ID

func RetrieveRecipes

func RetrieveRecipes(userID uuid.UUID, args map[string]interface{}) (recipes []models.Recipe, err error)

RetrieveRecipes retrieves recipes added by userID

func UpdateMeal

func UpdateMeal(args map[string]interface{}) (meal models.Meal, err error)

UpdateMeal updates a meal with the arguments provided

Types

This section is empty.

Jump to

Keyboard shortcuts

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