diff options
author | Laria Carolin Chabowski <laria@laria.me> | 2017-07-03 08:10:28 +0200 |
---|---|---|
committer | Laria Carolin Chabowski <laria@laria.me> | 2017-07-12 08:02:14 +0200 |
commit | 78754a7b23e5fc7a40bd3c450d54a193aaf585b1 (patch) | |
tree | 5aff6436cbf93212aab6bb59a077a5718c0fbc23 /cache | |
parent | 43d099919d1e1a8d6b38a300182d0cc075237fe6 (diff) | |
download | petrific-78754a7b23e5fc7a40bd3c450d54a193aaf585b1.tar.gz petrific-78754a7b23e5fc7a40bd3c450d54a193aaf585b1.tar.bz2 petrific-78754a7b23e5fc7a40bd3c450d54a193aaf585b1.zip |
Implementing backup methods
Diffstat (limited to 'cache')
-rw-r--r-- | cache/cache.go | 20 |
1 files changed, 20 insertions, 0 deletions
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) {} |