github

package
v0.0.0-...-f432a95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildGitHTTPURL

func BuildGitHTTPURL(repoOwner, repoName string) entities.DevEnvRepositoryGitURL

func BuildGitURL

func BuildGitURL(repoOwner, repoName string) entities.DevEnvRepositoryGitURL

Types

type AuthenticatedUser

type AuthenticatedUser struct {
	PrimaryEmail string
	Username     string
	FullName     string
}

type ParsedGitHubRepositoryName

type ParsedGitHubRepositoryName struct {
	Owner         string
	ExplicitOwner bool
	Name          string
}

func ParseRepositoryName

func ParseRepositoryName(
	repositoryName string,
	defaultRepositoryOwner string,
) (*ParsedGitHubRepositoryName, error)

type Service

type Service struct{}

func NewService

func NewService() Service

func (Service) CreateGPGKey

func (s Service) CreateGPGKey(
	accessToken string,
	publicKeyContent string,
) (*github.GPGKey, error)

func (Service) CreateRepository

func (s Service) CreateRepository(
	accessToken string,
	organization string,
	properties *github.Repository,
) (*github.Repository, error)

func (Service) CreateSSHKey

func (s Service) CreateSSHKey(
	accessToken string,
	keyPairName string,
	publicKeyContent string,
) (*github.Key, error)

func (Service) DoesRepositoryExist

func (s Service) DoesRepositoryExist(
	accessToken string,
	repositoryOwner string,
	repositoryName string,
) (bool, error)

func (Service) GetAuthenticatedUser

func (s Service) GetAuthenticatedUser(
	accessToken string,
) (*AuthenticatedUser, error)

func (Service) GetFileContentFromRepository

func (s Service) GetFileContentFromRepository(
	accessToken string,
	repositoryOwner string,
	repositoryName string,
	filePath string,
) (string, error)

func (Service) IsInvalidAccessTokenError

func (s Service) IsInvalidAccessTokenError(err error) bool

func (Service) IsNotFoundError

func (s Service) IsNotFoundError(err error) bool

func (Service) RemoveGPGKey

func (s Service) RemoveGPGKey(
	accessToken string,
	gpgKeyID int64,
) error

func (Service) RemoveSSHKey

func (s Service) RemoveSSHKey(
	accessToken string,
	sshKeyID int64,
) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL