Mercurial > gemma
comparison pkg/imports/ufa.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 | a376351d2774 |
children | 59a99655f34d |
comparison
equal
deleted
inserted
replaced
4181:bd97dc2dceea | 4182:49012340336c |
---|---|
22 | 22 |
23 "gemma.intevation.de/gemma/pkg/soap" | 23 "gemma.intevation.de/gemma/pkg/soap" |
24 "gemma.intevation.de/gemma/pkg/soap/ifaf" | 24 "gemma.intevation.de/gemma/pkg/soap/ifaf" |
25 ) | 25 ) |
26 | 26 |
27 // UploadedFairwayAvailability is Job to extract | |
28 // fairway availability data from an XML file and stores | |
29 // it into the database. | |
27 type UploadedFairwayAvailability struct { | 30 type UploadedFairwayAvailability struct { |
28 Dir string | 31 Dir string |
29 } | 32 } |
30 | 33 |
34 // UFAJobKind is the unique name of this import job type. | |
31 const UFAJobKind JobKind = "ufa" | 35 const UFAJobKind JobKind = "ufa" |
32 | 36 |
33 type ufaJobCreator struct{} | 37 type ufaJobCreator struct{} |
34 | 38 |
35 func init() { RegisterJobCreator(UFAJobKind, ufaJobCreator{}) } | 39 func init() { RegisterJobCreator(UFAJobKind, ufaJobCreator{}) } |
49 | 53 |
50 func (ufaJobCreator) StageDone(context.Context, *sql.Tx, int64) error { | 54 func (ufaJobCreator) StageDone(context.Context, *sql.Tx, int64) error { |
51 return nil | 55 return nil |
52 } | 56 } |
53 | 57 |
58 // CleanUp removes the temporary files from the filesystem. | |
54 func (ufa *UploadedFairwayAvailability) CleanUp() error { | 59 func (ufa *UploadedFairwayAvailability) CleanUp() error { |
55 return os.RemoveAll(ufa.Dir) | 60 return os.RemoveAll(ufa.Dir) |
56 } | 61 } |
57 | 62 |
58 // Do executes the actual uploaded fairway availability import. | 63 // Do executes the actual uploaded fairway availability import. |