Documentation
¶
Index ¶
Constants ¶
View Source
const ( MaxPageSize = int32(500) DefaultPageSize = MaxPageSize PageSizeQueryParam = "page_size" PageCursorQueryParam = "page_cursor" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config[T any, C comparable] struct { CursorParser CursorParserFunc[C] CursorGetter CursorGetterFunc[T] Lister ListFunc[T, C] }
type CursorGetterFunc ¶
type CursorParserFunc ¶
type CursorParserFunc[C comparable] func(rawCursor string) (*C, error)
func IDCursorParser ¶
func IDCursorParser[ID id.ID, PT id.SubtypePtr[ID]]() CursorParserFunc[ID]
func Int64CursorParser ¶
func Int64CursorParser() CursorParserFunc[int64]
type ListFunc ¶
type ListFunc[T any, C comparable] func(filter PageFilter[C]) ([]T, error)
type PageFilter ¶
type PageFilter[C comparable] struct { Size int32 Cursor *C }
Click to show internal directories.
Click to hide internal directories.