Mercurial > gemma
comparison pkg/imports/wa.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 | 5d7ce7f926eb |
children | f32d086b5dbf |
comparison
equal
deleted
inserted
replaced
4797:9a4f5f319419 | 4798:ca6a5f722471 |
---|---|
20 "encoding/json" | 20 "encoding/json" |
21 "errors" | 21 "errors" |
22 "fmt" | 22 "fmt" |
23 "io" | 23 "io" |
24 "strconv" | 24 "strconv" |
25 "strings" | |
25 "time" | 26 "time" |
26 | 27 |
27 "gemma.intevation.de/gemma/pkg/pgxutils" | 28 "gemma.intevation.de/gemma/pkg/pgxutils" |
28 "gemma.intevation.de/gemma/pkg/wfs" | 29 "gemma.intevation.de/gemma/pkg/wfs" |
29 ) | 30 ) |
41 SortBy string `json:"sort-by"` | 42 SortBy string `json:"sort-by"` |
42 // User is an optional username for Basic Auth. | 43 // User is an optional username for Basic Auth. |
43 User string `json:"user,omitempty"` | 44 User string `json:"user,omitempty"` |
44 // Password is an optional password for Basic Auth. | 45 // Password is an optional password for Basic Auth. |
45 Password string `json:"password,omitempty"` | 46 Password string `json:"password,omitempty"` |
47 } | |
48 | |
49 func (wa *WaterwayArea) Description() (string, error) { | |
50 | |
51 var descs []string | |
52 | |
53 descs = append(descs, wa.URL) | |
54 descs = append(descs, wa.FeatureType) | |
55 return strings.Join(descs, "|"), nil | |
46 } | 56 } |
47 | 57 |
48 // WAJobKind is the import queue type identifier. | 58 // WAJobKind is the import queue type identifier. |
49 const WAJobKind JobKind = "wa" | 59 const WAJobKind JobKind = "wa" |
50 | 60 |