Versions in this module Expand all Collapse all v1 v1.6.2 May 13, 2026 v1.6.1 May 13, 2026 v1.6.0 May 1, 2026 Changes in this version type Installation + AppID int64 + type InstallationAccount struct + ID int64 + Login string + Type string v1.5.0 Apr 20, 2026 v1.4.0 Apr 19, 2026 v1.3.0 Apr 18, 2026 Changes in this version + func DetectLanguageFromManifest(path string) string + func ExtractURL(urls map[string]string, homepage string) (owner, repo string, ok bool) + func ParsePrivateKey(keyData string) (*rsa.PrivateKey, error) + func ParseRepoRef(ref string) (owner, repo string, err error) + func ValidateOwner(owner string) error + func ValidateRepo(repo string) error + func ValidateRepoRef(owner, repo string) error + type AppClient struct + func NewAppClient(config AppConfig) *AppClient + func (c *AppClient) AuthorizationURL(state string, allowPrivate bool) string + func (c *AppClient) DeleteInstallation(ctx context.Context, installationID int64) error + func (c *AppClient) ExchangeCode(ctx context.Context, code string) (*UserAccessToken, error) + func (c *AppClient) FetchUser(ctx context.Context, userToken string) (*User, error) + func (c *AppClient) GetAppInstallationCount(ctx context.Context) (int64, error) + func (c *AppClient) GetInstallationToken(ctx context.Context, installationID int64) (*InstallationToken, error) + func (c *AppClient) GetUserInstallation(ctx context.Context, userToken string) (*Installation, error) + func (c *AppClient) GetUserInstallations(ctx context.Context, userToken string) ([]Installation, error) + func (c *AppClient) PollForToken(ctx context.Context, deviceCode string, interval int) (*UserAccessToken, error) + func (c *AppClient) RefreshAccessToken(ctx context.Context, refreshToken string) (*UserAccessToken, error) + func (c *AppClient) RequestDeviceCode(ctx context.Context) (*AppDeviceCodeResponse, error) + func (c *AppClient) RevokeInstallationToken(ctx context.Context, token string) error + func (c *AppClient) RevokeUserToken(ctx context.Context, accessToken string) error + type AppConfig struct + AppID int64 + ClientID string + ClientSecret string + PrivateKey *rsa.PrivateKey + PrivateKeyBytes []byte + RedirectURI string + type AppDeviceCodeResponse struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationURI string + type AppInstallation struct + Account struct{ ... } + AppID int64 + AppSlug string + ID int64 + RepositorySelection string + type Branch struct + Commit string + Name string + Protected bool + type Client struct + func NewClient(backend cache.Cache, token string, cacheTTL time.Duration) *Client + func (c *Client) Fetch(ctx context.Context, owner, repo string, refresh bool) (*integrations.RepoMetrics, error) + func (c *Client) FetchBatch(ctx context.Context, repos []RepoID, refresh bool) (map[string]*integrations.RepoMetrics, error) + func (c *Client) FetchContributorsBatch(ctx context.Context, repos []RepoID) map[string][]integrations.Contributor + type CodeSearchResult struct + Matches []string + Name string + Path string + type ContentClient struct + func NewContentClient(token string) *ContentClient + func (c *ContentClient) DetectManifests(ctx context.Context, owner, repo, ref string, patterns map[string]string) ([]ManifestFile, error) + func (c *ContentClient) DetectManifestsRecursive(ctx context.Context, owner, repo, ref string, patterns map[string]string) ([]ManifestFile, error) + func (c *ContentClient) FetchFile(ctx context.Context, owner, repo, path, ref string) (*FileContent, error) + func (c *ContentClient) FetchFileRaw(ctx context.Context, owner, repo, path, ref string) (string, error) + func (c *ContentClient) FetchUser(ctx context.Context) (*User, error) + func (c *ContentClient) FetchUserOrgs(ctx context.Context) ([]OrgMembership, error) + func (c *ContentClient) FetchUserRepos(ctx context.Context) ([]Repo, error) + func (c *ContentClient) GetAppInstallations(ctx context.Context) ([]AppInstallation, error) + func (c *ContentClient) GetReadme(ctx context.Context, owner, repo, ref string) (*FileContent, error) + func (c *ContentClient) GetRepoInfo(ctx context.Context, owner, repo string) (*RepoInfo, error) + func (c *ContentClient) GetTree(ctx context.Context, owner, repo, branch string) ([]TreeEntry, error) + func (c *ContentClient) HasAppInstallation(ctx context.Context, appSlug string) (*AppInstallation, error) + func (c *ContentClient) ListBranches(ctx context.Context, owner, repo string) ([]Branch, error) + func (c *ContentClient) ListContents(ctx context.Context, owner, repo, path, ref string) ([]ContentItem, error) + func (c *ContentClient) ListTags(ctx context.Context, owner, repo string) ([]Tag, error) + func (c *ContentClient) ResolveVersionToRef(ctx context.Context, owner, repo, version string) (string, error) + func (c *ContentClient) ScanReposForManifests(ctx context.Context, manifestPatterns map[string]string, publicOnly bool) ([]RepoWithManifests, error) + func (c *ContentClient) SearchCode(ctx context.Context, owner, repo, query string) ([]CodeSearchResult, error) + type ContentItem struct + Name string + Path string + Size int + Type string + type DeviceCodeResponse struct + DeviceCode string + ExpiresIn int + Interval int + UserCode string + VerificationURI string + type FileContent struct + Content string + Path string + Size int + type Installation struct + Account struct{ ... } + ID int64 + Permissions struct{ ... } + RepositorySelection string + type InstallationToken struct + ExpiresAt time.Time + Token string + type ManifestFile struct + Language string + Name string + Path string + type OAuthClient struct + func NewOAuthClient(config OAuthConfig) *OAuthClient + func (c *OAuthClient) AuthorizationURL(state string) string + func (c *OAuthClient) ExchangeCode(code string) (*OAuthToken, error) + func (c *OAuthClient) PollForToken(ctx context.Context, deviceCode string, interval int) (*OAuthToken, error) + func (c *OAuthClient) RequestDeviceCode(ctx context.Context) (*DeviceCodeResponse, error) + func (c *OAuthClient) RevokeGrant(ctx context.Context, accessToken string) error + type OAuthConfig struct + ClientID string + ClientSecret string + RedirectURI string + type OAuthToken struct + AccessToken string + Scope string + TokenType string + type Org struct + AvatarURL string + Description string + ID int64 + Login string + type OrgMembership struct + Org Org + Role string + State string + type Repo struct + DefaultBranch string + Description string + FullName string + ID int64 + Language string + Name string + Private bool + UpdatedAt string + type RepoID struct + Name string + Owner string + func (r RepoID) Key() string + type RepoInfo struct + Archived bool + DefaultBranch string + Description string + Forks int + FullName string + Language string + License string + Name string + OpenIssues int + Private bool + Stars int + Topics []string + type RepoWithManifests struct + Manifests []ManifestFile + Repo Repo + type Tag struct + Commit string + Name string + type TreeEntry struct + Path string + Size int + Type string + type User struct + AvatarURL string + Email string + ID int64 + Login string + Name string + type UserAccessToken struct + AccessToken string + ExpiresIn int + RefreshToken string + Scope string + TokenType string