all repos — homestead @ 65039b065ba634b9c4b4c7f4b42ebccdbfd40ce0

Code for my website

shared/storage/interface.go (view raw)

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
}