Mercurial > gemma
diff pkg/models/extservices.go @ 473:b2dea4e56ff1
/api/published (GET) returns a JSON document of the geo-services published by the gemma server.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 23 Aug 2018 13:24:26 +0200 |
parents | 25dd96101aeb |
children | c10c76c92797 |
line wrap: on
line diff
--- a/pkg/models/extservices.go Thu Aug 23 12:57:15 2018 +0200 +++ b/pkg/models/extservices.go Thu Aug 23 13:24:26 2018 +0200 @@ -10,9 +10,9 @@ ) type ExtEntry struct { - Name string - URL string - WFS bool + Name string `json:"name"` + URL string `json:"url"` + WFS bool `json:"wfs"` } type ExtServices struct { @@ -74,8 +74,9 @@ es.mu.Unlock() } -func ExternalWMS(entry PubEntry) bool { return !entry.WFS } -func ExternalWFS(entry PubEntry) bool { return entry.WFS } +func ExternalAll(ExtEntry) bool { return true } +func ExternalWMS(entry ExtEntry) bool { return !entry.WFS } +func ExternalWFS(entry ExtEntry) bool { return entry.WFS } func (es *ExtServices) Filter(accept func(ExtEntry) bool) []ExtEntry { es.mu.Lock()