Documentation
¶
Index ¶
Constants ¶
const ( // The fetch result will be ordered by repository name. REPO_FULL_NAME = "full_name" // The fetch result will be ordered by time of repository created. REPO_CREATE_TIME = "created" // The fetch result will be ordered by time when repository updated. REPO_UPDATE_TIME = "updated" // The fetch result will be ordered by time when repository pushed a new commitment. REPO_PUSH_TIME = "pushed" // Ascending order ASC_ORDER = "asc" // Descending order DESC_ORDER = "desc" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitHubPATMissingError ¶
type GitHubPATMissingError struct{}
An error which the token is undefined on environment variable `GAF_GITHUB_TOKEN`.
func (GitHubPATMissingError) Error ¶
func (gpaterr GitHubPATMissingError) Error() string
type GitHubRepositoryAPIFetch ¶
type GitHubRepositoryAPIFetch struct { // Preference for fetching GitHub repository data. Setting GitHubRepositoryAPIFetchSetting // contains filtered or unexported fields }
A structre uses for fetching GitHub repository content.
func NewGitHubRepositoryAPIFetch ¶
func NewGitHubRepositoryAPIFetch() (*GitHubRepositoryAPIFetch, error)
Construct new GitHubRepositoryAPIFetch.
It requried GitHub Personal Access Token provided in environment variable "GAF_GITHUB_TOKEN".
func (GitHubRepositoryAPIFetch) FetchPage ¶
func (graf GitHubRepositoryAPIFetch) FetchPage(page ...uint64) ([]structure.GitHubRepositoryStructure, *bool, error)
Fetch a single page's context of t GitHub API result.
Parameter `page` is optional that to fetch content in GitHub API page. By default, it uses page 1.
The return parameters repersents returned structure of the repository, a boolean repersent it has next page and the error.
type GitHubRepositoryAPIFetchSetting ¶
type GitHubRepositoryAPIFetchSetting struct { // Define how to order the repository. OrderBy string // Define `OrderBy`'s sorting. OrderSort string }
Preference for fetching GitHub repository according to https://docs.github.com/en/rest/repos/repos#list-repositories-for-the-authenticated-user