From f2ec755fa94c61f18873b3b9feab43eb234d2d82 Mon Sep 17 00:00:00 2001 From: RanXom Date: Mon, 13 Jul 2026 12:51:46 +0530 Subject: docs(gallery): document public API --- internal/gallery/builder.go | 5 ++++- internal/gallery/photo.go | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/gallery/builder.go b/internal/gallery/builder.go index a0c4cd6..038acb4 100644 --- a/internal/gallery/builder.go +++ b/internal/gallery/builder.go @@ -7,7 +7,7 @@ import ( "github.com/RanXom/galleryd/internal/scanner" ) -// Builder constructs gallery photos +// Builder constructs gallery photos from scanned files. type Builder struct { reader *metadata.Reader } @@ -18,6 +18,9 @@ func New(reader *metadata.Reader) *Builder { } } +// Build converts scanned files into gallery photos. +// +// Photos are sorted by capture date in descending order. func (b *Builder) Build( ctx context.Context, files []scanner.File, diff --git a/internal/gallery/photo.go b/internal/gallery/photo.go index 57678f4..73a6103 100644 --- a/internal/gallery/photo.go +++ b/internal/gallery/photo.go @@ -5,7 +5,10 @@ import ( "github.com/RanXom/galleryd/internal/scanner" ) -// Photo represents an image in the gallery +// Photo represents an image in the gallery. +// +// A Photo combines filesystem information with extracted metadata +// and a stable identifier. type Photo struct { ID string -- cgit v1.2.3