all repos — homestead @ 35a67d739dd5cd5cf71e5f37762808568272ede5

Code for my website

shared/storage/interface.go (view raw)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package storage

import (
	"io"

	"alin.ovh/homestead/domain/content"
)

type Reader interface {
	GetFile(path string) (*File, error)
	CanonicalisePath(path string) (string, bool)
}

type Writer interface {
	Mkdirp(path string) error

	NewFileFromPost(*content.Post) *File

	Write(string, string, io.WriterTo) error
	WritePost(*content.Post, io.WriterTo) error
	WriteFile(*File, io.WriterTo) error
}