Documentation
¶
Index ¶
- Constants
- func AddBasicAuthToURL(originalURL, username, password string) (string, error)
- func ToPtr[T any](v T) *T
- type AzureDevOpsHost
- type AzureDevOpsRepo
- type BitbucketHost
- type GitHubHost
- type GitLabHost
- type GiteaHost
- type NewAzureDevOpsHostInput
- type NewBitBucketHostInput
- type NewGitHubHostInput
- type NewGitLabHostInput
- type NewGiteaHostInput
- type Project
- type ProviderBackupResult
- type RepoBackupResults
Constants ¶
View Source
const (
AzureDevOpsProviderName = "AzureDevOps"
)
View Source
const (
BitbucketProviderName = "BitBucket"
)
View Source
const (
// GitLabDefaultMinimumProjectAccessLevel https://docs.gitlab.com/ee/user/permissions.html#roles
GitLabDefaultMinimumProjectAccessLevel = 20
)
Variables ¶
This section is empty.
Functions ¶
func AddBasicAuthToURL ¶
Types ¶
type AzureDevOpsHost ¶
type AzureDevOpsHost struct { Caller string HttpClient *retryablehttp.Client Provider string PAT string Orgs []string UserName string DiffRemoteMethod string BackupDir string BackupsToRetain int LogLevel int }
func NewAzureDevOpsHost ¶
func NewAzureDevOpsHost(input NewAzureDevOpsHostInput) (*AzureDevOpsHost, error)
func (*AzureDevOpsHost) Backup ¶
func (ad *AzureDevOpsHost) Backup() ProviderBackupResult
type AzureDevOpsRepo ¶
type AzureDevOpsRepo struct { Id string `json:"id"` Url string `json:"url"` Name string `json:"name"` Size int64 `json:"size"` SshUrl string `json:"sshUrl"` WebUrl string `json:"webUrl"` Project Project `json:"project"` RemoteUrl string `json:"remoteUrl"` DefaultBranch string `json:"defaultBranch"` }
func ListAllRepositories ¶
func ListAllRepositories(httpClient *retryablehttp.Client, basicAuth, projectName, orgName string) ([]AzureDevOpsRepo, error)
type BitbucketHost ¶
type BitbucketHost struct { Caller string HttpClient *retryablehttp.Client Provider string APIURL string DiffRemoteMethod string BackupDir string BackupsToRetain int User string Key string Secret string LogLevel int }
func NewBitBucketHost ¶
func NewBitBucketHost(input NewBitBucketHostInput) (*BitbucketHost, error)
func (BitbucketHost) Backup ¶
func (bb BitbucketHost) Backup() ProviderBackupResult
type GitHubHost ¶
type GitHubHost struct { Caller string HttpClient *retryablehttp.Client Provider string APIURL string DiffRemoteMethod string BackupDir string SkipUserRepos bool LimitUserOwned bool BackupsToRetain int Token string Orgs []string LogLevel int }
func NewGitHubHost ¶
func NewGitHubHost(input NewGitHubHostInput) (*GitHubHost, error)
func (*GitHubHost) Backup ¶
func (gh *GitHubHost) Backup() ProviderBackupResult
type GitLabHost ¶
type GitLabHost struct { Caller string APIURL string DiffRemoteMethod string BackupDir string BackupsToRetain int ProjectMinAccessLevel int Token string User gitlabUser LogLevel int // contains filtered or unexported fields }
func NewGitLabHost ¶
func NewGitLabHost(input NewGitLabHostInput) (*GitLabHost, error)
func (*GitLabHost) Backup ¶
func (gl *GitLabHost) Backup() ProviderBackupResult
type GiteaHost ¶
type GiteaHost struct { Caller string APIURL string DiffRemoteMethod string BackupDir string BackupsToRetain int Token string Orgs []string LogLevel int // contains filtered or unexported fields }
func NewGiteaHost ¶
func NewGiteaHost(input NewGiteaHostInput) (*GiteaHost, error)
func (*GiteaHost) Backup ¶
func (g *GiteaHost) Backup() ProviderBackupResult
type NewAzureDevOpsHostInput ¶
type NewBitBucketHostInput ¶
type NewGitHubHostInput ¶
type NewGitLabHostInput ¶
type NewGiteaHostInput ¶
type ProviderBackupResult ¶
type ProviderBackupResult struct { BackupResults []RepoBackupResults Error errors.E }
type ProviderBackupResult []RepoBackupResults
Click to show internal directories.
Click to hide internal directories.