scm_provider

package
v2.11.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2024 License: Apache-2.0 Imports: 38 Imported by: 1

Documentation

Index

Constants

View Source
const AZURE_DEVOPS_DEFAULT_URL = "https://dev.azure.com"

Variables

View Source
var AzureDevOpsErrorsTypeKeyValues = azureDevOpsErrorTypeKeyValuesType{
	GitRepositoryNotFound: "GitRepositoryNotFoundException",
	GitItemNotFound:       "GitItemNotFoundException",
}

Functions

This section is empty.

Types

type AWSCodeCommitClient added in v2.8.0

AWSCodeCommitClient is a lean facade to the codecommitiface.CodeCommitAPI it helps to reduce the mockery generated code.

type AWSCodeCommitProvider added in v2.8.0

type AWSCodeCommitProvider struct {
	// contains filtered or unexported fields
}

func NewAWSCodeCommitProvider added in v2.8.0

func NewAWSCodeCommitProvider(ctx context.Context, tagFilters []*application.TagFilter, role string, region string, allBranches bool) (*AWSCodeCommitProvider, error)

func (*AWSCodeCommitProvider) GetBranches added in v2.8.0

func (p *AWSCodeCommitProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*AWSCodeCommitProvider) ListRepos added in v2.8.0

func (p *AWSCodeCommitProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*AWSCodeCommitProvider) RepoHasPath added in v2.8.0

func (p *AWSCodeCommitProvider) RepoHasPath(ctx context.Context, repo *Repository, path string) (bool, error)

type AWSTaggingClient added in v2.8.0

type AWSTaggingClient interface {
	GetResourcesWithContext(aws.Context, *resourcegroupstaggingapi.GetResourcesInput, ...request.Option) (*resourcegroupstaggingapi.GetResourcesOutput, error)
}

AWSTaggingClient is a lean facade to the resourcegroupstaggingapiiface.ResourceGroupsTaggingAPIAPI it helps to reduce the mockery generated code.

type AzureDevOpsClientFactory added in v2.5.0

type AzureDevOpsClientFactory interface {
	// Returns an Azure Devops Client interface.
	GetClient(ctx context.Context) (azureGit.Client, error)
}

type AzureDevOpsProvider added in v2.5.0

type AzureDevOpsProvider struct {
	// contains filtered or unexported fields
}

func NewAzureDevOpsProvider added in v2.5.0

func NewAzureDevOpsProvider(ctx context.Context, accessToken string, org string, url string, project string, allBranches bool) (*AzureDevOpsProvider, error)

func (*AzureDevOpsProvider) GetBranches added in v2.5.0

func (g *AzureDevOpsProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*AzureDevOpsProvider) ListRepos added in v2.5.0

func (g *AzureDevOpsProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*AzureDevOpsProvider) RepoHasPath added in v2.5.0

func (g *AzureDevOpsProvider) RepoHasPath(ctx context.Context, repo *Repository, path string) (bool, error)

type BitBucketCloudProvider

type BitBucketCloudProvider struct {
	// contains filtered or unexported fields
}

func NewBitBucketCloudProvider

func NewBitBucketCloudProvider(ctx context.Context, owner string, user string, password string, allBranches bool) (*BitBucketCloudProvider, error)

func (*BitBucketCloudProvider) GetBranches

func (g *BitBucketCloudProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*BitBucketCloudProvider) ListRepos

func (g *BitBucketCloudProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*BitBucketCloudProvider) RepoHasPath

func (g *BitBucketCloudProvider) RepoHasPath(ctx context.Context, repo *Repository, path string) (bool, error)

type BitbucketServerProvider

type BitbucketServerProvider struct {
	// contains filtered or unexported fields
}

func NewBitbucketServerProviderBasicAuth

func NewBitbucketServerProviderBasicAuth(ctx context.Context, username, password, url, projectKey string, allBranches bool) (*BitbucketServerProvider, error)

func NewBitbucketServerProviderNoAuth

func NewBitbucketServerProviderNoAuth(ctx context.Context, url, projectKey string, allBranches bool) (*BitbucketServerProvider, error)

func (*BitbucketServerProvider) GetBranches

func (b *BitbucketServerProvider) GetBranches(_ context.Context, repo *Repository) ([]*Repository, error)

func (*BitbucketServerProvider) ListRepos

