aboutsummaryrefslogtreecommitdiff
path: root/internal/service/gallery_service.go
diff options
context:
space:
mode:
authorRanXom <saiyedshizain@gmail.com>2026-07-13 15:33:51 +0530
committerRanXom <saiyedshizain@gmail.com>2026-07-13 15:33:51 +0530
commit5029457e4ebe028995cb0f05ea76687aa4aa8b42 (patch)
tree0cc3a664e2cbcc751162d26584bea57b0876e042 /internal/service/gallery_service.go
parentf31ffa40dce7f6807f5688d373556b0defcf7ecf (diff)
downloadgalleryd-5029457e4ebe028995cb0f05ea76687aa4aa8b42.tar.xz
galleryd-5029457e4ebe028995cb0f05ea76687aa4aa8b42.zip
feat(service): implement gallery service
Diffstat (limited to 'internal/service/gallery_service.go')
-rw-r--r--internal/service/gallery_service.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/internal/service/gallery_service.go b/internal/service/gallery_service.go
new file mode 100644
index 0000000..90e3c09
--- /dev/null
+++ b/internal/service/gallery_service.go
@@ -0,0 +1,17 @@
+package service
+
+import (
+ "context"
+
+ "github.com/RanXom/galleryd/internal/gallery"
+)
+
+// Gallery scans the configured roots and builds the gallery.
+func (s *galleryService) Gallery(ctx context.Context) ([]gallery.Photo, error) {
+ files, err := s.scanner.Scan(ctx)
+ if err != nil {
+ return nil, err
+ }
+
+ return s.builder.Build(ctx, files)
+}