read

package
v0.0.27 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: BSD-3-Clause Imports: 16 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

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 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) *Paginated

func (*Paginated) Read

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