From 6e84441dab0a2b89869e33d7e89d14189d9b67c0 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sat, 1 Jul 2023 17:55:50 +0200 Subject: feat: Add thumbnailer --- pkg/database/repository/media.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'pkg/database/repository') diff --git a/pkg/database/repository/media.go b/pkg/database/repository/media.go index 2e94ff3..6ab4ee6 100644 --- a/pkg/database/repository/media.go +++ b/pkg/database/repository/media.go @@ -34,6 +34,10 @@ type ( GPSLongitude *float64 } + MediaThumbnail struct { + Path string + } + Pagination struct { Page int Size int @@ -52,10 +56,15 @@ type ( List(context.Context, *Pagination) ([]*Media, error) Get(context.Context, string) (*Media, error) GetPath(context.Context, string) (string, error) + GetThumbnailPath(context.Context, string) (string, error) - GetEmptyEXIF(context.Context, *Pagination) ([]*Media, error) + ListEmptyEXIF(context.Context, *Pagination) ([]*Media, error) GetEXIF(context.Context, uint) (*MediaEXIF, error) CreateEXIF(context.Context, uint, *MediaEXIF) error + + ListEmptyThumbnail(context.Context, *Pagination) ([]*Media, error) + GetThumbnail(context.Context, uint) (*MediaThumbnail, error) + CreateThumbnail(context.Context, uint, *MediaThumbnail) error } ) -- cgit v1.2.3