This commit is contained in:
2024-04-21 14:42:52 +02:00
parent 4b69674ede
commit 8a25f53c99
10700 changed files with 55767 additions and 14201 deletions

View File

@ -0,0 +1,49 @@
package model
const (
SnapshotStatusNew = "new"
SnapshotStatusProcessing = "processing"
SnapshotStatusReady = "ready"
SnapshotStatusError = "error"
)
type Snapshot interface {
GetID() string
GetVersion() int64
GetOriginal() *S3Object
GetPreview() *S3Object
GetText() *S3Object
GetThumbnail() *Thumbnail
HasOriginal() bool
HasPreview() bool
HasText() bool
HasThumbnail() bool
GetStatus() string
GetCreateTime() string
GetUpdateTime() *string
SetID(string)
SetVersion(int64)
SetOriginal(*S3Object)
SetPreview(*S3Object)
SetText(*S3Object)
SetThumbnail(*Thumbnail)
SetStatus(string)
}
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 Thumbnail struct {
Base64 string `json:"base64"`
Width int `json:"width"`
Height int `json:"height"`
}