Documentation ¶
Index ¶
Constants ¶
View Source
const APIBaseURL = "https://api.github.com"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetRepository(ctx context.Context, owner, repo string) (*Repository, error) UpdateRepository(ctx context.Context, owner, repo string, input *Repository) error }
type FakeClient ¶ added in v0.3.0
type FakeClient struct { Repos map[string]*Repository // key: repo name, value: repo options // contains filtered or unexported fields }
FakeClient implements Client and returns fake objects.
func NewFakeClient ¶ added in v0.3.0
func NewFakeClient() *FakeClient
func (*FakeClient) GetRepository ¶ added in v0.3.0
func (c *FakeClient) GetRepository(ctx context.Context, owner, repo string) (*Repository, error)
func (*FakeClient) UpdateRepository ¶ added in v0.3.0
func (c *FakeClient) UpdateRepository(ctx context.Context, owner, repo string, repository *Repository) error
type Repository ¶ added in v0.3.0
type Repository struct { Name string `json:"name"` Description string `json:"description"` Homepage string `json:"homepage"` Private bool `json:"private"` Visibility string `json:"visibility"` HasIssues bool `json:"has_issues"` HasProjects bool `json:"has_projects"` HasWiki bool `json:"has_wiki"` DefaultBranch string `json:"default_branch"` AllowMergeCommit bool `json:"allow_merge_commit"` AllowRebaseMerge bool `json:"allow_rebase_merge"` AllowSquashMerge bool `json:"allow_squash_merge"` DeleteBranchOnMerge bool `json:"delete_branch_on_merge"` Archived bool `json:"archived"` }
Repository represents a GitHub repository.
Click to show internal directories.
Click to hide internal directories.