Documentation ¶
Index ¶
- Constants
- func DecodeKeysetCursor[T any](cursor string, keys []string) (map[string]any, error)
- func DecodeOffsetCursor(cursor string) (int, error)
- func EncodeKeysetCursor[T any](node T, keys []string) (string, error)
- func EncodeOffsetCursor(offset int) string
- func NewKeysetAdapter[T any](finder KeysetFinder[T]) relay.ApplyCursorsFunc[T]
- func NewOffsetAdapter[T any](finder OffsetFinder[T]) relay.ApplyCursorsFunc[T]
- func WrapAES[T any](next relay.ApplyCursorsFunc[T], encryptionKey []byte) relay.ApplyCursorsFunc[T]
- func WrapBase64[T any](next relay.ApplyCursorsFunc[T]) relay.ApplyCursorsFunc[T]
- type Counter
- type KeysetFinder
- type KeysetFinderFunc
- type OffsetFinder
- type OffsetFinderFunc
Constants ¶
View Source
const KeysetTagKey = "relay"
Variables ¶
This section is empty.
Functions ¶
func DecodeKeysetCursor ¶
func DecodeOffsetCursor ¶
func EncodeOffsetCursor ¶
func NewKeysetAdapter ¶
func NewKeysetAdapter[T any](finder KeysetFinder[T]) relay.ApplyCursorsFunc[T]
func NewOffsetAdapter ¶
func NewOffsetAdapter[T any](finder OffsetFinder[T]) relay.ApplyCursorsFunc[T]
NewOffsetAdapter creates a relay.ApplyCursorsFunc from an OffsetFinder. If you want to use `last!=nil&&before==nil`, the finder must implement Counter.
func WrapAES ¶
func WrapAES[T any](next relay.ApplyCursorsFunc[T], encryptionKey []byte) relay.ApplyCursorsFunc[T]
func WrapBase64 ¶
func WrapBase64[T any](next relay.ApplyCursorsFunc[T]) relay.ApplyCursorsFunc[T]
Types ¶
type KeysetFinder ¶
type KeysetFinderFunc ¶
type OffsetFinder ¶
Click to show internal directories.
Click to hide internal directories.