Documentation
¶
Index ¶
- Variables
- func ShouldStop(err error) bool
- type AsyncPaginationRawDriver
- func (d *AsyncPaginationRawDriver) OnBadResponse(resp *http.Response, err error)
- func (d *AsyncPaginationRawDriver) OnFinish(resp *http.Response, pageCount int) error
- func (d *AsyncPaginationRawDriver) OnNextRequest(request *http.Request, pageCount int) error
- func (d *AsyncPaginationRawDriver) OnNextResponse(resp *http.Response, nextRequest *http.Request, pageCount int) (err error)
- type Driver
- type GithubAsyncPaginationDriver
- type SyncPaginationDriver
- func (d *SyncPaginationDriver) OnBadResponse(resp *http.Response, err error)
- func (d *SyncPaginationDriver) OnFinish(resp *http.Response, pageCount int) error
- func (d *SyncPaginationDriver) OnNextRequest(request *http.Request, pageCount int) error
- func (d *SyncPaginationDriver) OnNextResponse(resp *http.Response, nextRequest *http.Request, pageCount int) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrStopPagination = errors.New("stop pagination")
Functions ¶
func ShouldStop ¶
Types ¶
type AsyncPaginationRawDriver ¶
type AsyncPaginationRawDriver struct {
// contains filtered or unexported fields
}
func NewAsyncPaginationRawDriver ¶
func NewAsyncPaginationRawDriver(handler asyncPaginationRawHandler) *AsyncPaginationRawDriver
func (*AsyncPaginationRawDriver) OnBadResponse ¶
func (d *AsyncPaginationRawDriver) OnBadResponse(resp *http.Response, err error)
func (*AsyncPaginationRawDriver) OnFinish ¶
func (d *AsyncPaginationRawDriver) OnFinish(resp *http.Response, pageCount int) error
func (*AsyncPaginationRawDriver) OnNextRequest ¶
func (d *AsyncPaginationRawDriver) OnNextRequest(request *http.Request, pageCount int) error
func (*AsyncPaginationRawDriver) OnNextResponse ¶
type GithubAsyncPaginationDriver ¶
type GithubAsyncPaginationDriver[DataType any] struct { AsyncPaginationRawDriver }
GithubAsyncPaginationDriver is a wrapper around the raw driver. it is used to translate the raw responses to go-github styled responses. both sliced and search responses are translated to searchresult.Typed, so that the interface is simpler and unified.
func NewGithubAsyncPaginationDriver ¶
func NewGithubAsyncPaginationDriver[DataType any](handler githubAsyncPaginationHandler[DataType], isSearchResponse bool) *GithubAsyncPaginationDriver[DataType]
type SyncPaginationDriver ¶
type SyncPaginationDriver struct {
// contains filtered or unexported fields
}
func NewSyncPaginationDriver ¶
func NewSyncPaginationDriver() *SyncPaginationDriver
func (*SyncPaginationDriver) OnBadResponse ¶
func (d *SyncPaginationDriver) OnBadResponse(resp *http.Response, err error)
func (*SyncPaginationDriver) OnFinish ¶
func (d *SyncPaginationDriver) OnFinish(resp *http.Response, pageCount int) error
func (*SyncPaginationDriver) OnNextRequest ¶
func (d *SyncPaginationDriver) OnNextRequest(request *http.Request, pageCount int) error
func (*SyncPaginationDriver) OnNextResponse ¶
Click to show internal directories.
Click to hide internal directories.