Documentation ¶
Index ¶
- Constants
- func Base64[T any](next relay.ApplyCursorsFunc[T]) relay.ApplyCursorsFunc[T]
- 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 GCM[T any](gcm cipher.AEAD) relay.CursorMiddleware[T]
- func NewGCM(key []byte) (cipher.AEAD, error)
- func NewKeysetAdapter[T any](finder KeysetFinder[T]) relay.ApplyCursorsFunc[T]
- func NewOffsetAdapter[T any](finder OffsetFinder[T]) relay.ApplyCursorsFunc[T]
- type KeysetFinder
- type OffsetFinder
- type OffsetFinderFunc
Constants ¶
View Source
const KeysetTagKey = "relay"
Variables ¶
This section is empty.
Functions ¶
func Base64 ¶
func Base64[T any](next relay.ApplyCursorsFunc[T]) relay.ApplyCursorsFunc[T]
func DecodeKeysetCursor ¶
func DecodeOffsetCursor ¶
func EncodeOffsetCursor ¶
func NewGCM ¶ added in v0.1.0
NewGCM creates a new GCM cipher Concurrent safe: https://github.com/golang/go/issues/41689
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`, you can't skip totalCount.
Types ¶
type KeysetFinder ¶
type OffsetFinder ¶
Click to show internal directories.
Click to hide internal directories.