Documentation
¶
Index ¶
- Constants
- func CreateFile(client *github.Client, repository *github.Repository, path string, ...) (*github.RepositoryContentResponse, error)
- func CreateOrUpdateFile(client *github.Client, repository *github.Repository, path string, ...) (*github.RepositoryContentResponse, error)
- func FindRepoByOrg(client *github.Client, orgName string, repoName string) (*github.Repository, error)
- func GetFileContents(client *github.Client, repository *github.Repository, path string) (*github.RepositoryContent, error)
- func MakeClientWithOauth2StaticToken(accessToken string) *github.Client
- func TestCreateFile(t *testing.T)
- func TestCreateFile_existing(t *testing.T)
- func TestCreateOrUpdateFile_create(t *testing.T)
- func TestCreateOrUpdateFile_update(t *testing.T)
- func TestFindRepoByOrg(t *testing.T)
- func TestFindRepoByOrg_invalid(t *testing.T)
- func TestGetContents(t *testing.T)
- func TestGetContents_invalid(t *testing.T)
- func TestMakeClientWithOauth2StaticToken(t *testing.T)
- func TestUpdateFile(t *testing.T)
- func UpdateFile(client *github.Client, repository *github.Repository, path string, ...) (*github.RepositoryContentResponse, error)
- type ListingReposInOrgError
- type NoClientProvidedError
- type NoOptionsProvidedError
- type NoRepoProvidedError
- type PathIsNotAFileIsADirectoryError
- type UnableToDetermineStatusOfFileError
- type UnableToFindRepoError
Constants ¶
View Source
const ( CodeContext = "goutility/github" NoClientProvidedCode goutility.ErrorCode = 1 << iota ListingReposInOrgCode NoRepoProvidedCode PathIsNotAFileIsADirectoryCode NoOptionsProvidedCode UnableToDetermineStatusOfFileCode )
Variables ¶
This section is empty.
Functions ¶
func CreateFile ¶
func CreateFile(client *github.Client, repository *github.Repository, path string, options *github.RepositoryContentFileOptions) (*github.RepositoryContentResponse, error)
func CreateOrUpdateFile ¶
func CreateOrUpdateFile(client *github.Client, repository *github.Repository, path string, options *github.RepositoryContentFileOptions) (*github.RepositoryContentResponse, error)
func FindRepoByOrg ¶
func GetFileContents ¶
func GetFileContents(client *github.Client, repository *github.Repository, path string) (*github.RepositoryContent, error)
func TestCreateFile ¶
func TestCreateFile_existing ¶
func TestFindRepoByOrg ¶
func TestGetContents ¶
func TestGetContents_invalid ¶
func TestUpdateFile ¶
func UpdateFile ¶
func UpdateFile(client *github.Client, repository *github.Repository, path string, options *github.RepositoryContentFileOptions) (*github.RepositoryContentResponse, error)
Types ¶
type ListingReposInOrgError ¶
type ListingReposInOrgError struct {
goutility.ErrorType
// contains filtered or unexported fields
}
region Listing Repos In Org
func MakeListingReposInOrgError ¶
func MakeListingReposInOrgError(orgName string, underlyingError error) ListingReposInOrgError
func (ListingReposInOrgError) OrgName ¶
func (this ListingReposInOrgError) OrgName() string
func (ListingReposInOrgError) UnderlyingError ¶
func (this ListingReposInOrgError) UnderlyingError() error
type NoClientProvidedError ¶
region No Client Provided
func MakeNoClientProvidedError ¶
func MakeNoClientProvidedError() NoClientProvidedError
type NoOptionsProvidedError ¶
region No Options Provided
func MakeNoOptionsProvidedError ¶
func MakeNoOptionsProvidedError() NoOptionsProvidedError
type NoRepoProvidedError ¶
region No Repo Provided
func MakeNoRepoProvidedError ¶
func MakeNoRepoProvidedError() NoRepoProvidedError
type PathIsNotAFileIsADirectoryError ¶
type PathIsNotAFileIsADirectoryError struct {
goutility.ErrorType
// contains filtered or unexported fields
}
region Path Is Not A File Is A Directory
func MakeNotAFileIsADirectoryError ¶
func MakeNotAFileIsADirectoryError(path string) PathIsNotAFileIsADirectoryError
func (PathIsNotAFileIsADirectoryError) Path ¶
func (this PathIsNotAFileIsADirectoryError) Path() string
type UnableToDetermineStatusOfFileError ¶
type UnableToDetermineStatusOfFileError struct {
goutility.ErrorType
// contains filtered or unexported fields
}
region Unable To Determine Status of File
func MakeUnableToDetermineStatusOfFileError ¶
func MakeUnableToDetermineStatusOfFileError(path string) UnableToDetermineStatusOfFileError
func (UnableToDetermineStatusOfFileError) Path ¶
func (this UnableToDetermineStatusOfFileError) Path() string
type UnableToFindRepoError ¶
region Unable To Find Repo
func MakeUnableToFindRepoError ¶
func MakeUnableToFindRepoError(orgName string, repoName string) UnableToFindRepoError
func (UnableToFindRepoError) OrgName ¶
func (this UnableToFindRepoError) OrgName() string
func (UnableToFindRepoError) RepoName ¶
func (this UnableToFindRepoError) RepoName() string
Click to show internal directories.
Click to hide internal directories.