comparison pkg/models/imports.go @ 2020:491084efd15c unify_imports

Moved waterway(area|axis|gauge) import to imports file.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Thu, 24 Jan 2019 17:30:45 +0100
parents aeff01c6edec
children aa74466feaa8
comparison
equal deleted inserted replaced
2019:aeff01c6edec 2020:491084efd15c
12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de> 12 // * Sascha L. Teichmann <sascha.teichmann@intevation.de>
13 package models 13 package models
14 14
15 import "gemma.intevation.de/gemma/pkg/common" 15 import "gemma.intevation.de/gemma/pkg/common"
16 16
17 type BottleneckImport struct { 17 type (
18 URL string `json:"url"` 18 BottleneckImport struct {
19 Insecure bool `json:"insecure"` 19 URL string `json:"url"`
20 SendEmail bool `json:"send-email"` 20 Insecure bool `json:"insecure"`
21 Attributes common.Attributes `json:"attributes,omitempty"` 21 SendEmail bool `json:"send-email"`
22 } 22 Attributes common.Attributes `json:"attributes,omitempty"`
23 }
23 24
24 // GaugeMeasurementImport contains data used to define the endpoint 25 // GaugeMeasurementImport contains data used to define the endpoint
25 type GaugeMeasurementImport struct { 26 GaugeMeasurementImport struct {
26 URL string `json:"url"` 27 URL string `json:"url"`
27 Insecure bool `json:"insecure"` 28 Insecure bool `json:"insecure"`
28 SendEmail bool `json:"send-email"` 29 SendEmail bool `json:"send-email"`
29 // Attributes are optional attributes. 30 // Attributes are optional attributes.
30 Attributes common.Attributes `json:"attributes,omitempty"` 31 Attributes common.Attributes `json:"attributes,omitempty"`
31 } 32 }
32 33
33 // FairwayAvailabilityImport contains data used to define the endpoint 34 // FairwayAvailabilityImport contains data used to define the endpoint
34 type FairwayAvailabilityImport struct { 35 FairwayAvailabilityImport struct {
35 URL string `json:"url"` 36 URL string `json:"url"`
36 Insecure bool `json:"insecure"` 37 Insecure bool `json:"insecure"`
37 SendEmail bool `json:"send-email"` 38 SendEmail bool `json:"send-email"`
38 // Attributes are optional attributes. 39 // Attributes are optional attributes.
39 Attributes common.Attributes `json:"attributes,omitempty"` 40 Attributes common.Attributes `json:"attributes,omitempty"`
40 } 41 }
42
43 // WaterwayAxisImport specifies an import of the waterway axis.
44 WaterwayAxisImport struct {
45 // URL is the capabilities URL of the WFS.
46 URL string `json:"url"`
47 // FeatureType is the layer to use.
48 FeatureType string `json:"feature-type"`
49 // SortBy sorts the feature by this key.
50 SortBy string `json:"sort-by"`
51 // SendEmail is set to true if an email should be send after
52 // importing the axis.
53 SendEmail bool `json:"send-email"`
54 // Attributes are optional attributes.
55 Attributes common.Attributes `json:"attributes,omitempty"`
56 }
57
58 // WaterwayAreaImport specifies an import of the waterway area.
59 WaterwayAreaImport struct {
60 // URL is the capabilities URL of the WFS.
61 URL string `json:"url"`
62 // FeatureType is the layer to use.
63 FeatureType string `json:"feature-type"`
64 // SortBy sorts the feature by this key.
65 SortBy string `json:"sort-by"`
66 // SendEmail is set to true if an email should be send after
67 // importing the axis.
68 SendEmail bool `json:"send-email"`
69 // Attributes are optional attributes.
70 Attributes common.Attributes `json:"attributes,omitempty"`
71 }
72
73 // WaterwayAxisImport specifies an import of waterway gauges.
74 WaterwayGaugeImport struct {
75 // URL is the SOAP service URL.
76 URL string `json:"url"`
77 // SendEmail is set to true if an email should be send after
78 // importing the waterway gauges.
79 SendEmail bool `json:"send-email"`
80 // Attributes are optional attributes.
81 Attributes common.Attributes `json:"attributes,omitempty"`
82 }
83 )