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
+5 -14
View File
@@ -10,6 +10,8 @@ import (
"strings"
"time"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/thejerf/suture"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
@@ -336,24 +338,13 @@ type FrontendSutureService struct {
}
// NewFrontendSutureService creates a new frontend.FrontendSutureService
func NewFrontend(ctx context.Context, o ...Option) FrontendSutureService {
func NewFrontend(ctx context.Context, cfg *ociscfg.Config) suture.Service {
sctx, cancel := context.WithCancel(ctx)
cfg := config.New()
opts := newOptions(o...)
// merge config and options
cfg.Context = sctx
cfg.Log.Level = opts.LogLevel
cfg.Log.Pretty = opts.LogPretty
cfg.Log.Color = opts.LogColor
cfg.Context = sctx
cfg.Storage.Reva.Frontend.Context = sctx
return FrontendSutureService{
ctx: sctx,
cancel: cancel,
cfg: cfg,
cfg: cfg.Storage,
}
}