page

package
v0.0.0-...-4263410 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Limit

func Limit(ctx context.Context) limitOffset

func Offset

func Offset(ctx context.Context) limitOffset

func Token

func Token(ctx context.Context) string

func WithLimit

func WithLimit(ctx context.Context, limitStr string) context.Context

WithLimit returns context copy with limit value.

func WithOffset

func WithOffset(ctx context.Context, offsetStr string) context.Context

WithOffset returns context copy with offset value.

func WithToken

func WithToken(ctx context.Context, token string) context.Context

WithToken returns context copy with token value.

Types

type Links struct {
	Previous string `json:"previous"`
	Next     string `json:"next"`
}

type Metadata

type Metadata struct {
	Total int   `json:"total,omitempty"`
	Links Links `json:"links,omitempty"`
}

func NewOffsetMetadata

func NewOffsetMetadata(ctx context.Context, r *http.Request, total int) *Metadata

func NewTokenMetadata

func NewTokenMetadata(ctx context.Context, r *http.Request, nextToken string) *Metadata

Jump to

Keyboard shortcuts

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