gitea源码

uploader.go 985B

1234567891011121314151617181920212223242526
  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Copyright 2018 Jonas Franz. All rights reserved.
  3. // SPDX-License-Identifier: MIT
  4. package migration
  5. import "context"
  6. // Uploader uploads all the information of one repository
  7. type Uploader interface {
  8. MaxBatchInsertSize(tp string) int
  9. CreateRepo(ctx context.Context, repo *Repository, opts MigrateOptions) error
  10. CreateTopics(ctx context.Context, topic ...string) error
  11. CreateMilestones(ctx context.Context, milestones ...*Milestone) error
  12. CreateReleases(ctx context.Context, releases ...*Release) error
  13. SyncTags(ctx context.Context) error
  14. CreateLabels(ctx context.Context, labels ...*Label) error
  15. CreateIssues(ctx context.Context, issues ...*Issue) error
  16. CreateComments(ctx context.Context, comments ...*Comment) error
  17. CreatePullRequests(ctx context.Context, prs ...*PullRequest) error
  18. CreateReviews(ctx context.Context, reviews ...*Review) error
  19. Rollback() error
  20. Finish(ctx context.Context) error
  21. Close()
  22. }