aboutsummaryrefslogtreecommitdiff
path: root/pkg/components/media/model.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/components/media/model.go')
-rw-r--r--pkg/components/media/model.go64
1 files changed, 0 insertions, 64 deletions
diff --git a/pkg/components/media/model.go b/pkg/components/media/model.go
deleted file mode 100644
index 1962a23..0000000
--- a/pkg/components/media/model.go
+++ /dev/null
@@ -1,64 +0,0 @@
-package media
-
-import (
- "context"
- "strings"
- "time"
-)
-
-type (
- Media struct {
- ID uint
- Name string
- Path string
- PathHash string
- MIMEType string
- }
-
- MediaEXIF struct {
- Width *float64
- Height *float64
- Description *string
- Camera *string
- Maker *string
- Lens *string
- DateShot *time.Time
- Exposure *float64
- Aperture *float64
- Iso *int64
- FocalLength *float64
- Flash *int64
- Orientation *int64
- ExposureProgram *int64
- GPSLatitude *float64
- GPSLongitude *float64
- }
-
- Pagination struct {
- Page int
- Size int
- }
-
- CreateMedia struct {
- Name string
- Path string
- PathHash string
- MIMEType string
- }
-
- Repository interface {
- Create(context.Context, *CreateMedia) error
- Exists(context.Context, string) (bool, error)
- List(context.Context, *Pagination) ([]*Media, error)
- Get(context.Context, string) (*Media, error)
- GetPath(context.Context, string) (string, error)
-
- GetEmptyEXIF(context.Context, *Pagination) ([]*Media, error)
- GetEXIF(context.Context, uint) (*MediaEXIF, error)
- CreateEXIF(context.Context, uint, *MediaEXIF) error
- }
-)
-
-func (m *Media) IsVideo() bool {
- return strings.HasPrefix(m.MIMEType, "video")
-}