From ab935674a26f2eef5d8014c615b9b5bc1f402135 Mon Sep 17 00:00:00 2001 From: amine Date: Thu, 31 Oct 2019 15:46:09 +0100 Subject: repository: config interface and implementation rework --- repository/repo.go | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'repository/repo.go') diff --git a/repository/repo.go b/repository/repo.go index 44204493..f17d594b 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -30,24 +30,11 @@ type RepoCommon interface { // GetRemotes returns the configured remotes repositories. GetRemotes() (map[string]string, error) - // StoreConfig store a single key/value pair in the config of the repo - StoreConfig(key string, value string) error + // LocalConfig . + LocalConfig() Config - // ReadConfigs read all key/value pair matching the key prefix - ReadConfigs(keyPrefix string) (map[string]string, error) - - // ReadConfigBool read a single boolean value from the config - // Return ErrNoConfigEntry or ErrMultipleConfigEntry if there is zero or more than one entry - // for this key - ReadConfigBool(key string) (bool, error) - - // ReadConfigBool read a single string value from the config - // Return ErrNoConfigEntry or ErrMultipleConfigEntry if there is zero or more than one entry - // for this key - ReadConfigString(key string) (string, error) - - // RmConfigs remove all key/value pair matching the key prefix - RmConfigs(keyPrefix string) error + // GlobalConfig . + GlobalConfig() Config } // Repo represents a source code repository. -- cgit From 60c6bd360f164b8f955b21cd1d0bc0cca6e5cb51 Mon Sep 17 00:00:00 2001 From: amine Date: Fri, 1 Nov 2019 22:40:21 +0100 Subject: bridge: use new repository configuration interface commands/webui: use new repository configuration interface --- repository/repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'repository/repo.go') diff --git a/repository/repo.go b/repository/repo.go index f17d594b..7d655bde 100644 --- a/repository/repo.go +++ b/repository/repo.go @@ -30,10 +30,10 @@ type RepoCommon interface { // GetRemotes returns the configured remotes repositories. GetRemotes() (map[string]string, error) - // LocalConfig . + // LocalConfig give access to the repository scoped configuration LocalConfig() Config - // GlobalConfig . + // GlobalConfig give access to the git global configuration GlobalConfig() Config } -- cgit