forked from mtusi2026/mtusi2026lab6
49 lines
1.2 KiB
Go
49 lines
1.2 KiB
Go
package dto
|
|
|
|
import (
|
|
"gitea.privcloud.tech/mtusi2026/internal/gen/contracts"
|
|
"github.com/google/uuid"
|
|
"io"
|
|
"time"
|
|
)
|
|
|
|
type AttachmentRecord struct {
|
|
Public contracts.Attachment
|
|
Key string
|
|
StagingKey string
|
|
PipelineVersion int
|
|
VariantKeys map[string]string
|
|
Missing bool
|
|
}
|
|
type UploadAttachment struct {
|
|
UserID, ChatID uuid.UUID
|
|
Filename, ContentType string
|
|
Body io.Reader
|
|
}
|
|
type AttachmentContent struct {
|
|
Body io.ReadCloser
|
|
ContentType string
|
|
Size int64
|
|
}
|
|
type JobMessage struct {
|
|
Traceparent string `json:"traceparent,omitempty"`
|
|
Tracestate string `json:"tracestate,omitempty"`
|
|
SchemaVersion int `json:"schema_version"`
|
|
JobID uuid.UUID `json:"job_id"`
|
|
Type string `json:"type"`
|
|
AttachmentID uuid.UUID `json:"attachment_id"`
|
|
PipelineVersion int `json:"pipeline_version"`
|
|
Attempt int `json:"attempt"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
}
|
|
type AttachmentJob struct {
|
|
Message JobMessage
|
|
State string
|
|
Token uuid.UUID
|
|
LeaseUntil *time.Time
|
|
NextAttemptAt time.Time
|
|
AttemptLimit int
|
|
ErrorCode *string
|
|
UpdatedAt time.Time
|
|
}
|