Example #1
0
File: store.go Project: elia/drone
// From creates a datastore from an existing database connection.
func From(db *sql.DB) store.Store {
	return store.New(
		&nodestore{db},
		&userstore{db},
		&repostore{db},
		&keystore{db},
		&buildstore{db},
		&jobstore{db},
		&logstore{db},
	)
}
Example #2
0
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},
	)
}
Example #3
0
func New(driver, config string) store.Store {
	db := Open(driver, config)
	return store.New(
		driver,
		&nodestore{db},
		&userstore{db},
		&repostore{db},
		&keystore{db},
		&buildstore{db},
		&jobstore{db},
		&logstore{db},
	)
}