Сделать отправку сообщения идемпотентной по Idempotency-Key с общей таблицей ключей и их чисткой

This commit is contained in:
2026-11-02 17:11:04 +03:00
parent 7fa8881eb3
commit 951fd0d517
19 changed files with 856 additions and 40 deletions
+4
View File
@@ -28,6 +28,10 @@ const (
// member of, so outsiders cannot probe for existence.
var ErrNotFound = apperr.NotFound("chat not found")
// ErrKeyReused answers a send whose Idempotency-Key is already bound to a
// message with a different text.
var ErrKeyReused = apperr.Conflict("Idempotency-Key was already used with a different message")
type Chat struct {
ID uuid.UUID
Title string