gitprovider

package
v0.33.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrGitProviderConfigNotFound = errors.New("git provider config not found")
)

Functions

func IsGitProviderNotFound added in v0.18.0

func IsGitProviderNotFound(err error) bool

Types

type AbstractGitProvider added in v0.16.0

type AbstractGitProvider struct {
	GitProvider
}

func (*AbstractGitProvider) GetCommitsRange added in v0.26.0

func (g *AbstractGitProvider) GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)

func (*AbstractGitProvider) GetPrebuildWebhook added in v0.26.0

func (g *AbstractGitProvider) GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)

func (*AbstractGitProvider) GetRepositoryContext added in v0.26.0

func (a *AbstractGitProvider) GetRepositoryContext(repoContext GetRepositoryContext) (*GitRepository, error)

func (*AbstractGitProvider) ParseEventData added in v0.26.0

func (g *AbstractGitProvider) ParseEventData(request *http.Request) (*GitEventData, error)

func (*AbstractGitProvider) ParseStaticGitContext added in v0.26.0

func (a *AbstractGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

func (*AbstractGitProvider) RegisterPrebuildWebhook added in v0.26.0

func (g *AbstractGitProvider) RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)

func (*AbstractGitProvider) UnregisterPrebuildWebhook added in v0.26.0

func (g *AbstractGitProvider) UnregisterPrebuildWebhook(repo *GitRepository, id string) error

type AwsCodeCommitGitProvider added in v0.24.0

type AwsCodeCommitGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewAwsCodeCommitGitProvider added in v0.24.0

func NewAwsCodeCommitGitProvider(baseApiUrl string) *AwsCodeCommitGitProvider

func (*AwsCodeCommitGitProvider) FormatError added in v0.33.0

func (g *AwsCodeCommitGitProvider) FormatError(err error) error

func (*AwsCodeCommitGitProvider) GetBranchByCommit added in v0.26.0

func (g *AwsCodeCommitGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*AwsCodeCommitGitProvider) GetDefaultBranch added in v0.26.0

func (g *AwsCodeCommitGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*AwsCodeCommitGitProvider) GetLastCommitSha added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*AwsCodeCommitGitProvider) GetNamespaces added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*AwsCodeCommitGitProvider) GetPrContext added in v0.26.0

func (g *AwsCodeCommitGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*AwsCodeCommitGitProvider) GetRepoBranches added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*AwsCodeCommitGitProvider) GetRepoPRs added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*AwsCodeCommitGitProvider) GetRepositories added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*AwsCodeCommitGitProvider) GetUrlFromContext added in v0.26.1

func (g *AwsCodeCommitGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*AwsCodeCommitGitProvider) GetUser added in v0.24.0

func (g *AwsCodeCommitGitProvider) GetUser() (*GitUser, error)

func (*AwsCodeCommitGitProvider) ParseStaticGitContext added in v0.26.0

func (g *AwsCodeCommitGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

type AzureDevOpsGitProvider added in v0.21.0

type AzureDevOpsGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewAzureDevOpsGitProvider added in v0.21.0

func NewAzureDevOpsGitProvider(token string, baseApiUrl string) *AzureDevOpsGitProvider

func (*AzureDevOpsGitProvider) FormatError added in v0.33.0

func (g *AzureDevOpsGitProvider) FormatError(err error) error

func (*AzureDevOpsGitProvider) GetBranchByCommit added in v0.26.0

func (g *AzureDevOpsGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*AzureDevOpsGitProvider) GetDefaultBranch added in v0.26.0

func (g *AzureDevOpsGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*AzureDevOpsGitProvider) GetLastCommitSha added in v0.21.0

func (g *AzureDevOpsGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*AzureDevOpsGitProvider) GetNamespaces added in v0.21.0

func (g *AzureDevOpsGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*AzureDevOpsGitProvider) GetPrContext added in v0.26.0

func (g *AzureDevOpsGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*AzureDevOpsGitProvider) GetRepoBranches added in v0.21.0

func (g *AzureDevOpsGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*AzureDevOpsGitProvider) GetRepoPRs added in v0.21.0

func (g *AzureDevOpsGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*AzureDevOpsGitProvider) GetRepositories added in v0.21.0

func (g *AzureDevOpsGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*AzureDevOpsGitProvider) GetUrlFromContext added in v0.26.1

func (g *AzureDevOpsGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*AzureDevOpsGitProvider) GetUser added in v0.21.0

func (g *AzureDevOpsGitProvider) GetUser() (*GitUser, error)

func (*AzureDevOpsGitProvider) ParseStaticGitContext added in v0.26.0

func (g *AzureDevOpsGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

type BitbucketGitProvider

type BitbucketGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewBitbucketGitProvider added in v0.11.0

func NewBitbucketGitProvider(username string, token string) *BitbucketGitProvider

func (*BitbucketGitProvider) FormatError added in v0.33.0

func (b *BitbucketGitProvider) FormatError(err error) error

func (*BitbucketGitProvider) GetBranchByCommit added in v0.26.0

func (g *BitbucketGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*BitbucketGitProvider) GetCommitsRange added in v0.30.0

func (g *BitbucketGitProvider) GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)

func (*BitbucketGitProvider) GetDefaultBranch added in v0.26.0

func (g *BitbucketGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*BitbucketGitProvider) GetLastCommitSha added in v0.16.0

func (g *BitbucketGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*BitbucketGitProvider) GetNamespaces

func (g *BitbucketGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*BitbucketGitProvider) GetPrContext added in v0.26.0

func (g *BitbucketGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*BitbucketGitProvider) GetPrebuildWebhook added in v0.30.0

func (g *BitbucketGitProvider) GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)

