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.
42 lines
1.3 KiB
42 lines
1.3 KiB
6 years ago
|
// Copyright 2019 The Gitea Authors. All rights reserved.
|
||
|
// Copyright 2018 Jonas Franz. All rights reserved.
|
||
|
// Use of this source code is governed by a MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
3 years ago
|
package migration
|
||
6 years ago
|
|
||
5 years ago
|
import (
|
||
5 years ago
|
"context"
|
||
5 years ago
|
|
||
|
"code.gitea.io/gitea/modules/structs"
|
||
|
)
|
||
5 years ago
|
|
||
4 years ago
|
// GetCommentOptions represents an options for get comment
|
||
|
type GetCommentOptions struct {
|
||
3 years ago
|
Context IssueContext
|
||
|
Page int
|
||
|
PageSize int
|
||
4 years ago
|
}
|
||
|
|
||
3 years ago
|
// Downloader downloads the site repo information
|
||
6 years ago
|
type Downloader interface {
|
||
5 years ago
|
SetContext(context.Context)
|
||
6 years ago
|
GetRepoInfo() (*Repository, error)
|
||
5 years ago
|
GetTopics() ([]string, error)
|
||
6 years ago
|
GetMilestones() ([]*Milestone, error)
|
||
|
GetReleases() ([]*Release, error)
|
||
|
GetLabels() ([]*Label, error)
|
||
6 years ago
|
GetIssues(page, perPage int) ([]*Issue, bool, error)
|
||
4 years ago
|
GetComments(opts GetCommentOptions) ([]*Comment, bool, error)
|
||
|
SupportGetRepoComments() bool
|
||
4 years ago
|
GetPullRequests(page, perPage int) ([]*PullRequest, bool, error)
|
||
3 years ago
|
GetReviews(pullRequestContext IssueContext) ([]*Review, error)
|
||
4 years ago
|
FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error)
|
||
6 years ago
|
}
|
||
|
|
||
|
// DownloaderFactory defines an interface to match a downloader implementation and create a downloader
|
||
|
type DownloaderFactory interface {
|
||
4 years ago
|
New(ctx context.Context, opts MigrateOptions) (Downloader, error)
|
||
5 years ago
|
GitServiceType() structs.GitServiceType
|
||
6 years ago
|
}
|