Versions in this module Expand all Collapse all v1 v1.6.0 Apr 6, 2024 v1.5.1 Apr 5, 2024 Changes in this version + func GetBitbucketTokenScopes(client *bitbucket.Client, cfg *conf.GlobalConfig) ([]string, error) + func GetScopes(ctx context.Context, client *github.Client) ([]string, error) + func ValidateBitbucketPermissions(client *bitbucket.Client, cfg *conf.GlobalConfig) error + func ValidatePermissions(ctx context.Context, client *github.Client, cfg *conf.GlobalConfig) error + type BitbucketClientImpl struct + HooksHashTable map[string]int64 + func (b BitbucketClientImpl) GetFile(ctx *context.Context, repo string, branch string, path string) (*CommitFile, error) + func (b BitbucketClientImpl) GetFiles(ctx *context.Context, repo string, branch string, paths []string) ([]*CommitFile, error) + func (b BitbucketClientImpl) HandlePayload(ctx *context.Context, request *http.Request, secret []byte) (*WebhookPayload, error) + func (b BitbucketClientImpl) ListFiles(ctx *context.Context, repo string, branch string, path string) ([]string, error) + func (b BitbucketClientImpl) PingHook(ctx *context.Context, hook *HookWithStatus) error + func (b BitbucketClientImpl) SetStatus(ctx *context.Context, repo *string, commit *string, linkURL *string, ...) error + func (b BitbucketClientImpl) SetWebhook(ctx *context.Context, repo *string) (*HookWithStatus, error) + func (b BitbucketClientImpl) UnsetWebhook(ctx *context.Context, hook *HookWithStatus) error + type Client interface + GetFile func(ctx *context.Context, repo string, branch string, path string) (*CommitFile, error) + GetFiles func(ctx *context.Context, repo string, branch string, paths []string) ([]*CommitFile, error) + HandlePayload func(ctx *context.Context, request *http.Request, secret []byte) (*WebhookPayload, error) + ListFiles func(ctx *context.Context, repo string, branch string, path string) ([]string, error) + PingHook func(ctx *context.Context, hook *HookWithStatus) error + SetStatus func(ctx *context.Context, repo *string, commit *string, linkURL *string, ...) error + SetWebhook func(ctx *context.Context, repo *string) (*HookWithStatus, error) + UnsetWebhook func(ctx *context.Context, hook *HookWithStatus) error + func NewBitbucketServerClient(cfg *conf.GlobalConfig) (Client, error) + func NewGitProviderClient(cfg *conf.GlobalConfig) (Client, error) + func NewGithubClient(cfg *conf.GlobalConfig) (Client, error) + type CommitFile struct + Content *string + Path *string + type GithubClientImpl struct + func (c *GithubClientImpl) GetFile(ctx *context.Context, repo string, branch string, path string) (*CommitFile, error) + func (c *GithubClientImpl) GetFiles(ctx *context.Context, repo string, branch string, paths []string) ([]*CommitFile, error) + func (c *GithubClientImpl) HandlePayload(ctx *context.Context, request *http.Request, secret []byte) (*WebhookPayload, error) + func (c *GithubClientImpl) ListFiles(ctx *context.Context, repo string, branch string, path string) ([]string, error) + func (c *GithubClientImpl) PingHook(ctx *context.Context, hook *HookWithStatus) error + func (c *GithubClientImpl) SetStatus(ctx *context.Context, repo *string, commit *string, linkURL *string, ...) error + func (c *GithubClientImpl) SetWebhook(ctx *context.Context, repo *string) (*HookWithStatus, error) + func (c *GithubClientImpl) UnsetWebhook(ctx *context.Context, hook *HookWithStatus) error + type HookWithStatus struct + HealthStatus bool + HookID int64 + RepoName *string + Uuid string + type WebhookPayload struct + Action string + Branch string + Commit string + DestBranch string + Event string + HookID int64 + Labels []string + OwnerID int64 + PullRequestTitle string + PullRequestURL string + Repo string + User string + UserEmail string