From 3fb872e5e7a9d34c08309335da6b904bef3f7a8c Mon Sep 17 00:00:00 2001 From: andig Date: Fri, 16 Aug 2019 18:31:54 +0200 Subject: [PATCH] Add PostDataResponse --- volkszaehler/model.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/volkszaehler/model.go b/volkszaehler/model.go index 9efd842..39d6252 100644 --- a/volkszaehler/model.go +++ b/volkszaehler/model.go @@ -73,6 +73,13 @@ type Exception struct { Code int `json:"code"` } +// PostDataResponse is the middleware response to POST requests to /data.json +type PostDataResponse struct { + Version string `json:"version"` + Exception Exception `json:"exception"` + Rows int `json:"rows"` +} + // UnmarshalJSON converts volkszaehler tuple into Tuple struct func (t *Tuple) UnmarshalJSON(b []byte) error { var a []*json.RawMessage