Добавьте S3-вложения с дедупликацией и безопасной сверкой хранилищ

This commit is contained in:
2026-11-16 12:36:59 +03:00
parent b323f2dab9
commit d761861def
54 changed files with 5061 additions and 102 deletions
+22
View File
@@ -0,0 +1,22 @@
package attachment
import (
"context"
"github.com/google/uuid"
"time"
)
type Attachment struct {
ID, ChatID, OwnerID uuid.UUID
Filename string
FileHash []byte
SizeBytes int64
MIMEType, Status string
CreatedAt time.Time
}
type Repository interface {
IsMember(context.Context, uuid.UUID, uuid.UUID) (bool, error)
Publish(context.Context, Attachment, string) error
GetForMember(context.Context, uuid.UUID, uuid.UUID) (Attachment, error)
}