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

downloader.go 838 B

1234567891011121314151617181920212223
  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(start, limit int) ([]*Issue, error)
  13. GetComments(issueNumber int64) ([]*Comment, error)
  14. GetPullRequests(start, limit 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. }