VILLASweb-backend-go/common/responses.go
Sonja Happ e3651e34f0 - revise testing of widget enpoints
- add validators for widgets
- revise implementation of widget endpoints
- clean up testdata, serializers and response
- improve documentation for swaggo
2019-09-06 15:10:25 +02:00

43 lines
1 KiB
Go

package common
type FileResponse struct {
Name string `json:"name"`
ID uint `json:"id"`
Type string `json:"type"`
Size uint `json:"size"`
ImageWidth uint `json:"imageHeight"`
ImageHeight uint `json:"imageWidth"`
Date string `json:"date"`
WidgetID uint `json:"widgetID"`
SimulationModelID uint `json:"simulationModelID"`
}
type SignalResponse struct {
Name string `json:"name"`
Unit string `json:"unit"`
Index uint `json:"index"`
Direction string `json:"direction"`
SimulationModelID uint `json:"simulationModelID"`
}
// Response messages
type ResponseMsg struct {
Message string `json:"message"`
}
type ResponseMsgSignals struct {
Signals []SignalResponse `json:"signals"`
}
type ResponseMsgSignal struct {
Signal SignalResponse `json:"signal"`
}
type ResponseMsgFiles struct {
Files []FileResponse `json:"files"`
}
type ResponseMsgFile struct {
File FileResponse `json:"file"`
}