Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate migration import command #249

Merged
merged 1 commit into from
May 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions changelog/unreleased/import.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Change: Integrate import command from ocis-migration

https://github.com/owncloud/ocis/pull/249
https://github.com/owncloud/ocis-migration
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require (
github.com/owncloud/ocis-graph-explorer v0.0.0-20200210111049-017eeb40dc0c
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200207094758-c866cafca7e5
github.com/owncloud/ocis-konnectd v0.3.1
github.com/owncloud/ocis-migration v0.0.0-20200504185909-72274a4f1449
github.com/owncloud/ocis-ocs v0.0.0-20200318181133-cc66a0531da7
github.com/owncloud/ocis-phoenix v0.6.0
github.com/owncloud/ocis-pkg/v2 v2.2.1
Expand Down
7 changes: 7 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ github.com/aws/aws-sdk-go v1.19.45/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpi
github.com/aws/aws-sdk-go v1.23.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.25.31/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.28.2/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo=
github.com/aws/aws-sdk-go v1.29.26/go.mod h1:1KvfttTE3SPKMpo8g2c6jL3ZKfXtFvKscTgahTma5Xg=
github.com/aws/aws-sdk-go v1.30.12 h1:KrjyosZvkpJjcwMk0RNxMZewQ47v7+ZkbQDXjWsJMs8=
github.com/aws/aws-sdk-go v1.30.12/go.mod h1:5zCpMtNQVjRREroY7sYe8lOMRSxkhG6MZveU8YkpAk0=
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f/go.mod h1:AuiFmCCPBSrqvVMvuqFuk0qogytodnVFVSN5CeJB8Gc=
Expand Down Expand Up @@ -217,9 +218,12 @@ github.com/crewjam/httperr v0.0.0-20190612203328-a946449404da/go.mod h1:+rmNIXRv
github.com/crewjam/saml v0.4.0 h1:gvSlboe4BO1APaU2eDdsbql3itRat310Q5qs2Seim2k=
github.com/crewjam/saml v0.4.0/go.mod h1:geQUbAAwmTKNJFDzoXaTssZHY26O89PHIm3K3YWjWnI=
github.com/cs3org/go-cs3apis v0.0.0-20191128165347-19746c015c83/go.mod h1:IsVGyZrOLUQD48JIhlM/xb3Vz6He5o2+W0ZTfUGY+IU=
github.com/cs3org/go-cs3apis v0.0.0-20200306065539-29abc33f5be0/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/go-cs3apis v0.0.0-20200408065125-6e23f3ecec0a/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/go-cs3apis v0.0.0-20200423154403-462ce7762d4a h1:+ucCukFjYS+L7Sg3GbXoD0M0Pz6CQEhJ9HC97GHc9TU=
github.com/cs3org/go-cs3apis v0.0.0-20200423154403-462ce7762d4a/go.mod h1:UXha4TguuB52H14EMoSsCqDj7k8a/t7g4gVP+bgY5LY=
github.com/cs3org/reva v0.0.2-0.20200115110931-4c7513415ec5/go.mod h1:Hk3eCcdhtv4eIhKvRK736fQuOyS1HuHnUcz0Dq6NK1A=
github.com/cs3org/reva v0.1.0/go.mod h1:8j6QyyAq9Kjj7RPfJb7M1aEmw5DmsuCJKUULXxYOyRo=
github.com/cs3org/reva v0.1.1-0.20200427161359-c1549a8110eb h1:NmIewIBHshEpn8q1pezRDoG2B7hRVgnWYLX1XSVjx1E=
github.com/cs3org/reva v0.1.1-0.20200427161359-c1549a8110eb/go.mod h1:I20R3mjgLU9y9Ol3pIckY3M948l7mkJORdpfSR9w9tM=
github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
Expand Down Expand Up @@ -731,6 +735,7 @@ github.com/oracle/oci-go-sdk v7.0.0+incompatible/go.mod h1:VQb79nF8Z2cwLkLS35ukw
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6 h1:lNCW6THrCKBiJBpz8kbVGjC7MgdCGKwuvBgc7LoD6sw=
github.com/orcaman/concurrent-map v0.0.0-20190826125027-8c72a8bb44f6/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/ory/fosite v0.30.2/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8=
github.com/ory/fosite v0.30.4/go.mod h1:Lq9qQ9Sl6mcea2Tt8J7PU+wUeFYPZ+vg7N3zPVKGbN8=
github.com/ory/fosite v0.31.0 h1:NZ0FA4ywPEYrCGLNVBAz2dq8vTacLDbbO4Iiy68WCKQ=
github.com/ory/fosite v0.31.0/go.mod h1:lSSqjo8Kr/U1P3kJWxsNGHmq7TnH/7pS1ijvQRT7G+g=
github.com/ory/go-convenience v0.1.0 h1:zouLKfF2GoSGnJwGq+PE/nJAE6dj2Zj5QlTgmMTsTS8=
Expand All @@ -754,6 +759,8 @@ github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200207094758-c866cafca7e5 h1:s4
github.com/owncloud/ocis-hello v0.1.0-alpha1.0.20200207094758-c866cafca7e5/go.mod h1:5E/ej0jrrU3SNaBUi7eu5iuVu5R4mTTMH1jXXiwnhqI=
github.com/owncloud/ocis-konnectd v0.3.1 h1:d886SLx6oR2ldNAvJC8TB/0+XnYCQiNFFTGzoR5giW0=
github.com/owncloud/ocis-konnectd v0.3.1/go.mod h1:kOBYY8P1s2KJRmUc//bThSFtSIH6NO1+6WogmrHcMRY=
github.com/owncloud/ocis-migration v0.0.0-20200504185909-72274a4f1449 h1:Q3o24JwiJVp1XpUXIt3MrJt6tGNgq9NVYFwW6gkhVq8=
github.com/owncloud/ocis-migration v0.0.0-20200504185909-72274a4f1449/go.mod h1:twno2cU2s4mNB5lKdWXkphrAA4dSF7Vn/m3K9aQpDcg=
github.com/owncloud/ocis-ocs v0.0.0-20200318181133-cc66a0531da7 h1:AHKA5xrnSBOdFjVTkaXzCyJl7vhOVklJD/b/T6Ky/oI=
github.com/owncloud/ocis-ocs v0.0.0-20200318181133-cc66a0531da7/go.mod h1:W0ry/qPP85Yw/KKd0IoOdjOI914bvzOaEeM9bzRuwaQ=
github.com/owncloud/ocis-phoenix v0.6.0 h1:p++botHH6WizAiMXELBTDRw9oVqcjyMliLf5BLgrDxw=
Expand Down
28 changes: 28 additions & 0 deletions pkg/command/migration-import.go
Original file line number Diff line number Diff line change
@@ -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)
}