58 lines
1.5 KiB
Go
58 lines
1.5 KiB
Go
package main
|
|
|
|
type (
|
|
// Wails doesn't rlike generics... Fuck...
|
|
// WailsReturn[T interface{}] struct {
|
|
// Data T `json:'data'`
|
|
// Success bool `json:'success'`
|
|
// Error string `json:'error'`
|
|
// }
|
|
|
|
WailsFood struct {
|
|
Data []Food `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsFood1 struct {
|
|
Data Food `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsPer100 struct {
|
|
Data float32 `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsAggregateFood struct {
|
|
Data []AggregatedFood `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsFoodSearch struct {
|
|
Data []FoodSearch `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
WailsWeight struct {
|
|
Data []Weight `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsWeight1 struct {
|
|
Data Weight `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
WailsAggregateWeight struct {
|
|
Data []AggregatedWeight `json:"data"`
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
|
|
WailsGenericAck struct {
|
|
Success bool `json:"success"`
|
|
Error string `json:"error,omitempty"`
|
|
}
|
|
)
|