Files
thamanyah/cms/internal/services/status.go
T
FahdShalhoub aa32bb6ed8
Build, Push and Deploy CMS / build-push-deploy (push) Failing after 2m2s
FEAT: Added MOre Video Statuses
2026-08-17 00:13:22 +03:00

24 lines
961 B
Go

package services
// VideoStatus is the transcoding lifecycle state of a video, stored verbatim
// in videos.status. The set is closed on both sides: the database rejects
// anything outside it via the videos_status_check constraint. Adding a state
// means adding a constant here, widening that constraint in a new migration,
// and extending the `enums` annotation on api.VideoResponse.Status.
type VideoStatus string
const (
// VideoStatusProcessing is set when the MediaConvert job is queued. Every
// video starts here, and nothing moves it on yet — see Known gaps.
VideoStatusProcessing VideoStatus = "processing"
// VideoStatusReady means transcoding finished and the output is in the
// encoded bucket, reachable through CloudFront.
VideoStatusReady VideoStatus = "ready"
// VideoStatusFailed means the MediaConvert job ended in an error.
VideoStatusFailed VideoStatus = "failed"
)
func (s VideoStatus) String() string {
return string(s)
}