M shared/storage/interface.go →
shared/storage/interface.go package storage
import (
+ "io"
+
"alin.ovh/homestead/domain/content"
- "alin.ovh/homestead/shared/buffer"
)
type Reader interface {
type Writer interface {
Mkdirp(path string) error
- NewFileFromPost(post *content.Post) *File
+ NewFileFromPost(*content.Post) *File
- Write(pathname string, title string, content *buffer.Buffer) error
- WritePost(post *content.Post, content *buffer.Buffer) error
- WriteFile(file *File, content *buffer.Buffer) error
+ Write(string, string, io.WriterTo) error
+ WritePost(*content.Post, io.WriterTo) error
+ WriteFile(*File, io.WriterTo) error
}