Переведите приём и чтение вложений на асинхронный контракт
This commit is contained in:
@@ -9,19 +9,23 @@ import (
|
||||
type FileStatus string
|
||||
|
||||
const (
|
||||
FilePending FileStatus = "pending"
|
||||
FileReady FileStatus = "ready"
|
||||
FileFailed FileStatus = "failed"
|
||||
FileQueued FileStatus = "queued"
|
||||
FileProcessing FileStatus = "processing"
|
||||
FilePending FileStatus = "pending"
|
||||
FileReady FileStatus = "ready"
|
||||
FileFailed FileStatus = "failed"
|
||||
)
|
||||
|
||||
type Attachment struct {
|
||||
ID, ChatID, OwnerID uuid.UUID
|
||||
Filename string
|
||||
FileHash []byte
|
||||
SizeBytes int64
|
||||
MIMEType string
|
||||
Status FileStatus
|
||||
CreatedAt time.Time
|
||||
ID, ChatID, OwnerID uuid.UUID
|
||||
Filename string
|
||||
FileHash []byte
|
||||
SizeBytes int64
|
||||
MIMEType string
|
||||
Status FileStatus
|
||||
CreatedAt, UpdatedAt time.Time
|
||||
ErrorCode *string
|
||||
Variants []Variant
|
||||
}
|
||||
|
||||
type UploadInput struct {
|
||||
@@ -30,3 +34,12 @@ type UploadInput struct {
|
||||
MIMEType string
|
||||
SizeBytes int64
|
||||
}
|
||||
|
||||
type Variant struct {
|
||||
Name string
|
||||
ObjectKey string
|
||||
MIMEType string
|
||||
SizeBytes int64
|
||||
Width, Height int
|
||||
Hash []byte
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user