mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-03-09 07:18:40 -05:00
Merge remote-tracking branch 'upstream/master' into search
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/ocdav/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,11 +13,11 @@ func OCDavCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "ocdav",
|
||||
Usage: "start ocdav",
|
||||
Category: "extensions",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
// Before: func(ctx *cli.Context) error {
|
||||
// return ParseStorageCommon(ctx, cfg)
|
||||
// },
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.OCDav(cfg.Storage)
|
||||
origCmd := command.OCDav(cfg.OCDav)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/appprovider/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageAppProviderCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-app-provider",
|
||||
Usage: "start storage app-provider service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.AppProviderWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.AppProvider(cfg.Storage)
|
||||
origCmd := command.AppProvider(cfg.AppProvider)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/auth-basic/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageAuthBasicCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-auth-basic",
|
||||
Usage: "start storage auth-basic service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.AuthBasicWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.AuthBasic(cfg.Storage)
|
||||
origCmd := command.AuthBasic(cfg.AuthBasic)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/auth-bearer/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageAuthBearerCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-auth-bearer",
|
||||
Usage: "Start storage auth-bearer service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.AuthBearerWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.AuthBearer(cfg.Storage)
|
||||
origCmd := command.AuthBearer(cfg.AuthBearer)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/auth-machine/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageAuthMachineCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-auth-machine",
|
||||
Usage: "start storage auth-machine service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.AuthMachineWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.AuthMachine(cfg.Storage)
|
||||
origCmd := command.AuthMachine(cfg.AuthMachine)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/frontend/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageFrontendCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-frontend",
|
||||
Usage: "start storage frontend",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.FrontendWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Frontend(cfg.Storage)
|
||||
origCmd := command.Frontend(cfg.Frontend)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/gateway/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -14,11 +14,11 @@ func StorageGatewayCommand(cfg *config.Config) *cli.Command {
|
||||
Usage: "start storage gateway",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.GatewayWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
// Before: func(ctx *cli.Context) error {
|
||||
// return ParseStorageCommon(ctx, cfg)
|
||||
// },
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Gateway(cfg.Storage)
|
||||
origCmd := command.Gateway(cfg.Gateway)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/group/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageGroupProviderCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-groupprovider",
|
||||
Usage: "start storage groupprovider service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.GroupsWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Groups(cfg.Storage)
|
||||
origCmd := command.Groups(cfg.Group)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-metadata/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,11 +13,8 @@ func StorageMetadataCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-metadata",
|
||||
Usage: "start storage and data service for metadata",
|
||||
Category: "extensions",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.StorageMetadata(cfg.Storage)
|
||||
origCmd := command.StorageMetadata(cfg.StorageMetadata)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-publiclink/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StoragePublicLinkCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-public-link",
|
||||
Usage: "start storage public link storage",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.StoragePublicLink(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.StoragePublicLink(cfg.Storage)
|
||||
origCmd := command.StoragePublicLink(cfg.StoragePublicLink)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-shares/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,11 +13,8 @@ func StorageSharesCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-shares",
|
||||
Usage: "start storage and data provider for shares jail",
|
||||
Category: "extensions",
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.StorageShares(cfg.Storage)
|
||||
origCmd := command.StorageShares(cfg.StorageShares)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/sharing/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageSharingCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-sharing",
|
||||
Usage: "start storage sharing service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.SharingWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Sharing(cfg.Storage)
|
||||
origCmd := command.Sharing(cfg.Sharing)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/user/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageUserProviderCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-userprovider",
|
||||
Usage: "start storage userprovider service",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.UsersWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.Users(cfg.Storage)
|
||||
origCmd := command.User(cfg.User)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/extensions/storage/pkg/command"
|
||||
"github.com/owncloud/ocis/extensions/storage-users/pkg/command"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis/pkg/register"
|
||||
"github.com/urfave/cli/v2"
|
||||
@@ -13,12 +13,8 @@ func StorageUsersCommand(cfg *config.Config) *cli.Command {
|
||||
Name: "storage-users",
|
||||
Usage: "start storage and data provider for /users mount",
|
||||
Category: "extensions",
|
||||
//Flags: flagset.StorageUsersWithConfig(cfg.Storage),
|
||||
Before: func(ctx *cli.Context) error {
|
||||
return ParseStorageCommon(ctx, cfg)
|
||||
},
|
||||
Action: func(c *cli.Context) error {
|
||||
origCmd := command.StorageUsers(cfg.Storage)
|
||||
origCmd := command.StorageUsers(cfg.StorageUsers)
|
||||
return handleOriginalAction(c, origCmd)
|
||||
},
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/owncloud/ocis/ocis-pkg/config"
|
||||
"github.com/owncloud/ocis/ocis-pkg/config/parser"
|
||||
"github.com/owncloud/ocis/ocis-pkg/shared"
|
||||
"github.com/urfave/cli/v2"
|
||||
)
|
||||
|
||||
func ParseStorageCommon(ctx *cli.Context, cfg *config.Config) error {
|
||||
if err := parser.ParseConfig(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if cfg.Storage.Log == nil && cfg.Commons != nil && cfg.Commons.Log != nil {
|
||||
cfg.Storage.Log = &shared.Log{
|
||||
Level: cfg.Commons.Log.Level,
|
||||
Pretty: cfg.Commons.Log.Pretty,
|
||||
Color: cfg.Commons.Log.Color,
|
||||
File: cfg.Commons.Log.File,
|
||||
}
|
||||
} else if cfg.Storage.Log == nil && cfg.Commons == nil {
|
||||
cfg.Storage.Log = &shared.Log{}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user