Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ghp for GitHub personal access tokens. GitHubPersonalAccessToken = "ghp_" // gho for OAuth access tokens. GitHubOAuth = "gho_" // ghu for GitHub user-to-server tokens. GitHubUserToServer = "ghu_" )
GitHub access token types typically used with the REST API see https://github.blog/2021-04-05-behind-githubs-new-authentication-token-formats/
View Source
const ( // glpat- for GitLab personal access tokens. GitLabPersonalAccessToken = "glpat-" // gloas- for GitLab OAuth Application Secret. GitLabOAuthApplicationSecret = "gloas-" // gldt- for GitLab Deploy Token. GitLabDeployToken = "gldt-" // glrt- for GitLab Runner Authentication Token. GitLabRunnerAuthenticationToken = "glrt-" // glcbt- for GitLab CI/CD Job Token. GitLabCICDJobToken = "glcbt-" // glptt- for GitLab Trigger Token. GitLabTriggerToken = "glptt-" // glft- for GitLab Feed Token. GitLabFeedToken = "glft-" // glimt- for GitLab Incoming Mail Token. GitLabIncomingMailToken = "glimt-" // glagent- for GitLab Agent for Kubernetes Token. GitLabAgentForKubernetesToken = "glagent-" // glsoat- for GitLab SCIM Token. GitLabSCIMToken = "glsoat-" )
GitLab access token types typically used with the REST API see https://docs.gitlab.com/ee/security/token_overview.html#token-prefixes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetPipelineBySha(id, sha string) (*Pipeline, error) GetPipeline(id string, pid int) (*Pipeline, error) IsStatusPending(status string) bool }
func NewFromRemoteURL ¶
func NewFromToken ¶
type GitHubClient ¶
type GitHubClient struct {
// contains filtered or unexported fields
}
func NewGitHubClient ¶
func NewGitHubClient(token string) (*GitHubClient, error)
func (*GitHubClient) GetPipeline ¶
func (c *GitHubClient) GetPipeline(id string, pid int) (*Pipeline, error)
func (*GitHubClient) GetPipelineBySha ¶
func (c *GitHubClient) GetPipelineBySha(id, sha string) (*Pipeline, error)
func (*GitHubClient) GetProjectID ¶
func (c *GitHubClient) GetProjectID(path string) (int, error)
func (*GitHubClient) IsStatusPending ¶
func (*GitHubClient) IsStatusPending(status string) bool
type GitLabClient ¶
type GitLabClient struct {
// contains filtered or unexported fields
}
func NewGitLabClient ¶
func NewGitLabClient(token string) (*GitLabClient, error)
func (*GitLabClient) GetPipeline ¶
func (c *GitLabClient) GetPipeline(id string, pid int) (*Pipeline, error)
func (*GitLabClient) GetPipelineBySha ¶
func (c *GitLabClient) GetPipelineBySha(id string, sha string) (*Pipeline, error)
func (*GitLabClient) GetProjectID ¶
func (c *GitLabClient) GetProjectID(path string) (int, error)
func (*GitLabClient) IsStatusPending ¶
func (*GitLabClient) IsStatusPending(status string) bool
type ProviderType ¶
type ProviderType string
const ( GitHub ProviderType = "github" GitLab ProviderType = "gitlab" )
Click to show internal directories.
Click to hide internal directories.