feat: add shared idempotency and replica identity

This commit is contained in:
2026-10-02 14:39:27 +03:00
parent 0ab3a341aa
commit 563aa26a92
31 changed files with 3574 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
package model
import (
"encoding/json"
"testing"
"time"
)
func TestUserTimestampHasFixedMicroseconds(t *testing.T) {
createdAt := time.Date(2026, time.September, 23, 21, 28, 15, 423030000, time.UTC)
data, err := json.Marshal(User{ID: "id", Username: "user", DisplayName: "User", CreatedAt: createdAt})
if err != nil {
t.Fatalf("Marshal() error = %v", err)
}
if string(data) != `{"id":"id","username":"user","display_name":"User","created_at":"2026-09-23T21:28:15.423030Z"}` {
t.Fatalf("Marshal() = %s", data)
}
}