Documentation ¶
Index ¶
- type Client
- type GoGithub
- func (g *GoGithub) AuthenticatedUser(ctx context.Context) (*goGithub.User, error)
- func (g *GoGithub) CheckAccessTokenPermissions(checkPATPermission string, allPermissionScopes string) error
- func (g *GoGithub) CreateRepo(ctx context.Context, opts git.CreateRepoOpts) (repository *git.Repository, err error)
- func (g *GoGithub) GetAccessTokenPermissions(accessToken string) (string, error)
- func (g *GoGithub) GetRepo(ctx context.Context, opts git.GetRepoOpts) (*git.Repository, error)
- func (g *GoGithub) Organization(ctx context.Context, org string) (*goGithub.Organization, error)
- func (g *GoGithub) PathExists(ctx context.Context, owner, repo, branch, path string) (bool, error)
- type HTTPClient
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateRepo(ctx context.Context, org string, repo *goGithub.Repository) (*goGithub.Repository, *goGithub.Response, error) Repo(ctx context.Context, owner, repo string) (*goGithub.Repository, *goGithub.Response, error) User(ctx context.Context, user string) (*goGithub.User, *goGithub.Response, error) Organization(ctx context.Context, org string) (*goGithub.Organization, *goGithub.Response, error) GetContents(ctx context.Context, owner, repo, path string, opt *goGithub.RepositoryContentGetOptions) ( fileContent *goGithub.RepositoryContent, directoryContent []*goGithub.RepositoryContent, resp *goGithub.Response, err error, ) }
type GoGithub ¶
func (*GoGithub) AuthenticatedUser ¶
func (*GoGithub) CheckAccessTokenPermissions ¶
func (*GoGithub) CreateRepo ¶
func (g *GoGithub) CreateRepo(ctx context.Context, opts git.CreateRepoOpts) (repository *git.Repository, err error)
CreateRepo creates an empty Github Repository. The repository must be initialized locally or file must be added to it via the github api before it can be successfully cloned.
func (*GoGithub) GetAccessTokenPermissions ¶
func (*GoGithub) GetRepo ¶
func (g *GoGithub) GetRepo(ctx context.Context, opts git.GetRepoOpts) (*git.Repository, error)
GetRepo describes a remote repository, return the repo name if it exists. If the repo does not exist, resulting in a 404 exception, it returns a `RepoDoesNotExist` error.
func (*GoGithub) Organization ¶
type HTTPClient ¶
var HttpClient HTTPClient
Click to show internal directories.
Click to hide internal directories.