changeset 5711:2dd155cc95ec revive-cleanup

Fix all revive issue (w/o machine generated stuff).
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Tue, 20 Feb 2024 22:22:57 +0100
parents 37c8feeecb4d
children 6270951dda28
files cmd/gemma/main.go contrib/gmaggregate/main.go pkg/auth/doc.go pkg/auth/session.go pkg/common/doc.go pkg/config/config.go pkg/controllers/doc.go pkg/controllers/publish.go pkg/controllers/report.go pkg/controllers/routes.go pkg/controllers/system.go pkg/geoserver/doc.go pkg/imports/dma.go pkg/imports/dmv.go pkg/imports/doc.go pkg/imports/fa.go pkg/imports/gm.go pkg/imports/isr.go pkg/imports/queue.go pkg/imports/report.go pkg/imports/statsupdate.go pkg/imports/ufa.go pkg/imports/wa.go pkg/imports/wfsjob.go pkg/imports/wg.go pkg/imports/wp.go pkg/log/log.go pkg/mesh/doc.go pkg/middleware/doc.go pkg/misc/doc.go pkg/models/doc.go pkg/pgxutils/errors.go pkg/scheduler/doc.go pkg/wfs/doc.go pkg/wkb/data.go pkg/wkb/doc.go pkg/xlsx/doc.go
diffstat 37 files changed, 252 insertions(+), 57 deletions(-) [+]
line wrap: on
line diff
--- a/cmd/gemma/main.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/cmd/gemma/main.go	Tue Feb 20 22:22:57 2024 +0100
@@ -48,7 +48,7 @@
 	auth.Sessions = ss
 }
 
