Documentation
¶
Index ¶
- func GetRepoNames(repos []Repository) []string
- type Client
- func (c *Client) CreateRepo(repoName, description string, private bool) error
- func (c *Client) DeleteRepo(repoName string) error
- func (c *Client) GetRepo(repoName string) (Repository, bool, error)
- func (c *Client) HasToken() bool
- func (c *Client) ListPublicRepos() ([]Repository, error)
- func (c *Client) RepoExists(repoName string) (bool, error)
- func (c *Client) UpdateRepoDescription(repoName, description string) error
- type CreateRepoRequest
- type CreateRepoResponse
- type ErrorResponse
- type Repository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRepoNames ¶
func GetRepoNames(repos []Repository) []string
GetRepoNames extracts repository names from a list of repos
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client handles GitHub API operations
func (*Client) CreateRepo ¶
CreateRepo creates a new repository
func (*Client) DeleteRepo ¶
DeleteRepo deletes a repository from GitHub
func (*Client) GetRepo ¶ added in v0.9.1
func (c *Client) GetRepo(repoName string) (Repository, bool, error)
GetRepo fetches a single repository by name Returns the repository, a boolean indicating existence, and an error
func (*Client) ListPublicRepos ¶
func (c *Client) ListPublicRepos() ([]Repository, error)
ListPublicRepos lists all public repositories for the user/org
func (*Client) RepoExists ¶
RepoExists checks if a repository exists
func (*Client) UpdateRepoDescription ¶ added in v0.9.1
UpdateRepoDescription updates the repository description
type CreateRepoRequest ¶
type CreateRepoRequest struct {
Name string `json:"name"`
Description string `json:"description"`
Private bool `json:"private"`
AutoInit bool `json:"auto_init"`
}
CreateRepoRequest represents the request to create a repository
type CreateRepoResponse ¶
type CreateRepoResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
FullName string `json:"full_name"`
Private bool `json:"private"`
SSHURL string `json:"ssh_url"`
CloneURL string `json:"clone_url"`
}
CreateRepoResponse represents the response from creating a repository
Click to show internal directories.
Click to hide internal directories.