cafeteria

package
v0.0.0-...-1c6cba0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Gluten = Wheat | Rye | Barley | Oats | Spelt | KhorasanWheat
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cafeteria

type Cafeteria interface {
	Meals(ctx context.Context, date taro.Date) ([]Meal, error)
}

type Diet

type Diet uint64
const (
	Vegetarian Diet = 1 << iota
	Vegan
	Regional
	Organic

	Coloring
	Preservative
	Antioxidant
	FlavorEnhancer
	Sulphurized
	Blackened
	Waxed
	Phosphate
	Sweetener
	Phenylalanine
	CocoabasedFatGlaze
	Caffeine
	Quinine
	AnimalGelatin
	AnimalRennet
	Carmine
	Sepia
	Honey

	Wheat
	Rye
	Barley
	Oats
	Spelt
	KhorasanWheat
	Crustacean
	ChickenEgg
	Fish
	Peanut
	Soy
	Milk
	Almond
	Hazel
	Walnut
	Cashew
	Pekan
	BrazilNut
	Pistachio
	Macadamia
	Celery
	Mustard
	Sesame
	Sulfur
	Lupine
	Mollusk

	Alcohol
	Poultry
	Garlic
	Rabbit
	Lamb
	Beef
	Pork
	GameMeat
	WildBoar
)

type Dish

type Dish struct {
	Food

	StudentPrice  Price `json:"studentPrice"`
	EmployeePrice Price `json:"employeePrice"`
	GuestPrice    Price `json:"guestPrice"`

	Ingredients []Food `json:"ingredients"`
}

type Food

type Food struct {
	Name        string `json:"name"`
	Description string `json:"description"`
	Diet        Diet   `json:"diet"`
}

type Meal

type Meal struct {
	Time   MealTime `json:"time,omitempty"`
	Dishes []Dish   `json:"dishes"`
}

type MealTime

type MealTime uint8
const (
	Morning MealTime
	Noon
	Afternoon
	Evening
)

func (MealTime) MarshalText

func (m MealTime) MarshalText() ([]byte, error)

type Price

type Price struct {
	Value    float32 `json:"value"`
	Currency string  `json:"currency"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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