Documentation ¶
Index ¶
- func GetGitHubPerPageFromCtx(ctx services.Context) int
- func GetGitHubRateLimitFromCtx(ctx services.Context) *rate.Limiter
- func GetGitHubTokenFromCtx(ctx services.Context) string
- func NewBranchModule(opts *Options) sqlite.Module
- func NewGitHubUserFunc(opts *Options) sqlite.Function
- func NewIssueCommentsModule(opts *Options) sqlite.Module
- func NewIssuesModule(opts *Options) sqlite.Module
- func NewOrgAuditModule(opts *Options) sqlite.Module
- func NewOrgReposModule(opts *Options) sqlite.Module
- func NewPRCommentsModule(opts *Options) sqlite.Module
- func NewPRCommitsModule(opts *Options) sqlite.Module
- func NewPRModule(opts *Options) sqlite.Module
- func NewPRReviewsModule(opts *Options) sqlite.Module
- func NewProtectionsModule(opts *Options) sqlite.Module
- func NewRepoCommitsModule(opts *Options) sqlite.Module
- func NewRepoFileContentFunc(opts *Options) sqlite.Function
- func NewRepoInfoFunc(opts *Options) sqlite.Function
- func NewStargazersModule(opts *Options) sqlite.Module
- func NewStarredReposFunc(opts *Options) sqlite.Function
- func NewStarredReposModule(opts *Options) sqlite.Module
- func NewUserReposModule(opts *Options) sqlite.Module
- func Register(ext *sqlite.ExtensionApi, opt *options.Options) (_ sqlite.ErrorCode, err error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetGitHubPerPageFromCtx ¶
GetGitHubPerPageFromCtx looks up the githubPerPage key in the supplied context and returns it if set, otherwise it returns a default of 50
func GetGitHubRateLimitFromCtx ¶
GetGitHubRateLimitFromCtx looks up the githubRateLimit key in the supplied context and parses it to return a client side rate limit in the form "(number of reqs)/(number of seconds)". For instance a string "2/3" would yield a rate limiter that permis 2 requests every 3 seconds. A single integer is also permitted, which assumes the "denominator" is 1 second. So a value of "5" would simple mean 5 requests per second. If the string cannot be parsed, nil is returned.
func GetGitHubTokenFromCtx ¶
GetGitHubTokenFromCtx looks up the githubToken key in the supplied context and returns it if set
func NewBranchModule ¶
func NewGitHubUserFunc ¶
func NewIssueCommentsModule ¶
func NewIssuesModule ¶
func NewOrgAuditModule ¶
func NewOrgReposModule ¶
func NewPRCommentsModule ¶
func NewPRCommitsModule ¶
func NewPRModule ¶
func NewPRReviewsModule ¶
func NewProtectionsModule ¶
func NewRepoCommitsModule ¶
func NewRepoFileContentFunc ¶
func NewRepoInfoFunc ¶
func NewStargazersModule ¶
func NewStarredReposFunc ¶
func NewStarredReposModule ¶
func NewUserReposModule ¶
Types ¶
type Options ¶
type Options struct { Client func() *githubv4.Client RateLimiter *rate.Limiter RateLimitHandler func(*options.GitHubRateLimitResponse) GitHubPreRequestHook func() GitHubPostRequestHook func() // PerPage is the default number of items per page to use when making a paginated GitHub API request PerPage int Logger *zerolog.Logger }