2017-05-03 21:25:33 +00:00
|
|
|
// +build !enterprise
|
|
|
|
|
|
|
|
package server
|
|
|
|
|
|
|
|
import (
|
2017-05-04 00:02:08 +00:00
|
|
|
"github.com/cncd/queue"
|
|
|
|
"github.com/drone/drone/model"
|
2017-05-07 16:47:06 +00:00
|
|
|
"github.com/drone/drone/plugins/registry"
|
|
|
|
"github.com/drone/drone/plugins/secrets"
|
2017-05-03 21:25:33 +00:00
|
|
|
"github.com/drone/drone/store"
|
|
|
|
"github.com/drone/drone/store/datastore"
|
|
|
|
|
|
|
|
"github.com/urfave/cli"
|
|
|
|
)
|
|
|
|
|
|
|
|
func setupStore(c *cli.Context) store.Store {
|
|
|
|
return datastore.New(
|
|
|
|
c.String("driver"),
|
|
|
|
c.String("datasource"),
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2017-05-04 00:02:08 +00:00
|
|
|
func setupQueue(c *cli.Context, s store.Store) queue.Queue {
|
|
|
|
return model.WithTaskStore(queue.New(), s)
|
|
|
|
}
|
|
|
|
|
2017-05-07 16:47:06 +00:00
|
|
|
func setupSecretService(c *cli.Context, s store.Store) model.SecretService {
|
|
|
|
return secrets.New(s)
|
|
|
|
}
|
|
|
|
|
|
|
|
func setupRegistryService(c *cli.Context, s store.Store) model.RegistryService {
|
|
|
|
return registry.New(s)
|
|
|
|
}
|
|
|
|
|
|
|
|
func setupPubsub(c *cli.Context) {}
|
|
|
|
func setupStream(c *cli.Command) {}
|
|
|
|
func setupGatingService(c *cli.Command) {}
|