diff options
| author | RanXom <saiyedshizain@gmail.com> | 2026-07-13 12:51:46 +0530 |
|---|---|---|
| committer | RanXom <saiyedshizain@gmail.com> | 2026-07-13 12:51:46 +0530 |
| commit | f2ec755fa94c61f18873b3b9feab43eb234d2d82 (patch) | |
| tree | 58563adfc17bfba97b80e480d356219f63d6700c /internal | |
| parent | 0447a00e3d3b9c4fd8971b5ffebc323060306b98 (diff) | |
| download | galleryd-f2ec755fa94c61f18873b3b9feab43eb234d2d82.tar.xz galleryd-f2ec755fa94c61f18873b3b9feab43eb234d2d82.zip | |
docs(gallery): document public APIfeat/gallery
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/gallery/builder.go | 5 | ||||
| -rw-r--r-- | 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 |