ajout app

This commit is contained in:
2024-04-17 20:22:30 +02:00
parent cc017cfc5e
commit f9d05a2fd3
8025 changed files with 729805 additions and 0 deletions

View File

@ -0,0 +1,15 @@
package core
const (
PipelinePDF = "pdf"
PipelineOffice = "office"
PipelineImage = "image"
PipelineVideo = "video"
)
const (
SnapshotStatusNew = "new"
SnapshotStatusProcessing = "processing"
SnapshotStatusReady = "ready"
SnapshotStatusError = "error"
)

View File

@ -0,0 +1,43 @@
package core
type PipelineRunOptions struct {
FileID string `json:"fileId"`
SnapshotID string `json:"snapshotId"`
Bucket string `json:"bucket"`
Key string `json:"key"`
}
type SnapshotUpdateOptions struct {
Options PipelineRunOptions `json:"options,omitempty"`
Original *S3Object `json:"original,omitempty"`
Preview *S3Object `json:"preview,omitempty"`
Text *S3Object `json:"text,omitempty"`
Thumbnail *ImageBase64 `json:"thumbnail,omitempty"`
Status string `json:"status,omitempty"`
}
type S3Object struct {
Bucket string `json:"bucket"`
Key string `json:"key"`
Size int64 `json:"size"`
Image *ImageProps `json:"image,omitempty"`
}
type ImageProps struct {
Width int `json:"width"`
Height int `json:"height"`
}
type ImageBase64 struct {
Base64 string `json:"base64"`
Width int `json:"width"`
Height int `json:"height"`
}
type Pipeline interface {
Run(PipelineRunOptions) error
}
type Builder interface {
Build(PipelineRunOptions) error
}