func (b *BitbucketServerProvider) ListRepos(_ context.Context, cloneProtocol string) ([]*Repository, error)

func (*BitbucketServerProvider) RepoHasPath

func (b *BitbucketServerProvider) RepoHasPath(_ context.Context, repo *Repository, path string) (bool, error)

type ExtendedClient

type ExtendedClient struct {
	*bitbucket.Client
	// contains filtered or unexported fields
}

func (*ExtendedClient) GetContents

func (c *ExtendedClient) GetContents(repo *Repository, path string) (bool, error)

type Filter

type Filter struct {
	RepositoryMatch *regexp.Regexp
	PathsExist      []string
	PathsDoNotExist []string
	LabelMatch      *regexp.Regexp
	BranchMatch     *regexp.Regexp
	FilterType      FilterType
}

A compiled version of SCMProviderGeneratorFilter for performance.

type FilterType

type FilterType int64

A convenience type for indicating where to apply a filter

const (
	FilterTypeUndefined FilterType = iota
	FilterTypeBranch
	FilterTypeRepo
)

The enum of filter types

type GiteaProvider

type GiteaProvider struct {
	// contains filtered or unexported fields
}

func NewGiteaProvider

func NewGiteaProvider(ctx context.Context, owner, token, url string, allBranches, insecure bool) (*GiteaProvider, error)

func (*GiteaProvider) GetBranches

func (g *GiteaProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*GiteaProvider) ListRepos

func (g *GiteaProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*GiteaProvider) RepoHasPath

func (g *GiteaProvider) RepoHasPath(ctx context.Context, repo *Repository, path string) (bool, error)

type GithubProvider

type GithubProvider struct {
	// contains filtered or unexported fields
}

func NewGithubAppProviderFor added in v2.5.0

func NewGithubAppProviderFor(g github_app_auth.Authentication, organization string, url string, allBranches bool) (*GithubProvider, error)

func NewGithubProvider

func NewGithubProvider(ctx context.Context, organization string, token string, url string, allBranches bool) (*GithubProvider, error)

func (*GithubProvider) GetBranches

func (g *GithubProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*GithubProvider) ListRepos

func (g *GithubProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*GithubProvider) RepoHasPath

func (g *GithubProvider) RepoHasPath(ctx context.Context, repo *Repository, path string) (bool, error)

type GitlabProvider

type GitlabProvider struct {
	// contains filtered or unexported fields
}

func NewGitlabProvider

func NewGitlabProvider(ctx context.Context, organization string, token string, url string, allBranches, includeSubgroups, includeSharedProjects, insecure bool, scmRootCAPath, topic string) (*GitlabProvider, error)

func (*GitlabProvider) GetBranches

func (g *GitlabProvider) GetBranches(ctx context.Context, repo *Repository) ([]*Repository, error)

func (*GitlabProvider) ListRepos

func (g *GitlabProvider) ListRepos(ctx context.Context, cloneProtocol string) ([]*Repository, error)

func (*GitlabProvider) RepoHasPath

func (g *GitlabProvider) RepoHasPath(_ context.Context, repo *Repository, path string) (bool, error)

type MockProvider

type MockProvider struct {
	Repos []*Repository
}

func (*MockProvider) GetBranches

func (m *MockProvider) GetBranches(_ context.Context, repo *Repository) ([]*Repository, error)

func (*MockProvider) ListRepos

func (m *MockProvider) ListRepos(_ context.Context, _ string) ([]*Repository, error)

func (*MockProvider) RepoHasPath

func (*MockProvider) RepoHasPath(_ context.Context, repo *Repository, path string) (bool, error)

type Repository

type Repository struct {
	Organization string
	Repository   string
	URL          string
	Branch       string
	SHA          string
	Labels       []string
	RepositoryId interface{}
}

An abstract repository from an API provider.

func ListRepos

func ListRepos(ctx context.Context, provider SCMProviderService, filters []argoprojiov1alpha1.SCMProviderGeneratorFilter, cloneProtocol string) ([]*Repository, error)

type SCMProviderService

type SCMProviderService interface {
	ListRepos(context.Context, string) ([]*Repository, error)
	RepoHasPath(context.Context, *Repository, string) (bool, error)
	GetBranches(context.Context, *Repository) ([]*Repository, error)
}

Directories

Path Synopsis
aws_codecommit
azure_devops

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL