Documentation
¶
Overview ¶
Package giteahttpmigration migrates selected Git repositories and their account/RBAC data through HTTP only.
Index ¶
- type APIError
- type Collaborator
- type ConflictPolicy
- type Credential
- type CredentialWriter
- type GitObject
- type JSONLCredentialFile
- type Migrator
- type MirrorRequest
- type Options
- type Organization
- type OrganizationPlan
- type Plan
- type Reference
- type Repository
- type RepositoryMirror
- type RepositoryPlan
- type RepositoryRef
- type Result
- type Team
- type TeamPlan
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collaborator ¶
type ConflictPolicy ¶
type ConflictPolicy string
const ( ConflictFail ConflictPolicy = "fail" ConflictSkip ConflictPolicy = "skip" )
type Credential ¶
type CredentialWriter ¶
type CredentialWriter interface {
WriteCredential(Credential) error
}
type JSONLCredentialFile ¶
type JSONLCredentialFile struct {
// contains filtered or unexported fields
}
func NewJSONLCredentialFile ¶
func NewJSONLCredentialFile(filePath string) (*JSONLCredentialFile, error)
func (*JSONLCredentialFile) Close ¶
func (f *JSONLCredentialFile) Close() error
func (*JSONLCredentialFile) WriteCredential ¶
func (f *JSONLCredentialFile) WriteCredential(credential Credential) error
type Migrator ¶
type Migrator struct {
// contains filtered or unexported fields
}
type MirrorRequest ¶
type Options ¶
type Options struct {
SourceURL string
SourceToken string
TargetURL string
TargetToken string
Repositories []string
ConflictPolicy ConflictPolicy
HTTPClient *http.Client
Mirror RepositoryMirror
}
type Organization ¶
type Organization struct {
Name string `json:"name"`
FullName string `json:"full_name"`
Email string `json:"email"`
Description string `json:"description"`
Website string `json:"website"`
Location string `json:"location"`
Visibility string `json:"visibility"`
RepoAdminChangeTeamAccess bool `json:"repo_admin_change_team_access"`
}
type OrganizationPlan ¶
type OrganizationPlan struct {
Organization Organization `json:"organization"`
Owner string `json:"owner"`
PublicMembers []string `json:"public_members,omitempty"`
Teams []TeamPlan `json:"teams"`
}
type Plan ¶
type Plan struct {
SourceURL string `json:"source_url"`
SourceLogin string `json:"source_login"`
TargetURL string `json:"target_url"`
Users []User `json:"users"`
Organizations []OrganizationPlan `json:"organizations"`
Repositories []RepositoryPlan `json:"repositories"`
Warnings []string `json:"warnings,omitempty"`
}
type Repository ¶
type Repository struct {
Owner *User `json:"owner"`
Name string `json:"name"`
FullName string `json:"full_name"`
Description string `json:"description"`
Private bool `json:"private"`
Internal bool `json:"internal"`
Empty bool `json:"empty"`
CloneURL string `json:"clone_url"`
DefaultBranch string `json:"default_branch"`
Archived bool `json:"archived"`
}
type RepositoryMirror ¶
type RepositoryMirror func(context.Context, MirrorRequest) error
type RepositoryPlan ¶
type RepositoryPlan struct {
Repository Repository `json:"repository"`
Refs []Reference `json:"refs,omitempty"`
Collaborators []Collaborator `json:"collaborators,omitempty"`
}
type RepositoryRef ¶
func (RepositoryRef) String ¶
func (r RepositoryRef) String() string
type Result ¶
type Result struct {
UsersCreated int `json:"users_created"`
UsersSkipped int `json:"users_skipped"`
OrganizationsCreated int `json:"organizations_created"`
OrganizationsSkipped int `json:"organizations_skipped"`
TeamsCreated int `json:"teams_created"`
TeamsReused int `json:"teams_reused"`
RepositoriesCreated int `json:"repositories_created"`
RepositoriesSkipped int `json:"repositories_skipped"`
TeamMemberships int `json:"team_memberships_applied"`
TeamRepositories int `json:"team_repositories_applied"`
Collaborators int `json:"collaborators_applied"`
PublicMemberships int `json:"public_memberships_applied"`
RefsVerified int `json:"refs_verified"`
}
type Team ¶
type Team struct {
ID int64 `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
IncludesAllRepositories bool `json:"includes_all_repositories"`
Permission string `json:"permission"`
Units []string `json:"units,omitempty"`
UnitsMap map[string]string `json:"units_map,omitempty"`
CanCreateOrgRepo bool `json:"can_create_org_repo"`
}
type TeamPlan ¶
type TeamPlan struct {
Team Team `json:"team"`
Members []string `json:"members"`
Repositories []RepositoryRef `json:"repositories"`
}
type User ¶
type User struct {
UserName string `json:"login"`
FullName string `json:"full_name"`
Email string `json:"email"`
Visibility string `json:"visibility"`
Restricted bool `json:"restricted"`
IsAdmin bool `json:"is_admin"`
IsActive bool `json:"active"`
ProhibitLogin bool `json:"prohibit_login"`
Created time.Time `json:"created"`
}
Click to show internal directories.
Click to hide internal directories.