food

package
v0.0.0-...-8c11f49 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Attach

func Attach(group *gin.RouterGroup, stg storage.Storage, logger *zap.Logger)

Types

type FoodHandler

type FoodHandler struct {
	// contains filtered or unexported fields
}

func NewFoodHander

func NewFoodHander(stg storage.Storage, logger *zap.Logger) *FoodHandler

func (*FoodHandler) DeleteAPI

func (r *FoodHandler) DeleteAPI(c *gin.Context)

func (*FoodHandler) GetAPI

func (r *FoodHandler) GetAPI(c *gin.Context)

func (*FoodHandler) ListAPI

func (r *FoodHandler) ListAPI(c *gin.Context)

func (*FoodHandler) SetAPI

func (r *FoodHandler) SetAPI(c *gin.Context)

type FoodItem

type FoodItem struct {
	Key     string  `json:"key"`
	Name    string  `json:"name"`
	Brand   string  `json:"brand"`
	Cal100  float64 `json:"cal100"`
	Prot100 float64 `json:"prot100"`
	Fat100  float64 `json:"fat100"`
	Carb100 float64 `json:"carb100"`
	Comment string  `json:"comment"`
}

type FoodSetAPIRequest

type FoodSetAPIRequest struct {
	Food   FoodItem `json:"food"`
	IsEdit bool     `json:"isEdit"`
}

Jump to

Keyboard shortcuts

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