diff options
Diffstat (limited to 'src/hub')
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5srvWeb.go | 4 | ||||
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5store_test.go | 6 | ||||
-rw-r--r-- | src/hub/src/spreadspace.org/sfive/s5typesApi.go | 14 |
3 files changed, 12 insertions, 12 deletions
diff --git a/src/hub/src/spreadspace.org/sfive/s5srvWeb.go b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go index 1a16515..8ecb673 100644 --- a/src/hub/src/spreadspace.org/sfive/s5srvWeb.go +++ b/src/hub/src/spreadspace.org/sfive/s5srvWeb.go @@ -55,7 +55,7 @@ func (srv Server) webGetSourcesList(c web.C, w http.ResponseWriter, r *http.Requ http.Error(w, fmt.Sprintf("failed to retrieve %s: %v", resourceName, err), http.StatusInternalServerError) return } - jsonString, err := json.Marshal(DataContainer{values}) + jsonString, err := json.Marshal(GenericDataContainer{values}) if err != nil { http.Error(w, fmt.Sprintf("failed to marshal %s: %v", resourceName, err), http.StatusInternalServerError) return @@ -94,7 +94,7 @@ func (srv Server) webGetUpdateList(c web.C, w http.ResponseWriter, r *http.Reque http.Error(w, fmt.Sprintf("failed to retrieve %s: %v", resourceName, err), http.StatusInternalServerError) return } - jsonString, err := json.Marshal(DataContainer{values}) + jsonString, err := json.Marshal(GenericDataContainer{values}) if err != nil { http.Error(w, fmt.Sprintf("failed to marshal %s: %v", resourceName, err), http.StatusInternalServerError) return diff --git a/src/hub/src/spreadspace.org/sfive/s5store_test.go b/src/hub/src/spreadspace.org/sfive/s5store_test.go index c78de6b..481b189 100644 --- a/src/hub/src/spreadspace.org/sfive/s5store_test.go +++ b/src/hub/src/spreadspace.org/sfive/s5store_test.go @@ -40,6 +40,12 @@ import ( "time" ) +const ( + QualityLow = "low" + QualityMedium = "medium" + QualityHigh = "high" +) + var ( __boltPath = "/run/s5hub_testing_db.bolt" ) diff --git a/src/hub/src/spreadspace.org/sfive/s5typesApi.go b/src/hub/src/spreadspace.org/sfive/s5typesApi.go index 8b214a8..233659a 100644 --- a/src/hub/src/spreadspace.org/sfive/s5typesApi.go +++ b/src/hub/src/spreadspace.org/sfive/s5typesApi.go @@ -34,12 +34,6 @@ package sfive import "time" -const ( - QualityLow = "low" - QualityMedium = "medium" - QualityHigh = "high" -) - type StreamId struct { ContentId string `json:"content-id"` Format string `json:"format"` @@ -79,10 +73,6 @@ type DataUpdateFull struct { DataUpdate } -type DataContainer struct { - Data interface{} `json:"data"` -} - type DataUpdateFullContainer struct { Data []DataUpdateFull `json:"data"` } @@ -99,3 +89,7 @@ func (duf *DataUpdateFull) CopyFromUpdate(du *DataUpdate) { duf.Duration = du.Duration duf.Data = du.Data } + +type GenericDataContainer struct { + Data interface{} `json:"data"` +} |