-func start(cmd *cobra.Command, args []string) {
+func start(_ *cobra.Command, _ []string) {
 
 	if lf := config.LogFile(); lf != "" {
 		log.SetupLog(lf, 0666)
--- a/contrib/gmaggregate/main.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/contrib/gmaggregate/main.go	Tue Feb 20 22:22:57 2024 +0100
@@ -455,7 +455,7 @@
 
 	if _, err := tx.ExecContext(ctx, createFilteredLogsSQL); err != nil {
 		tx.Rollback()
-		return fmt.Errorf("cannot create new log table: %v\n", err)
+		return fmt.Errorf("cannot create new log table: %v", err)
 	}
 
 	stmt, err := tx.PrepareContext(ctx, insertFilteredLogsSQL)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/auth/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package auth implements the auth infrastructure of the gemma server.
+package auth
--- a/pkg/auth/session.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/auth/session.go	Tue Feb 20 22:22:57 2024 +0100
@@ -69,7 +69,7 @@
 )
 
 // newSession creates a new session.
-func newSession(user, password string, roles Roles) *Session {
+func newSession(user string, roles Roles) *Session {
 
 	// Create the Claims
 	return &Session{
@@ -167,7 +167,7 @@
 		return "", nil, ErrInvalidRole
 	}
 	token := generateSessionKey()
-	session := newSession(user, password, roles)
+	session := newSession(user, roles)
 	Sessions.Add(token, session)
 	return token, session, nil
 }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/common/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package common implements some algorithms used in the gemma server.
+package common
--- a/pkg/config/config.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/config/config.go	Tue Feb 20 22:22:57 2024 +0100
@@ -12,6 +12,7 @@
 //  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
 //  * Bernhard E. Reiter <bernhard.reiter@intevation.de>
 
+// Package config holds the configuration of the gemma server.
 package config
 
 import (
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/controllers/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package controllers are the various HTTP endpoints of the gemma server.
+package controllers
--- a/pkg/controllers/publish.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/controllers/publish.go	Tue Feb 20 22:22:57 2024 +0100
@@ -21,7 +21,7 @@
 	mw "gemma.intevation.de/gemma/pkg/middleware"
 )
 
-func published(req *http.Request) (mw.JSONResult, error) {
+func published(*http.Request) (mw.JSONResult, error) {
 	return mw.JSONResult{
 		Result: struct {
 			Internal    []models.IntEntry   `json:"internal"`
--- a/pkg/controllers/report.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/controllers/report.go	Tue Feb 20 22:22:57 2024 +0100
@@ -32,7 +32,7 @@
 	"github.com/xuri/excelize/v2"
 )
 
-func listReports(req *http.Request) (jr mw.JSONResult, err error) {
+func listReports(*http.Request) (jr mw.JSONResult, err error) {
 	path := config.ReportPath()
 	if path == "" {
 		err = mw.JSONError{
--- a/pkg/controllers/routes.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/controllers/routes.go	Tue Feb 20 22:22:57 2024 +0100
@@ -36,7 +36,7 @@
 	var (
 		sysAdmin      = auth.EnsureRole("sys_admin")
 		waterwayAdmin = auth.EnsureRole("waterway_admin")
-		any           = auth.EnsureRole("sys_admin", "waterway_admin", "waterway_user")
+		anyUser       = auth.EnsureRole("sys_admin", "waterway_admin", "waterway_user")
 	)
 
 	// Password resets.
@@ -50,7 +50,7 @@
 		Methods(http.MethodGet)
 
 	// User management.
-	api.Handle("/users", any(&mw.JSONHandler{
+	api.Handle("/users", anyUser(&mw.JSONHandler{
 		Handle: listUsers,
 	})).Methods(http.MethodGet)
 
@@ -59,16 +59,16 @@
 		Handle: createUser,
 	})).Methods(http.MethodPost)
 
-	api.Handle("/users/{user:.+}", any(&mw.JSONHandler{
+	api.Handle("/users/{user:.+}", anyUser(&mw.JSONHandler{
 		Handle: listUser,
 	})).Methods(http.MethodGet)
 
-	api.Handle("/users/{user:.+}", any(&mw.JSONHandler{
+	api.Handle("/users/{user:.+}", anyUser(&mw.JSONHandler{
 		Input:  func(*http.Request) interface{} { return new(models.User) },
 		Handle: updateUser,
 	})).Methods(http.MethodPut)
 
-	api.Handle("/users/{user:.+}", any(&mw.JSONHandler{
+	api.Handle("/users/{user:.+}", anyUser(&mw.JSONHandler{
 		Input:  func(*http.Request) interface{} { return new(models.UserPatch) },
 		Handle: patchUser,
 	})).Methods(http.MethodPatch)
@@ -89,12 +89,12 @@
 	})).Methods(http.MethodGet)
 
 	// System Settings
-	api.Handle("/system/config", any(&mw.JSONHandler{
+	api.Handle("/system/config", anyUser(&mw.JSONHandler{
 		Handle: getSystemConfig,
 		NoConn: true,
 	})).Methods(http.MethodGet)
 
-	api.Handle("/system/settings", any(&mw.JSONHandler{
+	api.Handle("/system/settings", anyUser(&mw.JSONHandler{
 		Handle: getSystemSettings,
 	})).Methods(http.MethodGet)
 
@@ -104,17 +104,17 @@
 	})).Methods(http.MethodPut)
 
 	// Print templates
-	api.Handle("/templates", any(&mw.JSONHandler{
+	api.Handle("/templates", anyUser(&mw.JSONHandler{
 		Handle: listPrintTemplates,
 	})).Methods(http.MethodGet)
 
 	tTypes := "{type:" + strings.Join(templateTypes, "|") + "}"
 
-	api.Handle("/templates/"+tTypes, any(&mw.JSONHandler{
+	api.Handle("/templates/"+tTypes, anyUser(&mw.JSONHandler{
 		Handle: listPrintTemplates,
 	})).Methods(http.MethodGet)
 
-	api.Handle("/templates/"+tTypes+"/{name}", any(&mw.JSONHandler{
+	api.Handle("/templates/"+tTypes+"/{name}", anyUser(&mw.JSONHandler{
 		Handle: fetchPrintTemplate,
 	})).Methods(http.MethodGet)
 
@@ -140,7 +140,7 @@
 		ModifyResponse: proxyModifyResponse("/api/external/"),
 	})
 
-	externalAuth := any(external)
+	externalAuth := anyUser(external)
 
 	api.Handle("/external/{hash}/{url}", externalAuth).
 		Methods(
@@ -158,7 +158,7 @@
 		ModifyResponse: proxyModifyResponse("/api/internal/"),
 	})
 
-	internalAuth := any(
+	internalAuth := anyUser(
 		mw.ModifyQuery(internal, mw.InjectUser))
 
 	api.Handle("/internal/{hash}/{url}", internalAuth).
@@ -171,35 +171,35 @@
 			http.MethodGet, http.MethodPost,
 			http.MethodPut, http.MethodDelete)
 
-	api.Handle("/published", any(&mw.JSONHandler{
+	api.Handle("/published", anyUser(&mw.JSONHandler{
 		Handle: published,
 		NoConn: true,
 	})).Methods(http.MethodGet)
 
 	// Survey selection
-	api.Handle("/surveys", any(&mw.JSONHandler{
+	api.Handle("/surveys", anyUser(&mw.JSONHandler{
 		Handle: listSurveys,
 	})).Methods(http.MethodGet).Queries("id", "{id}")
 
-	api.Handle("/surveys", any(&mw.JSONHandler{
+	api.Handle("/surveys", anyUser(&mw.JSONHandler{
 		Handle: listSurveys,
 	})).Methods(http.MethodGet).Queries("name", "{name}", "date", "{date}")
 
 	// difference calculation
-	api.Handle("/diff", any(&mw.JSONHandler{
+	api.Handle("/diff", anyUser(&mw.JSONHandler{
 		Input:  func(*http.Request) interface{} { return new(models.DiffCalculationInput) },
 		Handle: diffCalculation,
 		NoConn: true,
 	})).Methods(http.MethodPost)
 
 	// Cross sections
-	api.Handle("/cross", any(&mw.JSONHandler{
+	api.Handle("/cross", anyUser(&mw.JSONHandler{
 		Input:  func(*http.Request) interface{} { return new(models.CrossSectionInput) },
 		Handle: crossSection,
 	})).Methods(http.MethodPost)
 
 	// Feature search
-	api.Handle("/search", any(&mw.JSONHandler{
+	api.Handle("/search", anyUser(&mw.JSONHandler{
 		Input:  func(*http.Request) interface{} { return new(models.SearchRequest) },
 		Handle: searchFeature,
 	})).Methods(http.MethodPost)
@@ -340,7 +340,7 @@
 	// Handler for reporting
 
 	api.Handle("/data/reports",
-		any(&mw.JSONHandler{
+		anyUser(&mw.JSONHandler{
 			Handle: listReports,
 			NoConn: true,
 		})).Methods(http.MethodGet)
@@ -361,23 +361,23 @@
 
 	// Handler to serve data to the client.
 
-	api.Handle("/data/{type:availability|fairway}/{kind:stretch|section|bottleneck}/{name:.+}", any(
+	api.Handle("/data/{type:availability|fairway}/{kind:stretch|section|bottleneck}/{name:.+}", anyUser(
 		mw.DBConn(http.HandlerFunc(fairwayAvailability)))).Methods(http.MethodGet)
 
-	api.Handle("/data/stretch/shape/{name:.+}", any(
+	api.Handle("/data/stretch/shape/{name:.+}", anyUser(
 		mw.DBConn(http.HandlerFunc(stretchShapeDownload)))).Methods(http.MethodGet)
 
-	api.Handle("/data/waterlevels/{gauge:.+}", any(
+	api.Handle("/data/waterlevels/{gauge:.+}", anyUser(
 		mw.DBConn(http.HandlerFunc(waterlevels)))).Methods(http.MethodGet)
 
-	api.Handle("/data/longterm-waterlevels/{gauge:.+}", any(
+	api.Handle("/data/longterm-waterlevels/{gauge:.+}", anyUser(
 		mw.DBConn(http.HandlerFunc(longtermWaterlevels)))).Methods(http.MethodGet)
 
 	// TODO: gauge should not contain '/'s.
-	api.Handle("/data/year-waterlevels/{gauge}/{year:[0-9]+}", any(
+	api.Handle("/data/year-waterlevels/{gauge}/{year:[0-9]+}", anyUser(
 		mw.DBConn(http.HandlerFunc(yearWaterlevels)))).Methods(http.MethodGet)
 
-	api.Handle("/data/nash-sutcliffe/{gauge:.+}", any(&mw.JSONHandler{
+	api.Handle("/data/nash-sutcliffe/{gauge:.+}", anyUser(&mw.JSONHandler{
 		Handle: nashSutcliffe,
 	})).Methods(http.MethodGet)
 
--- a/pkg/controllers/system.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/controllers/system.go	Tue Feb 20 22:22:57 2024 +0100
@@ -103,7 +103,7 @@
 	return
 }
 
-func getSystemConfig(req *http.Request) (jr mw.JSONResult, err error) {
+func getSystemConfig(*http.Request) (jr mw.JSONResult, err error) {
 
 	cfg := config.PublishedConfig()
 	if cfg == "" {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/geoserver/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package geoserver provides a way to setup a GeoServer remotely.
+package geoserver
--- a/pkg/imports/dma.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/dma.go	Tue Feb 20 22:22:57 2024 +0100
@@ -108,7 +108,7 @@
 // Do executes the actual fairway dimension import.
 func (dma *DistanceMarksAshore) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/dmv.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/dmv.go	Tue Feb 20 22:22:57 2024 +0100
@@ -89,7 +89,7 @@
 // of the virtual distance marks.
 func (dmv *DistanceMarksVirtual) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/imports/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package imports implements the various data imports.
+package imports
--- a/pkg/imports/fa.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/fa.go	Tue Feb 20 22:22:57 2024 +0100
@@ -338,7 +338,7 @@
 
 func doForFAs(
 	ctx context.Context,
-	bnIds bottlenecks,
+	bnIDs bottlenecks,
 	fas []*ifaf.FairwayAvailability,
 	tx *sql.Tx,
 	feedback Feedback,
@@ -371,7 +371,7 @@
 	for _, faRes := range fas {
 		// FIXME: The following test is propably unneccessary as already
 		//   done by DB constraints...  [sw]
-		if !bnIds.contains(faRes.Bottleneck_id) {
+		if !bnIDs.contains(faRes.Bottleneck_id) {
 			feedback.Warn("Bottleneck %s not found in database.", faRes.Bottleneck_id)
 			continue
 		}
@@ -479,7 +479,7 @@
 // Do executes the actual fairway availability import.
 func (fa *FairwayAvailability) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/gm.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/gm.go	Tue Feb 20 22:22:57 2024 +0100
@@ -257,7 +257,7 @@
 
 func storeGaugeMeasurements(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	fetch func() ([]*nts.RIS_Message_Type, error),
 	conn *sql.Conn,
 	feedback Feedback,
--- a/pkg/imports/isr.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/isr.go	Tue Feb 20 22:22:57 2024 +0100
@@ -130,7 +130,7 @@
 // Do executes the actual refreshing of the iso areas.
 func (isr *IsoRefresh) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/queue.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/queue.go	Tue Feb 20 22:22:57 2024 +0100
@@ -294,7 +294,7 @@
 	ctx context.Context,
 	importID int64,
 	conn *sql.Conn,
-	feedback Feedback,
+	_ Feedback,
 ) (interface{}, error) {
 
 	tx, err := conn.BeginTx(ctx, nil)
--- a/pkg/imports/report.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/report.go	Tue Feb 20 22:22:57 2024 +0100
@@ -164,7 +164,7 @@
 // Do executes the actual report generation.
 func (r *Report) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/statsupdate.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/statsupdate.go	Tue Feb 20 22:22:57 2024 +0100
@@ -86,7 +86,7 @@
 // Do executes the actual report generation.
 func (su *StatsUpdate) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/ufa.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/ufa.go	Tue Feb 20 22:22:57 2024 +0100
@@ -64,15 +64,15 @@
 // Do executes the actual uploaded fairway availability import.
 func (ufa *UploadedFairwayAvailability) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
 
 	fetch := func(
-		ctx context.Context,
-		tx *sql.Tx,
-		bns bottlenecks,
+		_ context.Context,
+		_ *sql.Tx,
+		_ bottlenecks,
 	) ([]*ifaf.FairwayAvailability, error) {
 
 		var response ifaf.Get_bottleneck_faResponse
--- a/pkg/imports/wa.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/wa.go	Tue Feb 20 22:22:57 2024 +0100
@@ -113,7 +113,7 @@
 // Do executes the actual waterway axis import.
 func (wa *WaterwayArea) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/wfsjob.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/wfsjob.go	Tue Feb 20 22:22:57 2024 +0100
@@ -128,7 +128,7 @@
 // Do implements the actual WFS import.
 func (wfj *WFSFeatureJob) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
--- a/pkg/imports/wg.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/wg.go	Tue Feb 20 22:22:57 2024 +0100
@@ -185,7 +185,7 @@
 // Do implements the actual import.
 func (wg *WaterwayGauge) Do(
 	ctx context.Context,
-	importID int64,
+	_ int64,
 	conn *sql.Conn,
 	feedback Feedback,
 ) (interface{}, error) {
@@ -595,10 +595,9 @@
 
 	if unchanged == len(gauges) {
 		return nil, UnchangedError("All gauges unchanged")
-	} else {
-		feedback.Info("Unchanged gauges: %d",
-			unchanged)
 	}
+	feedback.Info("Unchanged gauges: %d",
+		unchanged)
 
 	feedback.Info("Importing gauges took %s",
 		time.Since(start))
--- a/pkg/imports/wp.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/imports/wp.go	Tue Feb 20 22:22:57 2024 +0100
@@ -178,8 +178,7 @@
 	}
 	defer tx.Rollback()
 
-	if err := wp.downloadGeometries(
-		ctx, importID, tx, start, feedback); err != nil {
+	if err := wp.downloadGeometries(ctx, tx, feedback); err != nil {
 		return nil, fmt.Errorf("error downloading geometries: %v", err)
 	}
 
@@ -202,9 +201,7 @@
 
 func (wp *WaterwayProfiles) downloadGeometries(
 	ctx context.Context,
-	importID int64,
 	tx *sql.Tx,
-	start time.Time,
 	feedback Feedback,
 ) error {
 	feedback.Info("Start downloading geometries from WFS.")
--- a/pkg/log/log.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/log/log.go	Tue Feb 20 22:22:57 2024 +0100
@@ -11,6 +11,7 @@
 // Author(s):
 //  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
+// Package log is a leveled logger used in the gemma server.
 package log
 
 import (
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/mesh/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,16 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2025 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package mesh provides serveral data types to handle
+// the 3D models of the sounding results.
+package mesh
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/middleware/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 204 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package middleware implements some http handler middleware.
+package middleware
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/misc/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package misc implements miscellaneous helper functions.
+package misc
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/models/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package models implements several models used by the gemma server.
+package models
--- a/pkg/pgxutils/errors.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/pgxutils/errors.go	Tue Feb 20 22:22:57 2024 +0100
@@ -12,6 +12,7 @@
 //  * Tom Gottfried <tom.gottfried@intevation.de>
 //  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
 
+// Package pgxutils is used for error handling related to the pgx PostgreSQL driver.
 package pgxutils
 
 import (
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/scheduler/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package scheduler implements the cron like import scheduler.
+package scheduler
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/wfs/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2019 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package wfs implements downloading of WFS data.
+package wfs
--- a/pkg/wkb/data.go	Tue Feb 20 21:28:56 2024 +0100
+++ b/pkg/wkb/data.go	Tue Feb 20 22:22:57 2024 +0100
@@ -21,7 +21,7 @@
 )
 
 type (
-	// PointGeom is a 2D point,
+	// PointGeom is a 2D point.
 	PointGeom struct {
 		X float64
 		Y float64
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/wkb/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package wkb implements some WKB (Well Known Binary) data types.
+package wkb
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pkg/xlsx/doc.go	Tue Feb 20 22:22:57 2024 +0100
@@ -0,0 +1,15 @@
+// This is Free Software under GNU Affero General Public License v >= 3.0
+// without warranty, see README.md and license for details.
+//
+// SPDX-License-Identifier: AGPL-3.0-or-later
+// License-Filename: LICENSES/AGPL-3.0.txt
+//
+// Copyright (C) 2024 by via donau
+//   – Österreichische Wasserstraßen-Gesellschaft mbH
+// Software engineering by Intevation GmbH
+//
+// Author(s):
+//  * Sascha L. Teichmann <sascha.teichmann@intevation.de>
+
+// Package xlsx implements a little XLSX templating engine.
+package xlsx