Documentation
¶
Index ¶
- Constants
- func AbuseRetryAfter(err error) time.Duration
- func CheckRateLimit(ctx context.Context, resp *github.Response) error
- func Deref(s *string) string
- func GetGitHubDeveloper(ctx context.Context, client *http.Client, username string) (*data.Developer, error)
- func GetLabels(labels []*github.Label) []string
- func GetOrgRepoNames(ctx context.Context, client *http.Client, org string) ([]string, error)
- func GetOrgRepos(ctx context.Context, client *http.Client, org string) ([]*data.Repo, error)
- func GetUserOrgs(ctx context.Context, client *http.Client, username string, limit int) ([]*data.Org, error)
- func GetUsernames(users ...*github.User) []string
- func MapGitHubUserToDeveloperListItem(u *github.User) *data.DeveloperListItem
- func MapOrg(r *github.Organization) *data.Org
- func MapRepo(r *github.Repository) *data.Repo
- func MapUserToDeveloper(u *github.User) *data.Developer
- func ParseDate(t *time.Time) string
- func ParseUsers(body *string) []string
- func RateInfo(r *github.Rate) string
- func SearchGitHubUsers(ctx context.Context, client *http.Client, query string, limit int) ([]*data.DeveloperListItem, error)
- func Trim(s *string) string
- type TokenPool
Constants ¶
View Source
const RateLimitThreshold = 10
Variables ¶
This section is empty.
Functions ¶
func AbuseRetryAfter ¶
AbuseRetryAfter returns the retry-after duration if the error is a secondary (abuse) rate limit error. Returns 0 if the error is not an abuse rate limit.
func GetGitHubDeveloper ¶
func GetOrgRepoNames ¶
func GetOrgRepos ¶
func GetUserOrgs ¶
func GetUsernames ¶
func MapGitHubUserToDeveloperListItem ¶
func MapGitHubUserToDeveloperListItem(u *github.User) *data.DeveloperListItem
func ParseUsers ¶
func SearchGitHubUsers ¶
Types ¶
type TokenPool ¶ added in v0.18.0
type TokenPool struct {
// contains filtered or unexported fields
}
TokenPool manages a pool of GitHub API tokens using round-robin selection. Safe for concurrent use. Works transparently with a single token.
func NewTokenPool ¶ added in v0.18.0
NewTokenPool creates a pool from one or more tokens. Tokens can be passed individually or as a single comma-separated string.
Click to show internal directories.
Click to hide internal directories.