paging

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const ContextKeyID ctxKeyPaging = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

type Cursor struct {
	IntID     *int       `json:"int_id"`
	CreatedAt *time.Time `json:"created_at"`
	UUID      *uuid.UUID `json:"uuid"`
}

func (Cursor) String

func (c Cursor) String() string

type Parameters

type Parameters struct {
	Limit  uint64  `json:"limit"`
	Cursor *Cursor `json:"cursor"`
	// contains filtered or unexported fields
}

func GetParameters

func GetParameters(ctx context.Context) *Parameters

func NewParameters

func NewParameters(limit uint64, cursor *Cursor, w http.ResponseWriter) Parameters

func (Parameters) SetIntCursor

func (p Parameters) SetIntCursor(id int)

func (Parameters) SetUUIDCursor

func (p Parameters) SetUUIDCursor(uuid uuid.UUID, createdAt time.Time)

Jump to

Keyboard shortcuts

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