Versions in this module Expand all Collapse all v0 v0.19.4 May 24, 2023 Changes in this version + const ReviewStateApproved + const ReviewStateChangesRequested + const ReviewStateCommented + const ReviewStatePending + const ReviewStateRequestReview + func IsErrNotSupported(err error) bool + func Load(filename string, data interface{}, validation bool) error + func NilMessenger(string, ...interface{}) + type Comment struct + CommentType string + Content string + Created time.Time + Index int64 + IssueIndex int64 + Meta map[string]interface{} + PosterEmail string + PosterID int64 + PosterName string + Reactions []*Reaction + Updated time.Time + func (c *Comment) GetExternalID() int64 + func (c *Comment) GetExternalName() string + type Commentable interface + GetContext func() DownloaderContext + type Downloader interface + FormatCloneURL func(opts MigrateOptions, remoteAddr string) (string, error) + GetAllComments func(page, perPage int) ([]*Comment, bool, error) + GetComments func(commentable Commentable) ([]*Comment, bool, error) + GetIssues func(page, perPage int) ([]*Issue, bool, error) + GetLabels func() ([]*Label, error) + GetMilestones func() ([]*Milestone, error) + GetPullRequests func(page, perPage int) ([]*PullRequest, bool, error) + GetReleases func() ([]*Release, error) + GetRepoInfo func() (*Repository, error) + GetReviews func(reviewable Reviewable) ([]*Review, error) + GetTopics func() ([]string, error) + SetContext func(context.Context) + SupportGetRepoComments func() bool + type DownloaderContext interface + type DownloaderFactory interface + GitServiceType func() structs.GitServiceType + New func(ctx context.Context, opts MigrateOptions) (Downloader, error) + type ErrNotSupported struct + Entity string + func (err ErrNotSupported) Error() string + type Issue struct + Assignees []string + Closed *time.Time + Content string + Context DownloaderContext + Created time.Time + ForeignIndex int64 + IsLocked bool + Labels []*Label + Milestone string + Number int64 + PosterEmail string + PosterID int64 + PosterName string + Reactions []*Reaction + Ref string + State string + Title string + Updated time.Time + func (issue *Issue) GetContext() DownloaderContext + func (issue *Issue) GetExternalID() int64 + func (issue *Issue) GetExternalName() string + func (issue *Issue) GetForeignIndex() int64 + func (issue *Issue) GetLocalIndex() int64 + type Label struct + Color string + Description string + Exclusive bool + Name string + type Messenger func(key string, args ...interface{}) + type MigrateOptions struct + AuthPassword string + AuthPasswordEncrypted string + AuthToken string + AuthTokenEncrypted string + AuthUsername string + CloneAddr string + CloneAddrEncrypted string + Comments bool + Description string + GitServiceType structs.GitServiceType + Issues bool + LFS bool + LFSEndpoint string + Labels bool + MigrateToRepoID int64 + Milestones bool + Mirror bool + MirrorInterval string + OriginalURL string + Private bool + PullRequests bool + ReleaseAssets bool + Releases bool + RepoName string + UID int + Wiki bool + type Milestone struct + Closed *time.Time + Created time.Time + Deadline *time.Time + Description string + State string + Title string + Updated *time.Time + type NullDownloader struct + func (n NullDownloader) FormatCloneURL(opts MigrateOptions, remoteAddr string) (string, error) + func (n NullDownloader) GetAllComments(page, perPage int) ([]*Comment, bool, error) + func (n NullDownloader) GetComments(commentable Commentable) ([]*Comment, bool, error) + func (n NullDownloader) GetIssues(page, perPage int) ([]*Issue, bool, error) + func (n NullDownloader) GetLabels() ([]*Label, error) + func (n NullDownloader) GetMilestones() ([]*Milestone, error) + func (n NullDownloader) GetPullRequests(page, perPage int) ([]*PullRequest, bool, error) + func (n NullDownloader) GetReleases() ([]*Release, error) + func (n NullDownloader) GetRepoInfo() (*Repository, error) + func (n NullDownloader) GetReviews(reviewable Reviewable) ([]*Review, error) + func (n NullDownloader) GetTopics() ([]string, error) + func (n NullDownloader) SetContext(_ context.Context) + func (n NullDownloader) SupportGetRepoComments() bool + type PullRequest struct + Assignees []string + Base PullRequestBranch + Closed *time.Time + Content string + Context DownloaderContext + Created time.Time + EnsuredSafe bool + ForeignIndex int64 + Head PullRequestBranch + IsLocked bool + Labels []*Label + MergeCommitSHA string + Merged bool + MergedTime *time.Time + Milestone string + Number int64 + PatchURL string + PosterEmail string + PosterID int64 + PosterName string + Reactions []*Reaction + State string + Title string + Updated time.Time + func (p *PullRequest) GetContext() DownloaderContext + func (p *PullRequest) GetExternalID() int64 + func (p *PullRequest) GetExternalName() string + func (p *PullRequest) GetForeignIndex() int64 + func (p *PullRequest) GetLocalIndex() int64 + func (p *PullRequest) IsForkPullRequest() bool + func (p PullRequest) GetGitRefName() string + type PullRequestBranch struct + CloneURL string + OwnerName string + Ref string + RepoName string + SHA string + func (p PullRequestBranch) RepoPath() string + type Reaction struct + Content string + UserID int64 + UserName string + func (r *Reaction) GetExternalID() int64 + func (r *Reaction) GetExternalName() string + type Release struct + Assets []*ReleaseAsset + Body string + Created time.Time + Draft bool + Name string + Prerelease bool + Published time.Time + PublisherEmail string + PublisherID int64 + PublisherName string + TagName string + TargetCommitish string + func (r *Release) GetExternalID() int64 + func (r *Release) GetExternalName() string + type ReleaseAsset struct + ContentType *string + Created time.Time + DownloadCount *int + DownloadFunc func() (io.ReadCloser, error) + DownloadURL *string + ID int64 + Name string + Size *int + Updated time.Time + type Repository struct + CloneURL string + DefaultBranch string + Description string + IsMirror bool + IsPrivate bool + Name string + OriginalURL string + Owner string + type RetryDownloader struct + RetryDelay int + RetryTimes int + func NewRetryDownloader(ctx context.Context, downloader Downloader, retryTimes, retryDelay int) *RetryDownloader + func (d *RetryDownloader) GetComments(commentable Commentable) ([]*Comment, bool, error) + func (d *RetryDownloader) GetIssues(page, perPage int) ([]*Issue, bool, error) + func (d *RetryDownloader) GetLabels() ([]*Label, error) + func (d *RetryDownloader) GetMilestones() ([]*Milestone, error) + func (d *RetryDownloader) GetPullRequests(page, perPage int) ([]*PullRequest, bool, error) + func (d *RetryDownloader) GetReleases() ([]*Release, error) + func (d *RetryDownloader) GetRepoInfo() (*Repository, error) + func (d *RetryDownloader) GetReviews(reviewable Reviewable) ([]*Review, error) + func (d *RetryDownloader) GetTopics() ([]string, error) + func (d *RetryDownloader) SetContext(ctx context.Context) + type Review struct + Comments []*ReviewComment + CommitID string + Content string + CreatedAt time.Time + ID int64 + IssueIndex int64 + Official bool + ReviewerID int64 + ReviewerName string + State string + func (r *Review) GetExternalID() int64 + func (r *Review) GetExternalName() string + type ReviewComment struct + CommitID string + Content string + CreatedAt time.Time + DiffHunk string + ID int64 + InReplyTo int64 + Line int + Position int + PosterID int64 + Reactions []*Reaction + TreePath string + UpdatedAt time.Time + type Reviewable interface + GetForeignIndex func() int64 + GetLocalIndex func() int64 + type Uploader interface + Close func() + CreateComments func(comments ...*Comment) error + CreateIssues func(issues ...*Issue) error + CreateLabels func(labels ...*Label) error + CreateMilestones func(milestones ...*Milestone) error + CreatePullRequests func(prs ...*PullRequest) error + CreateReleases func(releases ...*Release) error + CreateRepo func(repo *Repository, opts MigrateOptions) error + CreateReviews func(reviews ...*Review) error + CreateTopics func(topic ...string) error + Finish func() error + MaxBatchInsertSize func(tp string) int + Rollback func() error + SyncTags func() error