Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractFromSource ¶
func ExtractFromSource(source RepoSource, config ExtractConfig) error
Types ¶
type ArtifactUploader ¶
type ArtifactUploader interface {
UploadRepos(repos []*entities.Repository)
}
ArtifactUploader uploads and merge results with ivolution
func NewArtifactUploader ¶
func NewArtifactUploader(outputPath string) ArtifactUploader
NewArtifactUploader constructor
type BitbucketProvider ¶
type BitbucketProvider struct {
Scheme string
BaseURL string
Path string
Username string
Password string
Visibility string
GitExecutable string
// contains filtered or unexported fields
}
BitbucketProvider Bitbucket provider used for handling Bitbucket API operations
func (*BitbucketProvider) CleanUp ¶
func (p *BitbucketProvider) CleanUp()
func (*BitbucketProvider) Clone ¶
func (p *BitbucketProvider) Clone(repo *entities.Repository) (string, error)
func (*BitbucketProvider) GetRepos ¶
func (p *BitbucketProvider) GetRepos() []*entities.Repository
GetRepos returns list of repositories with given token and visibility from provider
type CRUploadResult ¶
type CRUploadResult struct {
Token string `json:"token"`
}
CRUploadResult is the result of single repo upload
type CRUploadResultWithRepoName ¶
type CRUploadResultWithRepoName struct {
Token string `json:"token"`
Reponame string `json:"reponame"`
}
CRUploadResultWithRepoName token-reponame pair
type ExtractConfig ¶
type MultiUpload ¶
type MultiUpload struct {
Results []CRUploadResultWithRepoName `json:"results"`
}
MultiUpload is the request body
type RepoSource ¶
type RepoSource interface {
// GetRepos provides the list of the repositories from the given provider
GetRepos() []*entities.Repository
// Clone clones the given repository to the given directory
// returns with the cloned path and an error if any.
Clone(repository *entities.Repository) (string, error)
// CleanUp revert to the state before extraction.
// E.g. remove temporary files, directories.
CleanUp()
}
RepoSource describes the interface that each provider has to implement
func NewBitbucketProvider ¶
func NewBitbucketProvider(username, password, repoVisibility, gitPath string) RepoSource
NewBitbucketProvider constructor
func NewDirectoryPath ¶
func NewDirectoryPath(path, name string) RepoSource
NewDirectoryPath create a new RepoSource instance. path is the directory path to the repository.
Click to show internal directories.
Click to hide internal directories.