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

@@ -9,6 +9,8 @@ import (
"path/filepath"
"time"
"github.com/thejerf/suture"
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
"github.com/cs3org/reva/cmd/revad/runtime"
"github.com/gofrs/uuid"
"github.com/micro/cli/v2"
@@ -208,24 +210,13 @@ type AuthBasicSutureService struct {
}
// NewAuthBasicSutureService creates a new store.AuthBasicSutureService
func NewAuthBasic(ctx context.Context, o ...Option) AuthBasicSutureService {
func NewAuthBasic(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.AuthBasic.Context = sctx
return AuthBasicSutureService{
ctx: sctx,
cancel: cancel,
cfg: cfg,
cfg: cfg.Storage,
}
}