aboutsummaryrefslogtreecommitdiff
path: root/storage/storage.go
diff options
context:
space:
mode:
authorGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 19:13:41 +0200
committerGabriel Arakaki Giovanini <mail@gabrielgio.me>2022-10-16 19:16:35 +0200
commiteb1b7d7d9149114eb6b4287b7cb40c49dccfb26e (patch)
tree12f797651abeda9512d56d8922199ae9edb2a293 /storage/storage.go
parent98844247a424558939228b82e9b5f28d723c4fe0 (diff)
downloadporg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.tar.gz
porg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.tar.bz2
porg-eb1b7d7d9149114eb6b4287b7cb40c49dccfb26e.zip
feat: Add storage interfaceHEADmaster
With this is easier to interact with storage layers.
Diffstat (limited to 'storage/storage.go')
-rw-r--r--storage/storage.go6
1 files changed, 6 insertions, 0 deletions
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) {