add remaining services

Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
Jörn Friedrich Dreyer
2021-03-09 16:03:47 +00:00
parent 29910838c1
commit 2bfdab8735
24 changed files with 135 additions and 187 deletions

View File

@@ -6,10 +6,12 @@ import (
"strings"
"github.com/micro/cli/v2"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/owncloud/ocis/ocis-pkg/log"
"github.com/owncloud/ocis/web/pkg/config"
"github.com/owncloud/ocis/web/pkg/version"
"github.com/spf13/viper"
"github.com/thejerf/suture"
)
// Execute is the entry point for the web command.
@@ -109,13 +111,13 @@ type SutureService struct {
}
// NewSutureService creates a new web.SutureService
func NewSutureService(ctx context.Context, cfg *config.Config) SutureService {
func NewSutureService(ctx context.Context, cfg *ociscfg.Config) suture.Service {
sctx, cancel := context.WithCancel(ctx)
cfg.Context = sctx // propagate the context down to the go-micro services.
cfg.Web.Context = sctx
return SutureService{
ctx: sctx,
cancel: cancel,
cfg: cfg,
cfg: cfg.Web,
}
}