e3461dd5cd
* stage 1: project init * stage 2: skeleton with navigation * step 2.5: streams list * step 4: stream playback experience * step 5-6: compose experience * fix: broken record * transcode media particles to mp4 * build: reproducible go generate * build: rename skaffold module for particle processor worker * infra: increase particle processor worker resources Was dealing with OOM errors * tweaks to mobile * log transcode work * view on desktop placeholder * tweak padding * cap video resolution to save on memory * infra: bump memory limits as insurance * ux improvements * update bundle id for mobile * config for mobile
48 lines
1.3 KiB
Go
48 lines
1.3 KiB
Go
package depot
|
|
|
|
import "time"
|
|
|
|
// Object represents a stored object in the depot
|
|
type Object struct {
|
|
ID string
|
|
Name string
|
|
ContentType string
|
|
ContentLength int64
|
|
BucketName string
|
|
ObjectKey string
|
|
ContainsContent bool
|
|
CreatedAt time.Time
|
|
}
|
|
|
|
// PrepareUploadInput represents the input for preparing an upload
|
|
type PrepareUploadInput struct {
|
|
Prefix string // Optional prefix for organizing objects (e.g., network_id)
|
|
Name string
|
|
ContentType string
|
|
ContentLength int64
|
|
}
|
|
|
|
// PrepareUploadResult represents the result of preparing an upload
|
|
type PrepareUploadResult struct {
|
|
ObjectID string
|
|
UploadURL string
|
|
UploadHeaders map[string]string
|
|
}
|
|
|
|
// CreateFromReaderInput is for server-side direct uploads (no presigned URL).
|
|
// Used by background workers that already have the bytes on hand and don't
|
|
// need a client round-trip.
|
|
type CreateFromReaderInput struct {
|
|
Prefix string // Optional prefix for organizing objects (e.g., network_id)
|
|
Name string
|
|
ContentType string
|
|
}
|
|
|
|
// Config holds configuration for the depot service
|
|
type Config struct {
|
|
GoogleServiceAccountEmail string
|
|
BucketName string
|
|
UploadURLExpiry time.Duration
|
|
DownloadURLExpiry time.Duration
|
|
}
|