Movatterモバイル変換


[0]ホーム

URL:


Notice  The highest tagged major version isv3.

pagination

package
v1.12.0Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License:Apache-2.0Imports:7Imported by:6

Details

Repository

github.com/openai/openai-go

Links

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

typeCursorPage

type CursorPage[Tany] struct {Data    []T  `json:"data"`HasMorebool `json:"has_more"`// JSON contains metadata for fields, check presence with [respjson.Field.Valid].JSON struct {Datarespjson.FieldHasMorerespjson.FieldExtraFields map[string]respjson.Field// contains filtered or unexported fields} `json:"-"`// contains filtered or unexported fields}

func (*CursorPage[T])GetNextPage

func (r *CursorPage[T]) GetNextPage() (res *CursorPage[T], errerror)

GetNextPage returns the next page as defined by this pagination style. Whenthere is no next page, this function will return a 'nil' for the page value, butwill not return an error

func (CursorPage[T])RawJSON

func (rCursorPage[T]) RawJSON()string

Returns the unmodified JSON received from the API

func (*CursorPage[T])SetPageConfig

func (r *CursorPage[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*CursorPage[T])UnmarshalJSON

func (r *CursorPage[T]) UnmarshalJSON(data []byte)error

typeCursorPageAutoPager

type CursorPageAutoPager[Tany] struct {// contains filtered or unexported fields}

funcNewCursorPageAutoPager

func NewCursorPageAutoPager[Tany](page *CursorPage[T], errerror) *CursorPageAutoPager[T]

func (*CursorPageAutoPager[T])Current

func (r *CursorPageAutoPager[T]) Current() T

func (*CursorPageAutoPager[T])Err

func (r *CursorPageAutoPager[T]) Err()error

func (*CursorPageAutoPager[T])Index

func (r *CursorPageAutoPager[T]) Index()int

func (*CursorPageAutoPager[T])Next

func (r *CursorPageAutoPager[T]) Next()bool

typePage

type Page[Tany] struct {Data   []T    `json:"data"`Objectstring `json:"object,required"`// JSON contains metadata for fields, check presence with [respjson.Field.Valid].JSON struct {Datarespjson.FieldObjectrespjson.FieldExtraFields map[string]respjson.Field// contains filtered or unexported fields} `json:"-"`// contains filtered or unexported fields}

func (*Page[T])GetNextPage

func (r *Page[T]) GetNextPage() (res *Page[T], errerror)

GetNextPage returns the next page as defined by this pagination style. Whenthere is no next page, this function will return a 'nil' for the page value, butwill not return an error

func (Page[T])RawJSON

func (rPage[T]) RawJSON()string

Returns the unmodified JSON received from the API

func (*Page[T])SetPageConfig

func (r *Page[T]) SetPageConfig(cfg *requestconfig.RequestConfig, res *http.Response)

func (*Page[T])UnmarshalJSON

func (r *Page[T]) UnmarshalJSON(data []byte)error

typePageAutoPager

type PageAutoPager[Tany] struct {// contains filtered or unexported fields}

funcNewPageAutoPager

func NewPageAutoPager[Tany](page *Page[T], errerror) *PageAutoPager[T]

func (*PageAutoPager[T])Current

func (r *PageAutoPager[T]) Current() T

func (*PageAutoPager[T])Err

func (r *PageAutoPager[T]) Err()error

func (*PageAutoPager[T])Index

func (r *PageAutoPager[T]) Index()int

func (*PageAutoPager[T])Next

func (r *PageAutoPager[T]) Next()bool

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp