spark-server/internal/module/upload/entity/credential.go
2026-09-18 17:14:38 +08:00

23 lines
711 B
Go

// Package entity holds upload credential types. Message content stores the object key only.
package entity
type Credential struct {
ObjectKey string `json:"object_key"`
UploadURL string `json:"upload_url"`
Method string `json:"method"`
Headers map[string]string `json:"headers"`
ExpiresIn int64 `json:"expires_in"`
}
// CredentialSet is one HTTP round-trip for up to three PUTs (thumb / preview / orig).
type CredentialSet struct {
Items []Credential `json:"items"`
}
type Download struct {
ObjectKey string `json:"object_key"`
DownloadURL string `json:"download_url"`
Method string `json:"method"`
ExpiresIn int64 `json:"expires_in"`
}