pagination

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	// contains filtered or unexported fields
}

func Query

func Query(ctx context.Context, client *githubv4.Client, query PagedQuery, vars map[string]any) (*Cursor, error)

func (*Cursor) Next

func (c *Cursor) Next() (any, error)

func (*Cursor) Total

func (c *Cursor) Total() int

type PagedQuery

type PagedQuery interface {
	Total() int
	Length() int
	Get(int) any
	HasNextPage() bool
	NextPageVars() map[string]any
}

PagedQuery implementors go from being regular query struct passed to githubv4.Query() to a query that can be paginated.

Jump to

Keyboard shortcuts

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