You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
846 B

  1. // Copyright 2019 The Gitea Authors. All rights reserved.
  2. // Copyright 2018 Jonas Franz. All rights reserved.
  3. // Use of this source code is governed by a MIT-style
  4. // license that can be found in the LICENSE file.
  5. package base
  6. // Downloader downloads the site repo informations
  7. type Downloader interface {
  8. GetRepoInfo() (*Repository, error)
  9. GetMilestones() ([]*Milestone, error)
  10. GetReleases() ([]*Release, error)
  11. GetLabels() ([]*Label, error)
  12. GetIssues(page, perPage int) ([]*Issue, bool, error)
  13. GetComments(issueNumber int64) ([]*Comment, error)
  14. GetPullRequests(page, perPage int) ([]*PullRequest, error)
  15. }
  16. // DownloaderFactory defines an interface to match a downloader implementation and create a downloader
  17. type DownloaderFactory interface {
  18. Match(opts MigrateOptions) (bool, error)
  19. New(opts MigrateOptions) (Downloader, error)
  20. }