From 2cbd699fbce9c215f3a0327699a5e25a5705cfeb Mon Sep 17 00:00:00 2001 From: Wouter Date: Wed, 24 Aug 2022 10:42:23 +0200 Subject: [PATCH] linting --- README.md | 50 +++++++-- images/concept.drawio.svg | 207 ++++++++++++++++++++++++++++++++++++ images/layout.drawio | 126 ---------------------- images/layout.svg | 1 - images/relations.drawio.svg | 121 +++++++++++++++++++++ images/relations.svg | 1 - 6 files changed, 368 insertions(+), 138 deletions(-) create mode 100644 images/concept.drawio.svg delete mode 100644 images/layout.drawio delete mode 100644 images/layout.svg create mode 100644 images/relations.drawio.svg delete mode 100644 images/relations.svg diff --git a/README.md b/README.md index fe9ad1f..ebed6fb 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,14 @@ # ogc-specifications ![GitHub license](https://img.shields.io/github/license/PDOK/ogc-specifications) -[![GitHub release](https://img.shields.io/github/release/PDOK/ogc-specifications.svg)](https://github.com/PDOK/ogc-specifications/releases) -[![Go Report Card](https://goreportcard.com/badge/PDOK/ogc-specifications)](https://goreportcard.com/report/PDOK/ogc-specifications) +[![GitHub +release](https://img.shields.io/github/release/PDOK/ogc-specifications.svg)](https://github.com/PDOK/ogc-specifications/releases) +[![Go Report +Card](https://goreportcard.com/badge/PDOK/ogc-specifications)](https://goreportcard.com/report/PDOK/ogc-specifications) -The package ogc-specifications is a implementation of the OGC Web Service Specifications as defined by the [OGC](https://www.ogc.org/). -This package has support for the following OGC Web Service Specifications Operations: +The package ogc-specifications is a implementation of the OGC Web Service +Specifications as defined by the [OGC](https://www.ogc.org/). This package has +support for the following OGC Web Service Specifications Operations: | Spec | Version | Operation | Request | Response | | --- | --- | --- | --- | --- | @@ -20,22 +23,32 @@ This package has support for the following OGC Web Service Specifications Operat ## Purpose -It will provide the user with OperationRequest, Capabilities (and limited to GetCapabilities OperationResponse) structs for the different OGC specifications that can be used with in a developers application, so one doesn't needs to create/build those complex structs for 'every' application that has more then 'simple' interaction with a OGC Web Service. It will allow the developer to parse XML documents and query strings like they are defined in the OGC specification an build go structs with it and it will generate XML documents and KVP query strings based on those structs. +It will provide the user with OperationRequest, Capabilities (and limited to +GetCapabilities OperationResponse) structs for the different OGC specifications +that can be used with in a developers application, so one doesn't needs to +create/build those complex structs for 'every' application that has more then +'simple' interaction with a OGC Web Service. It will allow the developer to +parse XML documents and query strings like they are defined in the OGC +specification an build go structs with it and it will generate XML documents and +KVP query strings based on those structs. -The different packages follow the same relations that are defined in the OGC specifications. For example the WFS 2.0.0 and the WMTS 1.0.0 share the underling WSC 1.1.0 package. +The different packages follow the same relations that are defined in the OGC +specifications. For example the WFS 2.0.0 and the WMTS 1.0.0 share the underling +WSC 1.1.0 package. ### OGC package relations -![ogc-spec-relations](images/relations.svg) +![ogc-spec-relations](images/relations.drawio.svg) ## Notice -This is still a 'work-in-progress' with the following major to do's: +:warning: This is still a 'work-in-progress' with the following major to do's: - [ ] WFS StoredQuery support - [ ] WMTS GetTile support - [ ] WCS GetCoverage support -- [ ] OGC response support for metadata calls like GetCapabilities and DescribeFeatureType +- [ ] OGC response support for metadata calls like GetCapabilities and + DescribeFeatureType - [ ] Sufficient validation support - [ ] Cleanup YAML parser - [ ] WMS Time & Elevation parameters @@ -78,10 +91,27 @@ For visualization use [pprof](https://github.com/google/pprof) - [Simple BBOX](./examples/simple-bbox/main.go) - [Exceptionreports](./examples/exceptionsreports/main.go) +## Concept + +![concept](images/concept.drawio.svg) + +THe idea is that OGC Webservice requests, both GET and POST, can be deserialize +to `structs`. Because the POST request contain a XML body they can be +directly unmarshelled to the 'matching' `struct`. The GET request have a number +of predefined Key Value Pairs (KVP) in their querystring that need to be +consumed for building the `struct`. + +From the created struct one can: + +1. Validate the struct itself (**grammatically**) +1. Validate the struct against a Capabilities document (**context**) +1. Generate a new request object (**formatting**) + ## How to Contribute Make a pull request... ## License -Distributed under MIT License, please see license file within the code for more details. +Distributed under MIT License, please see license file within the code for more +details. diff --git a/images/concept.drawio.svg b/images/concept.drawio.svg new file mode 100644 index 0000000..8c158ec --- /dev/null +++ b/images/concept.drawio.svg @@ -0,0 +1,207 @@ + + + + + + + + +
+
+
+ validate against +
+
+
+
+ + validate against + +
+
+ + + + +
+
+
+ Capabilities +
+
+
+
+ + Capabilities + +
+
+ + + + +
+
+
+ OperationRequest +
+
+
+
+ + OperationRequest + +
+
+ + + + +
+
+
+ USER +
+
+
+
+ + USER + +
+
+ + + + + +
+
+
+ proxies +
+
+
+
+ + proxies + +
+
+ + + + +
+
+
+ OperationRequestKVP +
+
+
+
+ + OperationRequestKVP + +
+
+ + + + + +
+
+
+ GET +
+ ( + + url.Values + + ) +
+
+
+
+ + GET... + +
+
+ + + + + +
+
+
+ POST +
+ ( + + [] + + + byte + + ) +
+
+
+
+ + POST... + +
+
+ + + + + + +
+
+
+ validate +
+ itself +
+
+
+
+ + validate... + +
+
+ + + + + +
+
+
+ App +
+
+
+
+ + App + +
+
+
+ + + + + Viewer does not support full SVG 1.1 + + + +
\ No newline at end of file diff --git a/images/layout.drawio b/images/layout.drawio deleted file mode 100644 index 4c850b1..0000000 --- a/images/layout.drawio +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/images/layout.svg b/images/layout.svg deleted file mode 100644 index a017dc4..0000000 --- a/images/layout.svg +++ /dev/null @@ -1 +0,0 @@ -
validate against
validate against
Capabilities
Capabilities
OperationRequest
OperationRequest
USER
USER
proxies
proxies
OperationRequestKVP
OperationRequestKVP
GET
(url.Values)
GET...
POST
([]byte)
POST...
validate
itself
validate...
Viewer does not support full SVG 1.1
\ No newline at end of file diff --git a/images/relations.drawio.svg b/images/relations.drawio.svg new file mode 100644 index 0000000..c55d9c2 --- /dev/null +++ b/images/relations.drawio.svg @@ -0,0 +1,121 @@ + + + + + + + +
+
+
+ WMS 1.3.0 +
+
+
+
+ + WMS 1.3.0 + +
+
+ + + + + + +
+
+
+ WMTS 1.0.0 +
+
+
+
+ + WMTS 1.0.0 + +
+
+ + + + + + +
+
+
+ WFS 2.0.0 +
+
+
+
+ + WFS 2.0.0 + +
+
+ + + + + + +
+
+
+ WCS 2.0.1 +
+
+
+
+ + WCS 2.0.1 + +
+
+ + + + +
+
+
+ WSC 1.1.0 +
+
+
+
+ + WSC 1.1.0 + +
+
+ + + + +
+
+
+ WSC 2.0.0 +
+
+
+
+ + WSC 2.0.0 + +
+
+
+ + + + + Viewer does not support full SVG 1.1 + + + +
\ No newline at end of file diff --git a/images/relations.svg b/images/relations.svg deleted file mode 100644 index 729b093..0000000 --- a/images/relations.svg +++ /dev/null @@ -1 +0,0 @@ -
WMS 1.3.0
WMS 1.3.0
WMTS 1.0.0
WMTS 1.0.0
WFS 2.0.0
WFS 2.0.0
WCS 2.0.1
WCS 2.0.1
WSC 1.1.0
WSC 1.1.0
WSC 2.0.0
WSC 2.0.0
Viewer does not support full SVG 1.1
\ No newline at end of file