mirror of
https://github.com/MichaelMure/git-bug.git
synced 2024-12-15 02:01:43 +03:00
24 lines
869 B
Go
24 lines
869 B
Go
|
package repository
|
||
|
|
||
|
// 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
|
||
|
Store(key string, value string) error
|
||
|
|
||
|
// ReadAll reads all key/value pair matching the key prefix
|
||
|
ReadAll(keyPrefix string) (map[string]string, error)
|
||
|
|
||
|
// ReadBool read a single boolean value from the config
|
||
|
// Return ErrNoConfigEntry or ErrMultipleConfigEntry if
|
||
|
// there is zero or more than one entry for this key
|
||
|
ReadBool(key string) (bool, error)
|
||
|
|
||
|
// ReadBool read a single string value from the config
|
||
|
// Return ErrNoConfigEntry or ErrMultipleConfigEntry if
|
||
|
// there is zero or more than one entry for this key
|
||
|
ReadString(key string) (string, error)
|
||
|
|
||
|
// RemoveAll removes all key/value pair matching the key prefix
|
||
|
RemoveAll(keyPrefix string) error
|
||
|
}
|