Mercurial > gemma
diff pkg/imports/wp.go @ 4182:49012340336c
Made 'golint' finally happy with imports package.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 06 Aug 2019 11:13:28 +0200 |
parents | 8b75ac5e243e |
children | ca6a5f722471 |
line wrap: on
line diff
--- a/pkg/imports/wp.go Mon Aug 05 18:32:54 2019 +0200 +++ b/pkg/imports/wp.go Tue Aug 06 11:13:28 2019 +0200 @@ -39,6 +39,9 @@ // to match from points to lines. const defaultPointToLinePrecision = 10 +// WaterwayProfiles is a Job to import waterway profiles +// from a given WFS service plus some uploaded CSV file +// and stores them into the database. type WaterwayProfiles struct { Dir string `json:"dir"` // URL the GetCapabilities URL of the WFS service. @@ -56,6 +59,7 @@ Password string `json:"password,omitempty"` } +// WPJobKind is the unique name of this import job type. const WPJobKind JobKind = "wp" type wpJobCreator struct{} @@ -149,10 +153,10 @@ return err } -func (wp *WaterwayProfiles) CleanUp() error { - return os.RemoveAll(wp.Dir) -} +// CleanUp deletes temporary files from the filesystem. +func (wp *WaterwayProfiles) CleanUp() error { return os.RemoveAll(wp.Dir) } +// Do performs the actual import. func (wp *WaterwayProfiles) Do( ctx context.Context, importID int64,