Добавьте S3-вложения с дедупликацией и безопасной сверкой хранилищ
This commit is contained in:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user