本站源代码
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

28 lines
964B

  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. import "code.gitea.io/gitea/modules/structs"
  7. // Downloader downloads the site repo informations
  8. type Downloader interface {
  9. GetRepoInfo() (*Repository, error)
  10. GetTopics() ([]string, error)
  11. GetMilestones() ([]*Milestone, error)
  12. GetReleases() ([]*Release, error)
  13. GetLabels() ([]*Label, error)
  14. GetIssues(page, perPage int) ([]*Issue, bool, error)
  15. GetComments(issueNumber int64) ([]*Comment, error)
  16. GetPullRequests(page, perPage int) ([]*PullRequest, error)
  17. }
  18. // DownloaderFactory defines an interface to match a downloader implementation and create a downloader
  19. type DownloaderFactory interface {
  20. Match(opts MigrateOptions) (bool, error)
  21. New(opts MigrateOptions) (Downloader, error)
  22. GitServiceType() structs.GitServiceType
  23. }
上海开阖软件有限公司 沪ICP备12045867号-1