From 127a675fc7cd9cdb65e4b4caac21e0f259102ee8 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Mon, 27 Jan 2025 21:42:41 +0100 Subject: serve files from Storage implementation --- internal/storage/file.go | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 internal/storage/file.go (limited to 'internal/storage/file.go') diff --git a/internal/storage/file.go b/internal/storage/file.go new file mode 100644 index 0000000..f588bf3 --- /dev/null +++ b/internal/storage/file.go @@ -0,0 +1,23 @@ +package storage + +import ( + "io" + "time" +) + +type File struct { + Path string + ContentType string + LastModified time.Time + Etag string + Encodings map[string]io.ReadSeekCloser +} + +func (f *File) AvailableEncodings() []string { + encs := make([]string, 0, len(f.Encodings)) + for enc := range f.Encodings { + encs = append(encs, enc) + } + + return encs +} -- cgit 1.4.1