mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-10-23 14:49:22 -04:00
toss config struct around
This commit is contained in:
3 files changed
+7
-3
No files matched your search
+4
-2
@@ -4,9 +4,11 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-accounts/pkg/config"
|
||||
"github.com/owncloud/ocis-hello/pkg/version"
|
||||
|
||||
// init store manager
|
||||
_ "github.com/owncloud/ocis-accounts/pkg/store"
|
||||
"github.com/owncloud/ocis-hello/pkg/version"
|
||||
)
|
||||
|
||||
// Execute is the entry point for the ocis-accounts command.
|
||||
@@ -24,7 +26,7 @@ func Execute() error {
|
||||
},
|
||||
|
||||
Commands: []*cli.Command{
|
||||
Server(),
|
||||
Server(config.New()),
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,12 @@ import (
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
"github.com/owncloud/ocis-accounts/pkg/config"
|
||||
"github.com/owncloud/ocis-accounts/pkg/micro/grpc"
|
||||
)
|
||||
|
||||
// Server is the entry point for the server command.
|
||||
func Server() *cli.Command {
|
||||
func Server(cfg *config.Config) *cli.Command {
|
||||
return &cli.Command{
|
||||
Name: "server",
|
||||
Usage: "Start accounts service",
|
||||
|
||||
@@ -12,6 +12,7 @@ import (
|
||||
// NewService creates a grpc service
|
||||
func NewService(c context.Context) grpc.Service {
|
||||
service := grpc.NewService(
|
||||
// TODO options come from configuration
|
||||
grpc.Name("accounts"),
|
||||
grpc.Namespace("com.owncloud"),
|
||||
grpc.Address("localhost:9999"),
|
||||
|
||||
Reference in new issue
Block a user