Mercurial > gemma
changeset 4179:a376351d2774
Another round of doc strings to make 'golint' a little bit more happy with the imports package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Mon, 05 Aug 2019 18:14:41 +0200 |
parents | 51e90370eced |
children | 91cb4a7b1b13 |
files | pkg/imports/dmv.go pkg/imports/sec.go pkg/imports/st.go pkg/imports/ubn.go pkg/imports/ufa.go |
diffstat | 5 files changed, 14 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/pkg/imports/dmv.go Mon Aug 05 17:45:03 2019 +0200 +++ b/pkg/imports/dmv.go Mon Aug 05 18:14:41 2019 +0200 @@ -22,6 +22,8 @@ "gemma.intevation.de/gemma/pkg/models" ) +// DistanceMarksVirtual is a Job to import virtual distance marks +// from an external SOAP service into the database. type DistanceMarksVirtual struct { // URL is the URL of the SOAP service. URL string `json:"url"` @@ -34,13 +36,12 @@ Insecure bool `json:"insecure"` } +// DMVJobKind is the import queue type identifier. const DMVJobKind JobKind = "dmv" type dmvJobCreator struct{} -func init() { - RegisterJobCreator(DMVJobKind, dmvJobCreator{}) -} +func init() { RegisterJobCreator(DMVJobKind, dmvJobCreator{}) } func (dmvJobCreator) Description() string { return "distance marks virtual" } @@ -81,6 +82,8 @@ ` ) +// Do executes the actual downloading and importing +// of the virtual distance marks. func (dmv *DistanceMarksVirtual) Do( ctx context.Context, importID int64,
--- a/pkg/imports/sec.go Mon Aug 05 17:45:03 2019 +0200 +++ b/pkg/imports/sec.go Mon Aug 05 18:14:41 2019 +0200 @@ -22,6 +22,7 @@ "gemma.intevation.de/gemma/pkg/pgxutils" ) +// Section is a Job to create a section in the database. type Section struct { Name string `json:"name"` From models.Isrs `json:"from"` @@ -33,13 +34,12 @@ Date models.Date `json:"date-info"` } +// SECJobKind is the import queue type identifier. const SECJobKind JobKind = "sec" type secJobCreator struct{} -func init() { - RegisterJobCreator(SECJobKind, secJobCreator{}) -} +func init() { RegisterJobCreator(SECJobKind, secJobCreator{}) } func (secJobCreator) Description() string { return "section" }
--- a/pkg/imports/st.go Mon Aug 05 17:45:03 2019 +0200 +++ b/pkg/imports/st.go Mon Aug 05 18:14:41 2019 +0200 @@ -23,6 +23,7 @@ "gemma.intevation.de/gemma/pkg/pgxutils" ) +// Stretch is a Job to create a stretch in the database. type Stretch struct { Name string `json:"name"` From models.Isrs `json:"from"` @@ -35,6 +36,7 @@ Countries models.UniqueCountries `json:"countries"` } +// STJobKind is the import queue type identifier. const STJobKind JobKind = "st" type stJobCreator struct{}
--- a/pkg/imports/ubn.go Mon Aug 05 17:45:03 2019 +0200 +++ b/pkg/imports/ubn.go Mon Aug 05 18:14:41 2019 +0200 @@ -24,6 +24,8 @@ "gemma.intevation.de/gemma/pkg/soap/ifbn" ) +// UploadedBottleneck is a Job to import bottlenecks from +// an uploaded XML file into the database. type UploadedBottleneck struct { Dir string `json:"dir"` // Tolerance used for axis snapping
--- a/pkg/imports/ufa.go Mon Aug 05 17:45:03 2019 +0200 +++ b/pkg/imports/ufa.go Mon Aug 05 18:14:41 2019 +0200 @@ -32,9 +32,7 @@ type ufaJobCreator struct{} -func init() { - RegisterJobCreator(UFAJobKind, ufaJobCreator{}) -} +func init() { RegisterJobCreator(UFAJobKind, ufaJobCreator{}) } func (ufaJobCreator) Description() string { return "uploaded fairway availability"