func (*BitbucketGitProvider) GetRepoBranches

func (g *BitbucketGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*BitbucketGitProvider) GetRepoPRs

func (g *BitbucketGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*BitbucketGitProvider) GetRepositories

func (g *BitbucketGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*BitbucketGitProvider) GetUrlFromContext added in v0.26.1

func (g *BitbucketGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*BitbucketGitProvider) GetUser added in v0.11.0

func (g *BitbucketGitProvider) GetUser() (*GitUser, error)

func (*BitbucketGitProvider) ParseEventData added in v0.30.0

func (g *BitbucketGitProvider) ParseEventData(request *http.Request) (*GitEventData, error)

func (*BitbucketGitProvider) ParseStaticGitContext added in v0.26.0

func (g *BitbucketGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

func (*BitbucketGitProvider) RegisterPrebuildWebhook added in v0.30.0

func (g *BitbucketGitProvider) RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)

func (*BitbucketGitProvider) UnregisterPrebuildWebhook added in v0.30.0

func (g *BitbucketGitProvider) UnregisterPrebuildWebhook(repo *GitRepository, id string) error

type BitbucketServerGitProvider added in v0.21.0

type BitbucketServerGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewBitbucketServerGitProvider added in v0.21.0

func NewBitbucketServerGitProvider(username string, token string, baseApiUrl *string) *BitbucketServerGitProvider

func (*BitbucketServerGitProvider) FormatError added in v0.33.0

func (b *BitbucketServerGitProvider) FormatError(statusCode int, message string) error

func (*BitbucketServerGitProvider) GetBranchByCommit added in v0.26.0

func (g *BitbucketServerGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*BitbucketServerGitProvider) GetDefaultBranch added in v0.26.0

func (g *BitbucketServerGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*BitbucketServerGitProvider) GetLastCommitSha added in v0.21.0

func (g *BitbucketServerGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*BitbucketServerGitProvider) GetNamespaces added in v0.21.0

func (g *BitbucketServerGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*BitbucketServerGitProvider) GetPrContext added in v0.26.0

func (g *BitbucketServerGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*BitbucketServerGitProvider) GetRepoBranches added in v0.21.0

func (g *BitbucketServerGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*BitbucketServerGitProvider) GetRepoPRs added in v0.21.0

func (g *BitbucketServerGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*BitbucketServerGitProvider) GetRepositories added in v0.21.0

func (g *BitbucketServerGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*BitbucketServerGitProvider) GetUrlFromContext added in v0.26.1

func (g *BitbucketServerGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*BitbucketServerGitProvider) GetUser added in v0.21.0

func (g *BitbucketServerGitProvider) GetUser() (*GitUser, error)

func (*BitbucketServerGitProvider) ParseStaticGitContext added in v0.26.0

