aboutsummaryrefslogtreecommitdiffstats
path: root/repository/config.go
diff options
context:
space:
mode:
authoramine <hilalyamine@gmail.com>2019-10-31 19:05:50 +0100
committeramine <hilalyamine@gmail.com>2019-10-31 19:05:50 +0100
commit7f177c4750b4acf70cc3fd3d43c19685179e527b (patch)
treeb3a896099d508c679f736ecf32dc70039149fe11 /repository/config.go
parentab935674a26f2eef5d8014c615b9b5bc1f402135 (diff)
downloadgit-bug-7f177c4750b4acf70cc3fd3d43c19685179e527b.tar.gz
repository: add ReadTimestamp methods and improve naming
Diffstat (limited to 'repository/config.go')
-rw-r--r--repository/config.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/repository/config.go b/repository/config.go
index a2bb33fd..70f11081 100644
--- a/repository/config.go
+++ b/repository/config.go
@@ -1,5 +1,7 @@
package repository
+import "time"
+
// Config represent the common function interacting with the repository config storage
type Config interface {
// Store writes a single key/value pair in the config of the repo
@@ -18,6 +20,11 @@ type Config interface {
// there is zero or more than one entry for this key
ReadString(key string) (string, error)
+ // ReadTimestamp read a single timestamp value from the config
+ // Return ErrNoConfigEntry or ErrMultipleConfigEntry if
+ // there is zero or more than one entry for this key
+ ReadTimestamp(key string) (*time.Time, error)
+
// RemoveAll removes all key/value pair matching the key prefix
RemoveAll(keyPrefix string) error
}