mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-01-06 04:09:40 -06:00
add remaining services
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"path"
|
||||
"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"
|
||||
@@ -188,24 +190,13 @@ type AuthBearerSutureService struct {
|
||||
}
|
||||
|
||||
// NewAuthBearerSutureService creates a new gateway.AuthBearerSutureService
|
||||
func NewAuthBearer(ctx context.Context, o ...Option) AuthBearerSutureService {
|
||||
func NewAuthBearer(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.AuthBearer.Context = sctx
|
||||
return AuthBearerSutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,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"
|
||||
@@ -265,24 +267,13 @@ type GatewaySutureService struct {
|
||||
}
|
||||
|
||||
// NewGatewaySutureService creates a new gateway.GatewaySutureService
|
||||
func NewGateway(ctx context.Context, o ...Option) GatewaySutureService {
|
||||
func NewGateway(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.Gateway.Context = sctx
|
||||
return GatewaySutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"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"
|
||||
@@ -222,24 +224,13 @@ type GroupsProvider struct {
|
||||
}
|
||||
|
||||
// NewGroupsProvider creates a new storage.GroupsProvider
|
||||
func NewGroupsProvider(ctx context.Context, o ...Option) GroupsProvider {
|
||||
func NewGroupsProvider(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.Groups.Context = sctx
|
||||
return GroupsProvider{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"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"
|
||||
@@ -211,24 +213,13 @@ type SharingSutureService struct {
|
||||
}
|
||||
|
||||
// NewSharingSutureService creates a new store.SharingSutureService
|
||||
func NewSharing(ctx context.Context, o ...Option) SharingSutureService {
|
||||
func NewSharing(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.Sharing.Context = sctx
|
||||
return SharingSutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"path"
|
||||
"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"
|
||||
@@ -207,24 +209,13 @@ type StorageHomeSutureService struct {
|
||||
}
|
||||
|
||||
// NewStorageHomeSutureService creates a new storage.StorageHomeSutureService
|
||||
func NewStorageHome(ctx context.Context, o ...Option) StorageHomeSutureService {
|
||||
func NewStorageHome(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.StorageHome.Context = sctx
|
||||
return StorageHomeSutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ import (
|
||||
|
||||
"github.com/gofrs/uuid"
|
||||
"github.com/owncloud/ocis/storage/pkg/service/external"
|
||||
|
||||
ociscfg "github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/thejerf/suture"
|
||||
"github.com/cs3org/reva/cmd/revad/runtime"
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/oklog/run"
|
||||
@@ -228,23 +229,13 @@ type SutureService struct {
|
||||
}
|
||||
|
||||
// NewSutureService creates a new storagemetadata.SutureService
|
||||
func NewStorageMetadata(ctx context.Context, o ...Option) SutureService {
|
||||
func NewStorageMetadata(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.Storage.Reva.StorageMetadata.Context = sctx
|
||||
return SutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"path"
|
||||
"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"
|
||||
@@ -185,24 +187,13 @@ type StoragePublicLinkSutureService struct {
|
||||
}
|
||||
|
||||
// NewStoragePublicLinkSutureService creates a new storage.StoragePublicLinkSutureService
|
||||
func NewStoragePublicLink(ctx context.Context, o ...Option) StoragePublicLinkSutureService {
|
||||
func NewStoragePublicLink(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.StoragePublicLink.Context = sctx
|
||||
return StoragePublicLinkSutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ import (
|
||||
"path"
|
||||
"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"
|
||||
@@ -207,24 +209,13 @@ type StorageUsersSutureService struct {
|
||||
}
|
||||
|
||||
// NewStorageUsersSutureService creates a new storage.StorageUsersSutureService
|
||||
func NewStorageUsers(ctx context.Context, o ...Option) StorageUsersSutureService {
|
||||
func NewStorageUsers(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.StorageUsers.Context = sctx
|
||||
return StorageUsersSutureService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,8 @@ import (
|
||||
"path/filepath"
|
||||
"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"
|
||||
@@ -223,24 +225,13 @@ type UsersProviderService struct {
|
||||
}
|
||||
|
||||
// NewUsersProviderService creates a new storage.UsersProviderService
|
||||
func NewUsersProviderService(ctx context.Context, o ...Option) UsersProviderService {
|
||||
func NewUsersProviderService(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.Users.Context = sctx
|
||||
return UsersProviderService{
|
||||
ctx: sctx,
|
||||
cancel: cancel,
|
||||
cfg: cfg,
|
||||
cfg: cfg.Storage,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user