func (g *BitbucketServerGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

type CloneTarget added in v0.26.0

type CloneTarget string // @name CloneTarget
const (
	CloneTargetBranch CloneTarget = "branch"
	CloneTargetCommit CloneTarget = "commit"
)

type ConfigStore added in v0.11.0

type ConfigStore interface {
	List() ([]*GitProviderConfig, error)
	Find(id string) (*GitProviderConfig, error)
	Save(*GitProviderConfig) error
	Delete(*GitProviderConfig) error
}

type GetRepositoryContext added in v0.26.0

type GetRepositoryContext struct {
	Id       *string `json:"id" validate:"optional"`
	Url      string  `json:"url" validate:"required"`
	Name     *string `json:"name" validate:"optional"`
	Branch   *string `json:"branch,omitempty" validate:"optional"`
	Sha      *string `json:"sha" validate:"optional"`
	Owner    *string `json:"owner" validate:"optional"`
	PrNumber *uint32 `json:"prNumber,omitempty" validate:"optional"`
	Source   *string `json:"source" validate:"optional"`
	Path     *string `json:"path,omitempty" validate:"optional"`

} // @name GetRepositoryContext

type GitBranch

type GitBranch struct {
	Name string `json:"name" validate:"required"`
	Sha  string `json:"sha" validate:"required"`

} // @name GitBranch

type GitEventData added in v0.26.0

type GitEventData struct {
	Url           string   `json:"url" validate:"required"`
	Branch        string   `json:"branch" validate:"required"`
	Sha           string   `json:"sha" validate:"required"`
	Owner         string   `json:"user" validate:"required"`
	AffectedFiles []string `json:"affectedFiles" validate:"required"`

} //	@name	GitEventData

type GitHubGitProvider

type GitHubGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewGitHubGitProvider added in v0.11.0

func NewGitHubGitProvider(token string, baseApiUrl *string) *GitHubGitProvider

func (*GitHubGitProvider) FormatError added in v0.33.0

func (g *GitHubGitProvider) FormatError(err error) error

func (*GitHubGitProvider) GetBranchByCommit added in v0.26.0

func (g *GitHubGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*GitHubGitProvider) GetCommitsRange added in v0.26.0

func (g *GitHubGitProvider) GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)

func (*GitHubGitProvider) GetDefaultBranch added in v0.26.0

func (g *GitHubGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*GitHubGitProvider) GetLastCommitSha added in v0.16.0

func (g *GitHubGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*GitHubGitProvider) GetNamespaces

func (g *GitHubGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GitHubGitProvider) GetPrContext added in v0.26.0

func (g *GitHubGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*GitHubGitProvider) GetPrebuildWebhook added in v0.26.0

func (g *GitHubGitProvider) GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)

func (*GitHubGitProvider) GetRepoBranches

func (g *GitHubGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GitHubGitProvider) GetRepoPRs

func (g *GitHubGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GitHubGitProvider) GetRepositories

func (g *GitHubGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GitHubGitProvider) GetUrlFromContext added in v0.26.1

func (g *GitHubGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*GitHubGitProvider) GetUser added in v0.11.0

func (g *GitHubGitProvider) GetUser() (*GitUser, error)

func (*GitHubGitProvider) ParseEventData added in v0.26.0

func (g *GitHubGitProvider) ParseEventData(request *http.Request) (*GitEventData, error)

func (*GitHubGitProvider) ParseStaticGitContext added in v0.26.0

func (g *GitHubGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

func (*GitHubGitProvider) RegisterPrebuildWebhook added in v0.26.0

func (g *GitHubGitProvider) RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)

func (*GitHubGitProvider) UnregisterPrebuildWebhook added in v0.26.0

func (g *GitHubGitProvider) UnregisterPrebuildWebhook(repo *GitRepository, id string) error

type GitLabGitProvider

type GitLabGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewGitLabGitProvider added in v0.11.0

func NewGitLabGitProvider(token string, baseApiUrl *string) *GitLabGitProvider

func (*GitLabGitProvider) FormatError added in v0.33.0

func (g *GitLabGitProvider) FormatError(err error) error

func (*GitLabGitProvider) GetBranchByCommit added in v0.26.0

func (g *GitLabGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*GitLabGitProvider) GetCommitsRange added in v0.28.0

func (g *GitLabGitProvider) GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)

func (*GitLabGitProvider) GetDefaultBranch added in v0.26.0

func (g *GitLabGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*GitLabGitProvider) GetLastCommitSha added in v0.16.0

func (g *GitLabGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*GitLabGitProvider) GetNamespaces

func (g *GitLabGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GitLabGitProvider) GetPrContext added in v0.26.0

func (g *GitLabGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*GitLabGitProvider) GetPrebuildWebhook added in v0.28.0

func (g *GitLabGitProvider) GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)

func (*GitLabGitProvider) GetRepoBranches

func (g *GitLabGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GitLabGitProvider) GetRepoPRs

func (g *GitLabGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GitLabGitProvider) GetRepositories

