Documentation ¶
Index ¶
Constants ¶
View Source
const (
PipelinesAsCodeWebhhokInsecureSslEnvVar = "PAC_WEBHOOK_INSECURE_SSL"
)
Variables ¶
This section is empty.
Functions ¶
func IsInsecureSSL ¶
func IsInsecureSSL() bool
Types ¶
type GitProviderClient ¶
type GitProviderClient interface { // EnsurePaCMergeRequest creates or updates existing (if needed) Pipelines as Code configuration proposal merge request. // Returns the merge request web URL. // If there is no error and web URL is empty, it means that the merge request is not needed (main branch is up to date). EnsurePaCMergeRequest(repoUrl string, data *MergeRequestData) (webUrl string, err error) // UndoPaCMergeRequest creates or updates existing Pipelines as Code configuration removal merge request. // Returns the merge request web URL. // If there is no error and web URL is empty, it means that the merge request is not needed (the configuraton has already been deleted). UndoPaCMergeRequest(repoUrl string, data *MergeRequestData) (webUrl string, err error) // FindUnmergedPaCMergeRequest searches for existing Pipelines as Code configuration proposal merge request FindUnmergedPaCMergeRequest(repoUrl string, data *MergeRequestData) (*MergeRequest, error) // SetupPaCWebhook creates Pipelines as Code webhook in the given repository SetupPaCWebhook(repoUrl, webhookUrl, webhookSecret string) error // DeletePaCWebhook deletes Pipelines as Code webhook in the given repository DeletePaCWebhook(repoUrl, webhookUrl string) error // GetDefaultBranch returns name of default branch in the given repository GetDefaultBranch(repoUrl string) (string, error) // DeleteBranch deletes given branch from repository. // Returns true if branch was deleted, false if the branch didn't exist. DeleteBranch(repoUrl, branchName string) (bool, error) // GetBranchSha returns SHA of top commit in the given branch GetBranchSha(repoUrl, branchName string) (string, error) // IsFileExist check whether given file exists in the given branch of the reposiotry IsFileExist(repoUrl, branchName, filePath string) (bool, error) // IsRepositoryPublic returns true if the repository could be accessed without authentication IsRepositoryPublic(repoUrl string) (bool, error) // GetBrowseRepositoryAtShaLink returns web URL of repository state at given SHA GetBrowseRepositoryAtShaLink(repoUrl, sha string) string // GetConfiguredGitAppName returns configured git application name and id. // Not all git providers support applications. Currently only GitHub does. GetConfiguredGitAppName() (string, string, error) }
type MergeRequest ¶
type MergeRequestData ¶
type RepositoryFile ¶
Click to show internal directories.
Click to hide internal directories.