diff options
Diffstat (limited to 'internal/service/gallery_service.go')
| -rw-r--r-- | internal/service/gallery_service.go | 17 |
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) +} |