Documentation ¶
Overview ¶
package controllers
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterRoutesCoffeeMachine ¶
func RegisterRoutesCoffeeMachine(router *gin.RouterGroup)
register route for coffeemachine in gin framework
func RegisterRoutesDenomination ¶
func RegisterRoutesDenomination(router *gin.RouterGroup)
register route for coffeemachine in gin framework
func RegisterRoutesDrink ¶
func RegisterRoutesDrink(router *gin.RouterGroup)
register route for drink in gin framework
func RegisterRoutesIngredients ¶
func RegisterRoutesIngredients(router *gin.RouterGroup)
register route for /ingredient in gin framework
Types ¶
type CoffeeMachine ¶
type CoffeeMachine struct { Ingredients Ingredient `form:"Ingredients" json:"Ingredients"` Denomination Denomination `form:"Money" json:"Money" binding:"validateDenomination"` }
used for initialization of CoffeeMachine
type Denomination ¶
type Denomination struct { Half int `form:"Half" json:"Half" binding:"required_without_all=One Two Five Ten,validateDenomination"` One int `form:"One" json:"One" binding:"required_without_all=Half Two Five Ten,validateDenomination"` Two int `form:"Two" json:"Two" binding:"required_without_all=One Half Five Ten,validateDenomination"` Five int `form:"Five" json:"Five" binding:"required_without_all=One Two Half Ten,validateDenomination"` Ten int `form:"Ten" json:"Ten" binding:"required_without_all=One Two Five Half,validateDenomination"` }
type Drink ¶
type Drink struct { Water uint16 `form:"Water" json:"Water" binding:"required_without_all=Milk Sugar CoffeeBeans TeaBeans Cups Money"` Milk uint16 `form:"Milk" json:"Milk" binding:"required_without_all=Water Sugar CoffeeBeans TeaBeans Cups Money"` Sugar uint16 `form:"Sugar" json:"Sugar" binding:"required_without_all=Milk Water CoffeeBeans TeaBeans Cups Money"` CoffeeBeans uint16 `form:"CoffeeBeans" json:"CoffeeBeans" binding:"required_without_all=Milk Sugar Water TeaBeans Cups Money"` TeaBeans uint16 `form:"TeaBeans" json:"TeaBeans" binding:"required_without_all=Milk Sugar CoffeeBeans Water Cups Money"` Cups uint16 `form:"Cups" json:"Cups" binding:"required_without_all=Milk Sugar CoffeeBeans TeaBeans Water Money"` Money float64 `form:"Money" json:"Money" binding:"required_without_all=Milk Sugar CoffeeBeans TeaBeans Cups Water"` }
type Ingredient ¶
Click to show internal directories.
Click to hide internal directories.