Mercurial > gemma
comparison pkg/models/imports.go @ 2025:070ac9dd61a1 unify_imports
Bring manual imports to new import modeling.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Thu, 24 Jan 2019 18:19:43 +0100 |
parents | 6d9fbc62c5a6 |
children | 8d006afa7c1b |
comparison
equal
deleted
inserted
replaced
2024:6d9fbc62c5a6 | 2025:070ac9dd61a1 |
---|---|
10 // | 10 // |
11 // Author(s): | 11 // Author(s): |
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" | |
16 | |
17 type ( | 15 type ( |
18 BottleneckImport struct { | 16 BottleneckImport struct { |
19 URL string `json:"url"` | 17 URLType |
20 Insecure bool `json:"insecure"` | 18 QueueConfigurationType |
21 SendEmail bool `json:"send-email"` | |
22 Attributes common.Attributes `json:"attributes,omitempty"` | |
23 } | 19 } |
24 | 20 |
25 // GaugeMeasurementImport contains data used to define the endpoint | 21 // GaugeMeasurementImport contains data used to define the endpoint |
26 GaugeMeasurementImport struct { | 22 GaugeMeasurementImport struct { |
27 URL string `json:"url"` | 23 URLType |
28 Insecure bool `json:"insecure"` | 24 QueueConfigurationType |
29 SendEmail bool `json:"send-email"` | |
30 // Attributes are optional attributes. | |
31 Attributes common.Attributes `json:"attributes,omitempty"` | |
32 } | 25 } |
33 | 26 |
34 // FairwayAvailabilityImport contains data used to define the endpoint | 27 // FairwayAvailabilityImport contains data used to define the endpoint |
35 FairwayAvailabilityImport struct { | 28 FairwayAvailabilityImport struct { |
36 URL string `json:"url"` | 29 URLType |
37 Insecure bool `json:"insecure"` | 30 QueueConfigurationType |
38 SendEmail bool `json:"send-email"` | |
39 // Attributes are optional attributes. | |
40 Attributes common.Attributes `json:"attributes,omitempty"` | |
41 } | 31 } |
42 | 32 |
43 // WaterwayAxisImport specifies an import of the waterway axis. | 33 // WaterwayAxisImport specifies an import of the waterway axis. |
44 WaterwayAxisImport struct { | 34 WaterwayAxisImport struct { |
45 // URL is the capabilities URL of the WFS. | 35 URLType |
46 URL string `json:"url"` | 36 QueueConfigurationType |
37 | |
47 // FeatureType is the layer to use. | 38 // FeatureType is the layer to use. |
48 FeatureType string `json:"feature-type"` | 39 FeatureType string `json:"feature-type"` |
49 // SortBy sorts the feature by this key. | 40 // SortBy sorts the feature by this key. |
50 SortBy string `json:"sort-by"` | 41 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 } | 42 } |
57 | 43 |
58 // WaterwayAreaImport specifies an import of the waterway area. | 44 // WaterwayAreaImport specifies an import of the waterway area. |
59 WaterwayAreaImport struct { | 45 WaterwayAreaImport struct { |
60 // URL is the capabilities URL of the WFS. | 46 URLType |
61 URL string `json:"url"` | 47 QueueConfigurationType |
48 | |
62 // FeatureType is the layer to use. | 49 // FeatureType is the layer to use. |
63 FeatureType string `json:"feature-type"` | 50 FeatureType string `json:"feature-type"` |
64 // SortBy sorts the feature by this key. | 51 // SortBy sorts the feature by this key. |
65 SortBy string `json:"sort-by"` | 52 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 } | 53 } |
72 | 54 |
73 // WaterwayAxisImport specifies an import of waterway gauges. | 55 // WaterwayAxisImport specifies an import of waterway gauges. |
74 WaterwayGaugeImport struct { | 56 WaterwayGaugeImport struct { |
75 // URL is the SOAP service URL. | 57 URLType |
76 URL string `json:"url"` | 58 QueueConfigurationType |
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 } | 59 } |
83 | 60 |
84 // DistanceMarksVirtualImport specifies an import of distance marks virtual. | 61 // DistanceMarksVirtualImport specifies an import of distance marks virtual. |
85 DistanceMarksVirtualImport struct { | 62 DistanceMarksVirtualImport struct { |
86 // URL is the SOAP service URL. | 63 URLType |
87 URL string `json:"url"` | 64 QueueConfigurationType |
88 // SendEmail is set to true if an email should be send after | |
89 // importing the waterway gauges. | |
90 SendEmail bool `json:"send-email"` | |
91 // Attributes are optional attributes. | |
92 Attributes common.Attributes `json:"attributes,omitempty"` | |
93 } | 65 } |
94 | 66 |
95 // FairwayDimensionImport specifies an import of the waterway axis. | 67 // FairwayDimensionImport specifies an import of the waterway axis. |
96 FairwayDimensionImport struct { | 68 FairwayDimensionImport struct { |
97 // URL is the capabilities URL of the WFS. | 69 URLType |
98 URL string `json:"url"` | 70 QueueConfigurationType |
71 | |
99 // FeatureType is the layer to use. | 72 // FeatureType is the layer to use. |
100 FeatureType string `json:"feature-type"` | 73 FeatureType string `json:"feature-type"` |
101 // SortBy sorts the feature by this key. | 74 // SortBy sorts the feature by this key. |
102 SortBy string `json:"sort-by"` | 75 SortBy string `json:"sort-by"` |
103 // SendEmail is set to true if an email should be send after | |
104 // importing the axis. | |
105 SendEmail bool `json:"send-email"` | |
106 // LOS is the level of service provided by the wfs | 76 // LOS is the level of service provided by the wfs |
107 LOS int `json:"los"` | 77 LOS int `json:"los"` |
108 // MinWidth is the minimum width of the fairway for the specified LOS | 78 // MinWidth is the minimum width of the fairway for the specified LOS |
109 MinWidth int `json:"min-width"` | 79 MinWidth int `json:"min-width"` |
110 // MaxWidth is the maximum width of the fairway for the specified LOS | 80 // MaxWidth is the maximum width of the fairway for the specified LOS |
111 MaxWidth int `json:"max-width"` | 81 MaxWidth int `json:"max-width"` |
112 // Depth is the minimum depth of the fairway for the specified LOS | 82 // Depth is the minimum depth of the fairway for the specified LOS |
113 Depth int `json:"depth"` | 83 Depth int `json:"depth"` |
114 // SourceOrganization specifies the source of the entry | 84 // SourceOrganization specifies the source of the entry |
115 SourceOrganization string `json:"source-organization"` | 85 SourceOrganization string `json:"source-organization"` |
116 // Attributes are optional attributes. | |
117 Attributes common.Attributes `json:"attributes,omitempty"` | |
118 } | 86 } |
119 | 87 |
120 // DistanceMarksAshoreImport specifies an import of the distance marks. | 88 // DistanceMarksAshoreImport specifies an import of the distance marks. |
121 DistanceMarksAshoreImport struct { | 89 DistanceMarksAshoreImport struct { |
122 // URL is the capabilities URL of the WFS. | 90 URLType |
123 URL string `json:"url"` | 91 QueueConfigurationType |
92 | |
124 // FeatureType is the layer to use. | 93 // FeatureType is the layer to use. |
125 FeatureType string `json:"feature-type"` | 94 FeatureType string `json:"feature-type"` |
126 // SortBy sorts the feature by this key. | 95 // SortBy sorts the feature by this key. |
127 SortBy string `json:"sort-by"` | 96 SortBy string `json:"sort-by"` |
128 // SendEmail is set to true if an email should be send after | |
129 // importing the axis. | |
130 SendEmail bool `json:"send-email"` | |
131 // Attributes are optional attributes. | |
132 Attributes common.Attributes `json:"attributes,omitempty"` | |
133 } | 97 } |
134 | 98 |
135 StretchImport struct { | 99 StretchImport struct { |
100 QueueConfigurationType | |
101 | |
136 Name string `json:"name"` | 102 Name string `json:"name"` |
137 From Isrs `json:"from"` | 103 From Isrs `json:"from"` |
138 To Isrs `json:"to"` | 104 To Isrs `json:"to"` |
139 ObjNam string `json:"objnam"` | 105 ObjNam string `json:"objnam"` |
140 NObjNam *string `json:"nobjnam"` | 106 NObjNam *string `json:"nobjnam"` |
141 Source string `json:"source-organization"` | 107 Source string `json:"source-organization"` |
142 Date Date `json:"date-info"` | 108 Date Date `json:"date-info"` |
143 Countries UniqueCountries `json:"countries"` | 109 Countries UniqueCountries `json:"countries"` |
144 | |
145 SendEmail bool `json:"send-email"` | |
146 Attributes common.Attributes `json:"attributes,omitempty"` | |
147 } | 110 } |
148 ) | 111 ) |