func (g *GitLabGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GitLabGitProvider) GetUrlFromContext added in v0.26.1

func (g *GitLabGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*GitLabGitProvider) GetUser added in v0.11.0

func (g *GitLabGitProvider) GetUser() (*GitUser, error)

func (*GitLabGitProvider) ParseEventData added in v0.28.0

func (g *GitLabGitProvider) ParseEventData(request *http.Request) (*GitEventData, error)

func (*GitLabGitProvider) ParseStaticGitContext added in v0.26.0

func (g *GitLabGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

func (*GitLabGitProvider) RegisterPrebuildWebhook added in v0.28.0

func (g *GitLabGitProvider) RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)

func (*GitLabGitProvider) UnregisterPrebuildWebhook added in v0.28.0

func (g *GitLabGitProvider) UnregisterPrebuildWebhook(repo *GitRepository, hookId string) error

type GitNamespace

type GitNamespace struct {
	Id   string `json:"id" validate:"required"`
	Name string `json:"name" validate:"required"`

} // @name GitNamespace

type GitProvider

type GitProvider interface {
	GetNamespaces() ([]*GitNamespace, error)
	GetRepositories(namespace string) ([]*GitRepository, error)
	GetUser() (*GitUser, error)
	GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)
	GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

	GetRepositoryContext(repoContext GetRepositoryContext) (*GitRepository, error)
	GetUrlFromContext(repoContext *GetRepositoryContext) string
	GetLastCommitSha(staticContext *StaticGitContext) (string, error)
	GetBranchByCommit(staticContext *StaticGitContext) (string, error)
	GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)
	ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)
	GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

	RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)
	GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)
	UnregisterPrebuildWebhook(repo *GitRepository, id string) error
	GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)
	ParseEventData(request *http.Request) (*GitEventData, error)
}

type GitProviderConfig added in v0.11.0

type GitProviderConfig struct {
	Id         string  `json:"id" validate:"required"`
	Username   string  `json:"username" validate:"required"`
	BaseApiUrl *string `json:"baseApiUrl,omitempty" validate:"optional"`
	Token      string  `json:"token" validate:"required"`

} // @name GitProvider

type GitPullRequest

type GitPullRequest struct {
	Name            string `json:"name" validate:"required"`
	Branch          string `json:"branch" validate:"required"`
	Sha             string `json:"sha" validate:"required"`
	SourceRepoId    string `json:"sourceRepoId" validate:"required"`
	SourceRepoUrl   string `json:"sourceRepoUrl" validate:"required"`
	SourceRepoOwner string `json:"sourceRepoOwner" validate:"required"`
	SourceRepoName  string `json:"sourceRepoName" validate:"required"`

} // @name GitPullRequest

type GitRepository added in v0.11.0

type GitRepository struct {
	Id       string      `json:"id" validate:"required"`
	Url      string      `json:"url" validate:"required"`
	Name     string      `json:"name" validate:"required"`
	Branch   string      `json:"branch" validate:"required"`
	Sha      string      `json:"sha" validate:"required"`
	Owner    string      `json:"owner" validate:"required"`
	PrNumber *uint32     `json:"prNumber,omitempty" validate:"optional"`
	Source   string      `json:"source" validate:"required"`
	Path     *string     `json:"path,omitempty" validate:"optional"`
	Target   CloneTarget `json:"cloneTarget,omitempty" validate:"optional"`

} // @name GitRepository

type GitUser

type GitUser struct {
	Id       string `json:"id" validate:"required"`
	Username string `json:"username" validate:"required"`
	Name     string `json:"name" validate:"required"`
	Email    string `json:"email" validate:"required"`

} // @name GitUser

type GiteaGitProvider added in v0.4.0

type GiteaGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewGiteaGitProvider added in v0.11.0

func NewGiteaGitProvider(token string, baseApiUrl string) *GiteaGitProvider

func (*GiteaGitProvider) FormatError added in v0.33.0

func (g *GiteaGitProvider) FormatError(response *gitea.Response, err error) error

func (*GiteaGitProvider) GetBranchByCommit added in v0.26.0

func (g *GiteaGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*GiteaGitProvider) GetCommitsRange added in v0.31.0

func (g *GiteaGitProvider) GetCommitsRange(repo *GitRepository, initialSha string, currentSha string) (int, error)

func (*GiteaGitProvider) GetDefaultBranch added in v0.26.0

func (g *GiteaGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*GiteaGitProvider) GetLastCommitSha added in v0.16.0

func (g *GiteaGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*GiteaGitProvider) GetNamespaces added in v0.4.0

