Documentation ¶
Index ¶
Constants ¶
View Source
const ( GitProviderName = "github" EksaGithubTokenEnv = "EKSA_GITHUB_TOKEN" GithubTokenEnv = "GITHUB_TOKEN" )
Variables ¶
This section is empty.
Functions ¶
func New ¶
func New(githubProviderClient GithubClient, config *v1alpha1.GithubProviderConfig, auth git.TokenAuth) (*githubProvider, error)
Types ¶
type GitProviderNotFoundError ¶
type GitProviderNotFoundError struct {
Provider string
}
func (*GitProviderNotFoundError) Error ¶
func (e *GitProviderNotFoundError) Error() string
type GithubClient ¶ added in v0.9.0
type GithubClient interface { GetRepo(ctx context.Context, opts git.GetRepoOpts) (repo *git.Repository, err error) CreateRepo(ctx context.Context, opts git.CreateRepoOpts) (repo *git.Repository, err error) AddDeployKeyToRepo(ctx context.Context, opts git.AddDeployKeyOpts) error AuthenticatedUser(ctx context.Context) (*goGithub.User, error) Organization(ctx context.Context, org string) (*goGithub.Organization, error) GetAccessTokenPermissions(accessToken string) (string, error) CheckAccessTokenPermissions(checkPATPermission string, allPermissionScopes string) error PathExists(ctx context.Context, owner, repo, branch, path string) (bool, error) DeleteRepo(ctx context.Context, opts git.DeleteRepoOpts) error }
GithubClient represents the attributes that the Github provider requires of a library to directly connect to and interact with the Github API.
Click to show internal directories.
Click to hide internal directories.