1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-24 08:02:18 +02:00

fixed missing func error in datastore

This commit is contained in:
Brad Rydzewski 2015-10-27 18:48:04 -07:00
parent e1daf0fd74
commit 810770388a

View File

@ -31,16 +31,30 @@ func Load(env envconfig.Env) store.Store {
}
func New(driver, config string) store.Store {
conn := Open(driver, config)
db := Open(driver, config)
return store.New(
driver,
&nodestore{conn},
&userstore{conn},
&repostore{conn},
&keystore{conn},
&buildstore{conn},
&jobstore{conn},
&logstore{conn},
&nodestore{db},
&userstore{db},
&repostore{db},
&keystore{db},
&buildstore{db},
&jobstore{db},
&logstore{db},
)
}
func From(db *sql.DB) store.Store {
var driver string
return store.New(
driver,
&nodestore{db},
&userstore{db},
&repostore{db},
&keystore{db},
&buildstore{db},
&jobstore{db},
&logstore{db},
)
}