read

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Overview

SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com> SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com> SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2026 Outscale SAS <opensource@outscale.com> SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2025 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2025 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2025 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2025 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

SPDX-FileCopyrightText: 2025 Outscale SAS <opensource@outscale.com>

SPDX-License-Identifier: BSD-3-Clause

Index

Constants

View Source
const MaxPages = 20

Variables

This section is empty.

Functions

This section is empty.

Types

type FetchPage

type FetchPage struct {
	Method reflect.Value
	Args   []reflect.Value
}

func (*FetchPage) Call

func (f *FetchPage) Call(ctx context.Context) []reflect.Value

type FirstItemPager

type FirstItemPager struct{}

func (FirstItemPager) HasMore

func (FirstItemPager) HasMore(res reflect.Value) bool

func (FirstItemPager) NextItem

func (FirstItemPager) NextItem(res reflect.Value, fetch FetchPage, nextIndex int) (FetchPage, bool)

type Interface

type Interface interface {
	Read(ctx context.Context, fetch FetchPage) iter.Seq[result.Result]
}

type NonePager

type NonePager struct{}

func (NonePager) HasMore

func (p NonePager) HasMore(res reflect.Value) bool

func (NonePager) NextItem

func (p NonePager) NextItem(res reflect.Value, fetch FetchPage, _ int) (FetchPage, bool)

type Pager

type Pager interface {
	HasMore(res reflect.Value) bool
	NextItem(res reflect.Value, fetch FetchPage, nextIndex int) (FetchPage, bool)
}

func PagerFor

func PagerFor(fetch FetchPage) Pager

type Paginated

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

func NewPaginated

func NewPaginated(contentField string) *Paginated

func (*Paginated) Read

func (p *Paginated) Read(ctx context.Context, fetch FetchPage) iter.Seq[result.Result]

type Raw

type Raw struct{}

func NewRaw

func NewRaw() *Raw

func (*Raw) Read

func (p *Raw) Read(ctx context.Context, fetch FetchPage) iter.Seq[result.Result]

type TokenPager

type TokenPager struct{}

func (TokenPager) HasMore

func (p TokenPager) HasMore(res reflect.Value) bool

func (TokenPager) NextItem

func (p TokenPager) NextItem(res reflect.Value, fetch FetchPage, _ int) (FetchPage, bool)

Jump to

Keyboard shortcuts

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