mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-26 15:39:18 -06:00
Integrate migration import command
This commit is contained in:
committed by
Ilja Neumann
parent
f379b27026
commit
eebf94fa8e
28
pkg/command/migration-import.go
Normal file
28
pkg/command/migration-import.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"github.com/micro/cli/v2"
|
||||
"github.com/owncloud/ocis-migration/pkg/command"
|
||||
toolconfig "github.com/owncloud/ocis-migration/pkg/config"
|
||||
"github.com/owncloud/ocis-migration/pkg/flagset"
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
)
|
||||
|
||||
// ImportCommand is the entrypoint for the accounts command.
|
||||
func ImportCommand(cfg *config.Config) *cli.Command {
|
||||
tc := toolconfig.New()
|
||||
return &cli.Command{
|
||||
Name: "import",
|
||||
Usage: "Import a user exported by owncloud/data_exporter",
|
||||
Flags: flagset.ImportWithConfig(tc),
|
||||
Action: func(c *cli.Context) error {
|
||||
importCommand := command.Import(tc)
|
||||
return cli.HandleAction(importCommand.Action, c)
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
register.AddCommand(ImportCommand)
|
||||
}
|
||||
Reference in New Issue
Block a user