diff pkg/imports/fd.go @ 4798:ca6a5f722471

Added Description method to most imports. Only for imports where information relevant to the administrator is relevant.
author Sascha Wilde <wilde@intevation.de>
date Fri, 25 Oct 2019 18:25:38 +0200
parents 5e38667f740c
children f32d086b5dbf
line wrap: on
line diff
--- a/pkg/imports/fd.go	Fri Oct 25 17:48:33 2019 +0200
+++ b/pkg/imports/fd.go	Fri Oct 25 18:25:38 2019 +0200
@@ -19,6 +19,7 @@
 	"encoding/json"
 	"fmt"
 	"io"
+	"strings"
 	"time"
 
 	"gemma.intevation.de/gemma/pkg/common"
@@ -46,6 +47,16 @@
 	Password string `json:"password,omitempty"`
 }
 
+func (fd *FairwayDimension) Description() (string, error) {
+
+	var descs []string
+
+	descs = append(descs, fd.URL)
+	descs = append(descs, fd.FeatureType)
+	descs = append(descs, fmt.Sprintf("LOS%d", fd.LOS))
+	return strings.Join(descs, "|"), nil
+}
+
 type fdTime struct{ time.Time }
 
 var guessFDTime = common.TimeParser([]string{