summaryrefslogtreecommitdiff
path: root/src/helsinki.at/rhimport/importer.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/helsinki.at/rhimport/importer.go')
-rw-r--r--src/helsinki.at/rhimport/importer.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/helsinki.at/rhimport/importer.go b/src/helsinki.at/rhimport/importer.go
index 95e3e73..5eea054 100644
--- a/src/helsinki.at/rhimport/importer.go
+++ b/src/helsinki.at/rhimport/importer.go
@@ -34,7 +34,8 @@ import (
)
type ImportContext struct {
- Conf *Config
+ *Config
+ *RDDB
UserName string
Password string
Trusted bool
@@ -50,9 +51,10 @@ type ImportContext struct {
DeleteSourceFile bool
}
-func NewImportContext(conf *Config, user string, group string) *ImportContext {
+func NewImportContext(conf *Config, rddb *RDDB, user string, group string) *ImportContext {
ctx := new(ImportContext)
- ctx.Conf = conf
+ ctx.Config = conf
+ ctx.RDDB = rddb
ctx.UserName = user
ctx.Password = ""
ctx.Trusted = false
@@ -74,7 +76,7 @@ func (ctx *ImportContext) getPassword(cached bool) (err error) {
req.username = ctx.UserName
req.cached = cached
req.response = make(chan getPasswordResult)
- ctx.Conf.getPasswordChan <- req
+ ctx.RDDB.getPasswordChan <- req
res := <-req.response
if res.err != nil {