Documentation
¶
Index ¶
- type Client
- func (c *Client) GetOwnerType(ctx context.Context, name string) (OwnerType, error)
- func (c *Client) GetRepo(ctx context.Context, owner, repo string) (*Repository, error)
- func (c *Client) GetTree(ctx context.Context, repo *Repository) (*TreeResponse, error)
- func (c *Client) ListRepos(ctx context.Context, name string, repoTypes []RepoType) ([]*Repository, error)
- type ClientOptions
- type OwnerType
- type RepoType
- type Repository
- type TreeEntry
- type TreeResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the go-gh REST client.
func NewClient ¶
func NewClient(opts ClientOptions) (*Client, error)
NewClient creates a new GitHub API client with the given options.
func (*Client) GetOwnerType ¶
GetOwnerType determines if a name is a "User" or "Organization".
func (*Client) GetTree ¶
func (c *Client) GetTree(ctx context.Context, repo *Repository) (*TreeResponse, error)
GetTree fetches the Git tree for a repository recursively.
type ClientOptions ¶
type ClientOptions struct {
AuthToken string
CacheDir string
CacheTTL time.Duration
DisableCache bool
}
ClientOptions configures the GitHub API client.
type OwnerType ¶
type OwnerType string
OwnerType represents the type of account owner (User or Organization).
type Repository ¶
type Repository struct {
Owner string
Name string
FullName string // owner/name
DefaultBranch string
Fork bool
Archived bool
MirrorURL string
}
Repository represents a GitHub repository.
Click to show internal directories.
Click to hide internal directories.