1package repository
2
3// Config represent the common function interacting with the repository config storage
4type Config interface {
5 // Store writes a single key/value pair in the config of the repo
6 Store(key string, value string) error
7
8 // ReadAll reads all key/value pair matching the key prefix
9 ReadAll(keyPrefix string) (map[string]string, error)
10
11 // ReadBool read a single boolean value from the config
12 // Return ErrNoConfigEntry or ErrMultipleConfigEntry if
13 // there is zero or more than one entry for this key
14 ReadBool(key string) (bool, error)
15
16 // ReadBool read a single string value from the config
17 // Return ErrNoConfigEntry or ErrMultipleConfigEntry if
18 // there is zero or more than one entry for this key
19 ReadString(key string) (string, error)
20
21 // RemoveAll removes all key/value pair matching the key prefix
22 RemoveAll(keyPrefix string) error
23}