Add the whole api stack for weight
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
package main
|
||||
|
||||
import "time"
|
||||
|
||||
type (
|
||||
// Wails doesn't rlike generics... Fuck...
|
||||
// WailsReturn[T interface{}] struct {
|
||||
@@ -31,18 +29,24 @@ type (
|
||||
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"`
|
||||
}
|
||||
|
||||
Weight struct {
|
||||
rowid int
|
||||
date time.Time
|
||||
weight float32
|
||||
}
|
||||
AggregatedWeight struct {
|
||||
period string
|
||||
amount float32
|
||||
}
|
||||
)
|
||||
|
Reference in New Issue
Block a user