forked from mtusi2026/mtusi2026lab3
feat(app) lab 3 implemented
This commit is contained in:
@@ -10,9 +10,6 @@ import (
|
||||
"github.com/google/uuid"
|
||||
)
|
||||
|
||||
// CursorKeyCtx is the opaque keyset position: (created_at, id) plus the
|
||||
// resource/user the cursor belongs to. ContextID stops a cursor from one chat
|
||||
// or user list being replayed against another.
|
||||
type CursorKeyCtx struct {
|
||||
Time time.Time
|
||||
ID uuid.UUID
|
||||
@@ -88,9 +85,6 @@ func DecodeCursor(cursor string) (*CursorKeyCtx, bool) {
|
||||
return &CursorKeyCtx{Time: parsedTime, ID: parsedID, ContextID: parsedContext}, true
|
||||
}
|
||||
|
||||
// NextCursor returns a cursor pointing at the last item of a page when more
|
||||
// rows exist. limit+1 rows are fetched by the store, so a non-nil cursor means
|
||||
// the next page is known to be non-empty at read time.
|
||||
func NextCursor[T interface {
|
||||
GetID() uuid.UUID
|
||||
GetCreatedAt() time.Time
|
||||
|
||||
Reference in New Issue
Block a user