comparison 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
comparison
equal deleted inserted replaced
4797:9a4f5f319419 4798:ca6a5f722471
15 package imports 15 package imports
16 16
17 import ( 17 import (
18 "context" 18 "context"
19 "database/sql" 19 "database/sql"
20 "strings"
20 "time" 21 "time"
21 22
22 "github.com/jackc/pgx/pgtype" 23 "github.com/jackc/pgx/pgtype"
23 24
24 "gemma.intevation.de/gemma/pkg/models" 25 "gemma.intevation.de/gemma/pkg/models"
36 // Passwort is the password to authenticate. 37 // Passwort is the password to authenticate.
37 Password string `json:"password"` 38 Password string `json:"password"`
38 // Insecure indicates if HTTPS traffic 39 // Insecure indicates if HTTPS traffic
39 // should validate certificates or not. 40 // should validate certificates or not.
40 Insecure bool `json:"insecure"` 41 Insecure bool `json:"insecure"`
42 }
43
44 func (wg *WaterwayGauge) Description() (string, error) {
45
46 var descs []string
47
48 descs = append(descs, wg.URL)
49 return strings.Join(descs, "|"), nil
41 } 50 }
42 51
43 // WGJobKind is the unique name of this import job type. 52 // WGJobKind is the unique name of this import job type.
44 const WGJobKind JobKind = "wg" 53 const WGJobKind JobKind = "wg"
45 54