feat: images

This commit is contained in:
2026-02-23 09:50:42 +01:00
parent 3f321f0836
commit 6f98d730bb
21 changed files with 518 additions and 29 deletions
+24
View File
@@ -0,0 +1,24 @@
package handleimage
import (
"context"
"io"
"net/http"
)
type Handler struct {
img imageService
}
func New(mux *http.ServeMux, srv imageService) *Handler {
h := &Handler{
img: srv,
}
mux.HandleFunc("GET /images/{uid}", h.getImage)
return h
}
type imageService interface {
GetImage(ctx context.Context, uid string) (img io.Reader, mimeType string, err error)
}