From d754ce4c11af51e06515275b58a3f337a440ed9d Mon Sep 17 00:00:00 2001 From: RanXom Date: Mon, 13 Jul 2026 18:37:01 +0530 Subject: feat(service): introduce service lifecycle & load gallery during initialization --- internal/service/service.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'internal/service/service.go') diff --git a/internal/service/service.go b/internal/service/service.go index 6183e26..252abed 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -8,5 +8,9 @@ import ( // GalleryService provides gallery operations. type GalleryService interface { + // Load scans the configured roots and builds the in-memory gallery. + Load(ctx context.Context) error + + // Gallery returns the currently loaded gallery. Gallery(ctx context.Context) ([]gallery.Photo, error) } -- cgit v1.2.3 From ef5a8b157db8361d2a592f1481ba809ca49dc57d Mon Sep 17 00:00:00 2001 From: RanXom Date: Mon, 13 Jul 2026 18:41:45 +0530 Subject: feat(service): add photo lookup --- internal/service/service.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal/service/service.go') diff --git a/internal/service/service.go b/internal/service/service.go index 252abed..68a764e 100644 --- a/internal/service/service.go +++ b/internal/service/service.go @@ -13,4 +13,7 @@ type GalleryService interface { // Gallery returns the currently loaded gallery. Gallery(ctx context.Context) ([]gallery.Photo, error) + + // Photo returns a single photo by its ID. + Photo(ctx context.Context, id string) (gallery.Photo, error) } -- cgit v1.2.3