2020-01-19 17:52:16 +01:00
|
|
|
// Copyright 2019 Vikunja and contriubtors. All rights reserved.
|
|
|
|
//
|
|
|
|
// This file is part of Vikunja.
|
|
|
|
//
|
|
|
|
// Vikunja is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// Vikunja is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License for more details.
|
|
|
|
//
|
|
|
|
// You should have received a copy of the GNU General Public License
|
|
|
|
// along with Vikunja. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
package migration
|
|
|
|
|
2020-01-26 18:08:06 +01:00
|
|
|
import (
|
|
|
|
"code.vikunja.io/api/pkg/user"
|
|
|
|
)
|
2020-01-19 17:52:16 +01:00
|
|
|
|
|
|
|
// Migrator is the basic migrator interface which is shared among all migrators
|
|
|
|
type Migrator interface {
|
|
|
|
// Migrate is the interface used to migrate a user's tasks from another platform to vikunja.
|
|
|
|
// The user object is the user who's tasks will be migrated.
|
2020-01-26 18:08:06 +01:00
|
|
|
Migrate(user *user.User) error
|
2020-01-19 17:52:16 +01:00
|
|
|
// AuthURL returns a url for clients to authenticate against.
|
|
|
|
// The use case for this are Oauth flows, where the server token should remain hidden and not
|
|
|
|
// known to the frontend.
|
|
|
|
AuthURL() string
|
2020-05-16 12:17:44 +02:00
|
|
|
// Title holds the name of the migration.
|
2020-01-20 20:48:46 +01:00
|
|
|
// This is used to show the name to users and to keep track of users who already migrated.
|
|
|
|
Name() string
|
2020-01-19 17:52:16 +01:00
|
|
|
}
|