From eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 16 Oct 2022 19:13:41 +0200 Subject: feat: Add storage interface With this is easier to interact with storage layers. --- storage/storage.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'storage/storage.go') diff --git a/storage/storage.go b/storage/storage.go index b788efb..880396a 100644 --- a/storage/storage.go +++ b/storage/storage.go @@ -17,6 +17,12 @@ const ( type Storage interface { Walk(path string, walkMode WalkMode) <-chan string Get(path string) (io.Reader, error) + Put(path string, f io.Reader) error + List(path string) ([]string, error) + Move(src string, dest string) error + Copy(src string, dest string) error + Mkdir(path string) error + Exists(path string) (bool, error) } func CalculateSHA256(r io.Reader) (string, error) { -- cgit v1.2.3