read

package
v0.0.36 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: BSD-3-Clause Imports: 16 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

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

SPDX-License-Identifier: BSD-3-Clause

Index

Constants

This section is empty.

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

func (*FetchPage) Clone added in v0.0.30

func (f *FetchPage) Clone() FetchPage

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 int) 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 OOSPager added in v0.0.14

type OOSPager struct{}

func (OOSPager) HasMore added in v0.0.14

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

func (OOSPager) NextItem added in v0.0.14

func (p OOSPager) 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, maxPages int) *Paginated

func (*Paginated) Read

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

type PreviewReader added in v0.0.14

type PreviewReader struct {
	io.ReadCloser
}

PreviewReader is a wrapper around the object body, as returned by GetObject.

func (PreviewReader) MarshalText added in v0.0.14

func (o PreviewReader) MarshalText() ([]byte, error)

MarshalText allows previewing the body in JSON/YAML dumps. Note: this only works if the reader has not been consumed.

type Raw

type Raw struct{}

func NewRaw

func NewRaw() *Raw

func (*Raw) Read

func (p *Raw) Read(ctx context.Context, fetch FetchPage, iter int) 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