Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrUnexpectedNilResponse = errors.New("go-github returned nil response without error")
Functions ¶
This section is empty.
Types ¶
type Client ¶ added in v0.7.0
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetMostUpdatedIssues ¶ added in v0.7.0
GetMostUpdatedIssues fetches issues from the given repository, sorted by update time (oldest first).
The client is stateless per repository — owner and repo come from Request. Rate limiting is handled transparently by the underlying http.RoundTripper.
Returns a domain-facing Response that never exposes go-github types. Response.NotModified is true when the server returned 304 (ETag matched).
Errors are classified via mapError: transient failures (network, rate limit, 5xx) carry httperr sentinels, permanent failures (401, 404, 422) are returned as-is. Rate limit errors are wrapped in RateLimitError with RetryAfter.
func (*Client) GetRepository ¶ added in v0.12.0
GetRepository fetches repository metadata from GitHub API. Used by preflight to validate repository existence and accessibility.
type Cursor ¶ added in v0.13.0
Cursor carries pagination and conditional-request state for a single API call. Built by the domain layer from SyncCursor; interpreted by Client.
type DomainMapper ¶ added in v0.13.0
type DomainMapper struct{}
func NewDomainMapper ¶ added in v0.13.0
func NewDomainMapper() *DomainMapper
type RateLimitError ¶ added in v0.13.0
RateLimitError is a domain-visible rate limit error. It carries RetryAfter so the caller can sleep precisely until the limit resets. Does NOT depend on go-github — domain imports only this type.
func (*RateLimitError) Error ¶ added in v0.13.0
func (e *RateLimitError) Error() string
func (*RateLimitError) Unwrap ¶ added in v0.13.0
func (e *RateLimitError) Unwrap() error
type Response ¶ added in v0.13.0
type Response struct {
// Issues contains the fetched domain entities. Nil when NotModified is true.
Issues []*entities.Issue
// NextCursor is the recommended cursor for the next request.
// The domain layer persists it as SyncCursor.
NextCursor Cursor
// NotModified is true when the server returned 304 (ETag matched).
// Issues is nil and NextCursor is unchanged in this case.
NotModified bool
}
Response is the domain-facing result of a GitHub API call. It isolates the domain from go-github types — *github.Response never leaves this package.
type Transport ¶ added in v0.13.0
type Transport struct {
// contains filtered or unexported fields
}
Transport is an http.RoundTripper that ... TODO: add full responsibility description
func NewTransport ¶ added in v0.13.0
func NewTransport(throttler *limit.MinIntervalThrottler) *Transport