Documentation
¶
Overview ¶
Package source lists repositories from a source forge (GitHub, GitLab or Forgejo/Gitea) so they can be migrated into a target Forgejo instance.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
Capabilities reports which units a source repository has enabled, when the forge exposes that information. A nil pointer means "not reported", which callers treat as available so nothing is masked without evidence.
type Config ¶
type Config struct {
// BaseURL overrides the forge base URL; when empty a public default is used
// for GitHub and GitLab. It is required for Forgejo/Gitea.
BaseURL string
// Token authenticates against the source forge; may be empty for public data.
Token string
}
Config configures a Source client.
type Kind ¶
type Kind string
Kind identifies a supported source-forge type.
type Repo ¶
type Repo struct {
Owner string
Name string
CloneURL string
Description string
Private bool
Caps Capabilities
}
Repo is a single source repository to migrate.
type Source ¶
type Source interface {
// ListOrgRepos returns every repository owned by an organization/group.
ListOrgRepos(ctx context.Context, org string) ([]Repo, error)
// ListUserRepos returns every repository owned by a user.
ListUserRepos(ctx context.Context, user string) ([]Repo, error)
// GetRepo resolves a single owner/name repository's metadata.
GetRepo(ctx context.Context, owner, name string) (Repo, error)
// Service returns the Forgejo migration service identifier.
Service() string
}
Source lists and resolves repositories on a source forge.
Click to show internal directories.
Click to hide internal directories.