2019-05-07 09:12:51 +08:00
|
|
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
|
|
// Copyright 2018 Jonas Franz. All rights reserved.
|
2022-11-27 13:20:29 -05:00
|
|
|
// SPDX-License-Identifier: MIT
|
2019-05-07 09:12:51 +08:00
|
|
|
|
2021-11-16 23:25:33 +08:00
|
|
|
package migration
|
2019-05-07 09:12:51 +08:00
|
|
|
|
2025-02-07 06:37:32 +01:00
|
|
|
import "context"
|
|
|
|
|
2021-07-08 07:38:13 -04:00
|
|
|
// Uploader uploads all the information of one repository
|
2019-05-07 09:12:51 +08:00
|
|
|
type Uploader interface {
|
2019-07-07 03:24:50 +08:00
|
|
|
MaxBatchInsertSize(tp string) int
|
2025-02-07 06:37:32 +01:00
|
|
|
CreateRepo(ctx context.Context, repo *Repository, opts MigrateOptions) error
|
|
|
|
CreateTopics(ctx context.Context, topic ...string) error
|
|
|
|
CreateMilestones(ctx context.Context, milestones ...*Milestone) error
|
|
|
|
CreateReleases(ctx context.Context, releases ...*Release) error
|
|
|
|
SyncTags(ctx context.Context) error
|
|
|
|
CreateLabels(ctx context.Context, labels ...*Label) error
|
|
|
|
CreateIssues(ctx context.Context, issues ...*Issue) error
|
|
|
|
CreateComments(ctx context.Context, comments ...*Comment) error
|
|
|
|
CreatePullRequests(ctx context.Context, prs ...*PullRequest) error
|
|
|
|
CreateReviews(ctx context.Context, reviews ...*Review) error
|
2019-05-07 09:12:51 +08:00
|
|
|
Rollback() error
|
2025-02-07 06:37:32 +01:00
|
|
|
Finish(ctx context.Context) error
|
2019-11-13 07:01:19 +00:00
|
|
|
Close()
|
2019-05-07 09:12:51 +08:00
|
|
|
}
|