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.

downloader.go 877B

123456789101112131415161718192021222324
  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. GetTopics() ([]string, error)
  10. GetMilestones() ([]*Milestone, error)
  11. GetReleases() ([]*Release, error)
  12. GetLabels() ([]*Label, error)
  13. GetIssues(page, perPage int) ([]*Issue, bool, error)
  14. GetComments(issueNumber int64) ([]*Comment, error)
  15. GetPullRequests(page, perPage int) ([]*PullRequest, error)
  16. }
  17. // DownloaderFactory defines an interface to match a downloader implementation and create a downloader
  18. type DownloaderFactory interface {
  19. Match(opts MigrateOptions) (bool, error)
  20. New(opts MigrateOptions) (Downloader, error)
  21. }