aboutsummaryrefslogtreecommitdiff
path: root/internal/thumbnail/generator.go
blob: 6dbf3e953c70bdaf2723e19a1e0558cf9443b532 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package thumbnail

import (
	"context"

	"github.com/RanXom/galleryd/internal/gallery"
)

// Generator creates thumbnails for gallery photos
type Generator struct {
	cacheDir string
}

func New(cacheDir string) *Generator {
	return &Generator{
		cacheDir: cacheDir,
	}
}

// Generate creates (or retrieves) a thumbnail
func (g *Generator) Generate(
	ctx context.Context,
	photo gallery.Photo,
) (Thumbnail, error) {
	return Thumbnail{}, nil
}