func (g *GiteaGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GiteaGitProvider) GetPrContext added in v0.26.0

func (g *GiteaGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*GiteaGitProvider) GetPrebuildWebhook added in v0.31.0

func (g *GiteaGitProvider) GetPrebuildWebhook(repo *GitRepository, endpointUrl string) (*string, error)

func (*GiteaGitProvider) GetRepoBranches added in v0.4.0

func (g *GiteaGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GiteaGitProvider) GetRepoPRs added in v0.4.0

func (g *GiteaGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GiteaGitProvider) GetRepositories added in v0.4.0

func (g *GiteaGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GiteaGitProvider) GetUrlFromContext added in v0.26.1

func (g *GiteaGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*GiteaGitProvider) GetUser added in v0.11.0

func (g *GiteaGitProvider) GetUser() (*GitUser, error)

func (*GiteaGitProvider) ParseEventData added in v0.31.0

func (g *GiteaGitProvider) ParseEventData(request *http.Request) (*GitEventData, error)

func (*GiteaGitProvider) ParseStaticGitContext added in v0.26.0

func (g *GiteaGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

func (*GiteaGitProvider) RegisterPrebuildWebhook added in v0.31.0

func (g *GiteaGitProvider) RegisterPrebuildWebhook(repo *GitRepository, endpointUrl string) (string, error)

func (*GiteaGitProvider) UnregisterPrebuildWebhook added in v0.31.0

func (g *GiteaGitProvider) UnregisterPrebuildWebhook(repo *GitRepository, id string) error

type GitnessGitProvider added in v0.20.0

type GitnessGitProvider struct {
	*AbstractGitProvider
	// contains filtered or unexported fields
}

func NewGitnessGitProvider added in v0.20.0

func NewGitnessGitProvider(token string, baseApiUrl *string) *GitnessGitProvider

func (*GitnessGitProvider) GetBranchByCommit added in v0.26.0

func (g *GitnessGitProvider) GetBranchByCommit(staticContext *StaticGitContext) (string, error)

func (*GitnessGitProvider) GetDefaultBranch added in v0.26.0

func (g *GitnessGitProvider) GetDefaultBranch(staticContext *StaticGitContext) (*string, error)

func (*GitnessGitProvider) GetLastCommitSha added in v0.20.0

func (g *GitnessGitProvider) GetLastCommitSha(staticContext *StaticGitContext) (string, error)

func (*GitnessGitProvider) GetNamespaces added in v0.20.0

func (g *GitnessGitProvider) GetNamespaces() ([]*GitNamespace, error)

func (*GitnessGitProvider) GetPrContext added in v0.26.0

func (g *GitnessGitProvider) GetPrContext(staticContext *StaticGitContext) (*StaticGitContext, error)

func (*GitnessGitProvider) GetRepoBranches added in v0.20.0

func (g *GitnessGitProvider) GetRepoBranches(repositoryId string, namespaceId string) ([]*GitBranch, error)

func (*GitnessGitProvider) GetRepoPRs added in v0.20.0

func (g *GitnessGitProvider) GetRepoPRs(repositoryId string, namespaceId string) ([]*GitPullRequest, error)

func (*GitnessGitProvider) GetRepositories added in v0.20.0

func (g *GitnessGitProvider) GetRepositories(namespace string) ([]*GitRepository, error)

func (*GitnessGitProvider) GetUrlFromContext added in v0.26.1

func (g *GitnessGitProvider) GetUrlFromContext(repoContext *GetRepositoryContext) string

func (*GitnessGitProvider) GetUser added in v0.20.0

func (g *GitnessGitProvider) GetUser() (*GitUser, error)

func (*GitnessGitProvider) ParseStaticGitContext added in v0.26.0

func (g *GitnessGitProvider) ParseStaticGitContext(repoUrl string) (*StaticGitContext, error)

type StaticGitContext added in v0.16.0

type StaticGitContext struct {
	Id       string  `json:"id" validate:"required"`
	Url      string  `json:"url" validate:"required"`
	Name     string  `json:"name" validate:"required"`
	Branch   *string `json:"branch,omitempty" validate:"optional"`
	Sha      *string `json:"sha,omitempty" validate:"optional"`
	Owner    string  `json:"owner" validate:"required"`
	PrNumber *uint32 `json:"prNumber,omitempty" validate:"optional"`
	Source   string  `json:"source" validate:"required"`
	Path     *string `json:"path,omitempty" validate:"optional"`

} // @name StaticGitContext

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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