summary refs log tree commit diff stats
path: root/internal/storage
diff options
context:
space:
mode:
Diffstat (limited to 'internal/storage')
-rw-r--r--internal/storage/interface.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/internal/storage/interface.go b/internal/storage/interface.go
new file mode 100644
index 0000000..6c8f3cd
--- /dev/null
+++ b/internal/storage/interface.go
@@ -0,0 +1,21 @@
+package storage
+
+import (
+	"io"
+
+	"github.com/a-h/templ"
+)
+
+type Writer interface {
+	Mkdirp(path string) error
+
+	Open(filename string) (io.ReadCloser, error)
+
+	OpenFileAndVariants(filename string) (io.WriteCloser, error)
+
+	OutputToFile(output io.Reader, filename string) error
+
+	RenderToFile(component templ.Component, filename string) error
+
+	WriterToFile(writer io.WriterTo, filename string) error
+}