ghutil

package
v0.17.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const RateLimitThreshold = 10

Variables

This section is empty.

Functions

func AbuseRetryAfter

func AbuseRetryAfter(err error) time.Duration

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 CheckRateLimit

func CheckRateLimit(resp *github.Response)

func Deref

func Deref(s *string) string

func GetGitHubDeveloper

func GetGitHubDeveloper(ctx context.Context, client *http.Client, username string) (*data.Developer, error)

func GetLabels

func GetLabels(labels []*github.Label) []string

func GetOrgRepoNames

func GetOrgRepoNames(ctx context.Context, client *http.Client, org string) ([]string, error)

func GetOrgRepos

func GetOrgRepos(ctx context.Context, client *http.Client, org string) ([]*data.Repo, error)

func GetUserOrgs

func GetUserOrgs(ctx context.Context, client *http.Client, username string, limit int) ([]*data.Org, error)

func GetUsernames

func GetUsernames(users ...*github.User) []string

func MapGitHubUserToDeveloperListItem

func MapGitHubUserToDeveloperListItem(u *github.User) *data.DeveloperListItem

func MapOrg

func MapOrg(r *github.Organization) *data.Org

func MapRepo

func MapRepo(r *github.Repository) *data.Repo

func MapUserToDeveloper

func MapUserToDeveloper(u *github.User) *data.Developer

func ParseDate

func ParseDate(t *time.Time) string

func ParseUsers

func ParseUsers(body *string) []string

func RateInfo

func RateInfo(r *github.Rate) string

func SearchGitHubUsers

func SearchGitHubUsers(ctx context.Context, client *http.Client, query string, limit int) ([]*data.DeveloperListItem, error)

func Trim

func Trim(s *string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL