19 lines
774 B
Go
19 lines
774 B
Go
// Package logic is the Redis inbox (conversation list) contract. No MySQL on this hot path.
|
|
package logic
|
|
|
|
import (
|
|
"context"
|
|
|
|
"spark-server/internal/module/inbox/entity"
|
|
)
|
|
|
|
type Store interface {
|
|
TouchUnread(ctx context.Context, userID, conversationID int64, score int64) error
|
|
TouchRead(ctx context.Context, userID, conversationID int64, score int64) error
|
|
IncrUnread(ctx context.Context, userID, conversationID int64, delta int64) error
|
|
SetPreview(ctx context.Context, conversationID int64, preview []byte) error
|
|
ListUpdatedSince(ctx context.Context, userID, score int64, limit int) ([]entity.DialogHit, error)
|
|
LoadDialogs(ctx context.Context, userID int64, hits []entity.DialogHit) ([]entity.Dialog, error)
|
|
PurgeUser(ctx context.Context, userID int64) error
|
|
}
|