Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidId = errors.New("invalid id")
View Source
var ErrNilInstance = errors.New("nil instance")
Functions ¶
This section is empty.
Types ¶
type IngredientMongo ¶
type IngredientMongo struct { Id primitive.ObjectID `bson:"_id,omitempty"` Name string `bson:"name"` MacrosForWeight *MacrosForWeightMongo `bson:"macros_for_weight"` }
func (*IngredientMongo) Proto ¶
func (instance *IngredientMongo) Proto() (*Ingredient, error)
type MacrosForWeightMongo ¶
type MacrosForWeightMongo struct { Macros *MacrosMongo `bson:"macros"` Gramms float32 `bson:"gramms"` }
func (*MacrosForWeightMongo) Proto ¶
func (instance *MacrosForWeightMongo) Proto() (*MacrosForWeight, error)
type MacrosMongo ¶
type MacrosMongo struct { Proteins float32 `bson:"proteins"` Carbs float32 `bson:"carbs"` Fats float32 `bson:"fats"` Calories float32 `bson:"calories"` }
func (*MacrosMongo) Proto ¶
func (instance *MacrosMongo) Proto() (*Macros, error)
type MealMongo ¶
type MealMongo struct { Id primitive.ObjectID `bson:"_id,omitempty"` Username string `bson:"username"` RecipeId primitive.ObjectID `bson:"recipe_id,omitempty"` WeightedIngredients []*WeightedIngredientMongo `bson:"weighted_ingredients"` Timestamp int64 `bson:"timestamp"` MealStatus uint8 `bson:"meal_status"` }
type RecipeMongo ¶
type RecipeMongo struct { Id primitive.ObjectID `bson:"_id,omitempty"` Name string `bson:"name"` RecipeSteps string `bson:"recipe_steps"` ExampleIngredientsProportions []*WeightedIngredientMongo `bson:"example_ingredients_proportions"` }
func (*RecipeMongo) Proto ¶
func (instance *RecipeMongo) Proto() (*Recipe, error)
type WeightedIngredientMongo ¶
type WeightedIngredientMongo struct { Ingredient *IngredientMongo `bson:"ingredient"` Gramms float32 `bson:"gramms"` }
func (*WeightedIngredientMongo) Proto ¶
func (instance *WeightedIngredientMongo) Proto() (*WeightedIngredient, error)
Click to show internal directories.
Click to hide internal directories.