Documentation
¶
Overview ¶
Package githubapi holds GitHub API plumbing every host shares: the GraphQL transport that recognises primary and secondary rate limits, and the GraphQL scalars GitHub's schema adds. It makes no requests of its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RateLimitTransport ¶
func RateLimitTransport(base http.RoundTripper) http.RoundTripper
RateLimitTransport preserves rate-limit information that the GraphQL client otherwise reduces to a generic HTTP error: a limited response becomes a *RateLimitError. It inspects at most a small prefix and streams the remainder of larger successful responses unchanged.
Types ¶
type BigInt ¶
type BigInt int64
BigInt decodes GitHub's BigInt scalar, which arrives as a JSON string or number; null decodes as zero.
func (*BigInt) UnmarshalJSON ¶
type GitObjectID ¶
type GitObjectID string
GitObjectID is a commit SHA passed as a GraphQL variable, typed as GitHub's GitObjectID scalar.
func (GitObjectID) GetGraphQLType ¶
func (GitObjectID) GetGraphQLType() string
type RateLimitError ¶
RateLimitError is GitHub refusing a GraphQL request for a primary or secondary rate limit. ResumeAt is when GitHub said to try again, and zero when it did not say.
func (*RateLimitError) Error ¶
func (e *RateLimitError) Error() string