From 78754a7b23e5fc7a40bd3c450d54a193aaf585b1 Mon Sep 17 00:00:00 2001 From: Laria Carolin Chabowski Date: Mon, 3 Jul 2017 08:10:28 +0200 Subject: Implementing backup methods --- cache/cache.go | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 cache/cache.go (limited to 'cache') diff --git a/cache/cache.go b/cache/cache.go new file mode 100644 index 0000000..32b8325 --- /dev/null +++ b/cache/cache.go @@ -0,0 +1,20 @@ +package cache + +import ( + "code.laria.me/petrific/objects" + "time" +) + +type Cache interface { + PathUpdated(path string) (mtime time.Time, id objects.ObjectId, ok bool) + SetPathUpdated(path string, mtime time.Time, id objects.ObjectId) +} + +type NopCache struct{} + +func (NopCache) PathUpdated(_ string) (_ time.Time, _ objects.ObjectId, ok bool) { + ok = false + return +} + +func (NopCache) SetPathUpdated(_ string, _ time.Time, _ objects.ObjectId) {} -- cgit v1.2.3-70-g09d2