Documentation
¶
Index ¶
Constants ¶
View Source
const ( DEFAULT_HOST string = "github.com" RAW_HOST string = "raw.githubusercontent.com" )
Variables ¶
This section is empty.
Functions ¶
func APIDefaultBranch ¶
func APIRepoTree ¶
Types ¶
type GitHubAPI ¶
type GitHubAPI struct {
// contains filtered or unexported fields
}
func NewGitHubAPI ¶
func NewGitHubAPI() *GitHubAPI
func (*GitHubAPI) GetDefaultBranchName ¶
type IGitHubAPI ¶
type InnerTree ¶
type InnerTree struct { Path string `json:"path"` Mode string `json:"mode"` SHA string `json:"sha"` URL string `json:"url"` Type ObjectType `json:"type"` }
type MockGitHubAPI ¶
type MockGitHubAPI struct { }
func NewMockGitHubAPI ¶
func NewMockGitHubAPI() *MockGitHubAPI
func (MockGitHubAPI) GetDefaultBranchName ¶
func (gh MockGitHubAPI) GetDefaultBranchName(owner, repo string, headres *Headres) (string, error)
func (*MockGitHubAPI) GetRepoTree ¶
func (gh *MockGitHubAPI) GetRepoTree(owner, repo, branch string, headres *Headres) (*Tree, error)
type ObjectType ¶
type ObjectType string
const ( ObjectTypeDir ObjectType = "tree" ObjectTypeFile ObjectType = "blob" )
type Tree ¶
type Tree struct { InnerTrees []InnerTree `json:"tree"` SHA string `json:"sha"` URL string `json:"url"` Truncated bool `json:"truncated"` }
func (*Tree) ListAllDirs ¶
ListAllDirs list all directories in repo tree
func (*Tree) ListAllFiles ¶
ListAllFiles list all files in repo tree
Click to show internal directories.
Click to hide internal directories.