48 lines
1.5 KiB
Go
48 lines
1.5 KiB
Go
//go:build ignore
|
|
// +build ignore
|
|
|
|
package video
|
|
|
|
import "github.com/gin-gonic/gin"
|
|
|
|
// VideoHandler defines the interface for video operations
|
|
type VideoHandler interface {
|
|
GetUploadURL(c *gin.Context)
|
|
CreateVideo(c *gin.Context)
|
|
ListVideos(c *gin.Context)
|
|
GetVideo(c *gin.Context)
|
|
UpdateVideo(c *gin.Context)
|
|
DeleteVideo(c *gin.Context)
|
|
}
|
|
|
|
// UploadURLRequest defines the payload for requesting an upload URL
|
|
type UploadURLRequest struct {
|
|
Filename string `json:"filename" binding:"required"`
|
|
ContentType string `json:"content_type" binding:"required"`
|
|
Size int64 `json:"size" binding:"required"`
|
|
}
|
|
|
|
// CreateVideoRequest defines the payload for creating a video metadata record
|
|
type CreateVideoRequest struct {
|
|
Title string `json:"title" binding:"required"`
|
|
Description string `json:"description"`
|
|
URL string `json:"url" binding:"required"` // The S3 Key or Full URL
|
|
Size int64 `json:"size" binding:"required"`
|
|
Duration int32 `json:"duration"` // Maybe client knows, or we process later
|
|
Format string `json:"format"`
|
|
}
|
|
|
|
type UpdateVideoRequest struct {
|
|
Title string `json:"title" binding:"required"`
|
|
Description string `json:"description"`
|
|
AdTemplateID *string `json:"ad_template_id,omitempty"`
|
|
}
|
|
|
|
type VideoAdConfigPayload struct {
|
|
AdTemplateID string `json:"ad_template_id"`
|
|
TemplateName string `json:"template_name,omitempty"`
|
|
VASTTagURL string `json:"vast_tag_url,omitempty"`
|
|
AdFormat string `json:"ad_format,omitempty"`
|
|
Duration *int `json:"duration,omitempty"`
|
|
}
|