github

package
v0.0.0-...-a7ff5df Latest Latest
Warning

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

Go to latest
Published: Oct 30, 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(repoName *ParsedRepositoryName) entities.EnvRepositoryGitURL

Types

type AuthenticatedUser

type AuthenticatedUser struct {
	PrimaryEmail string
	Username     string
	FullName     string
}

type ParsedRepositoryName

type ParsedRepositoryName struct {
	Owner         string
	ExplicitOwner bool
	Name          string
}

func ParseRepositoryName

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

type Service

type Service struct{}

func NewService

func NewService() Service

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) IsInvalidAccessTokenError

func (s Service) IsInvalidAccessTokenError(err error) bool

func (Service) IsNotFoundError

func (s Service) IsNotFoundError(err error) bool

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