lab4: вложения в S3 (MinIO), reconciler PostgreSQL↔S3, тесты и CI

This commit is contained in:
2026-11-04 20:11:33 +03:00
parent ec540a1a72
commit 77b6e5c2c7
86 changed files with 6921 additions and 2 deletions
+25
View File
@@ -0,0 +1,25 @@
package domain
import (
"encoding/json"
"time"
)
type User struct {
ID string `json:"id"`
Username string `json:"username"`
DisplayName string `json:"display_name"`
CreatedAt time.Time `json:"created_at"`
}
// MarshalJSON форматирует CreatedAt в RFC3339 без микросекунд.
func (u User) MarshalJSON() ([]byte, error) {
type Alias User
return json.Marshal(&struct {
Alias
CreatedAt string `json:"created_at"`
}{
Alias: Alias(u),
CreatedAt: u.CreatedAt.UTC().Truncate(time.Second).Format(time.RFC3339),
})
}