diff pkg/imports/wg.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 ca7f9c56697a
children f32d086b5dbf
line wrap: on
line diff
--- a/pkg/imports/wg.go	Fri Oct 25 17:48:33 2019 +0200
+++ b/pkg/imports/wg.go	Fri Oct 25 18:25:38 2019 +0200
@@ -17,6 +17,7 @@
 import (
 	"context"
 	"database/sql"
+	"strings"
 	"time"
 
 	"github.com/jackc/pgx/pgtype"
@@ -40,6 +41,14 @@
 	Insecure bool `json:"insecure"`
 }
 
+func (wg *WaterwayGauge) Description() (string, error) {
+
+	var descs []string
+
+	descs = append(descs, wg.URL)
+	return strings.Join(descs, "|"), nil
+}
+
 // WGJobKind is the unique name of this import job type.
 const WGJobKind JobKind = "wg"