From 4444f5e8a4f16ed9370a941213449080afe621fa Mon Sep 17 00:00:00 2001 From: "A.Unger" Date: Wed, 7 Oct 2020 10:31:56 +0200 Subject: [PATCH] delete unused AddNonUniqueIndex --- accounts/pkg/indexer/indexer.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/accounts/pkg/indexer/indexer.go b/accounts/pkg/indexer/indexer.go index f0f987f6a..20445e8f0 100644 --- a/accounts/pkg/indexer/indexer.go +++ b/accounts/pkg/indexer/indexer.go @@ -76,35 +76,6 @@ func (i Indexer) AddIndex(t interface{}, indexBy, pkName, entityDirName, indexTy return idx.Init() } -func (i Indexer) AddNonUniqueIndex(t interface{}, indexBy, pkName, entityDirName, indexType string) error { - strategy := getRegistryStrategy(i.repoConfig) - f := registry.IndexConstructorRegistry[strategy][indexType] - var idx index.Index - - if strategy == "disk" { - idx = f( - option.WithTypeName(getTypeFQN(t)), - option.WithIndexBy(indexBy), - option.WithFilesDir(path.Join(i.repoConfig.Repo.Disk.Path, entityDirName)), - option.WithDataDir(i.repoConfig.Repo.Disk.Path), - ) - } else if strategy == "cs3" { - idx = f( - option.WithTypeName(getTypeFQN(t)), - option.WithIndexBy(indexBy), - option.WithFilesDir(path.Join(i.repoConfig.Repo.Disk.Path, entityDirName)), - option.WithDataDir(i.repoConfig.Repo.Disk.Path), - option.WithDataURL(i.repoConfig.Repo.CS3.DataURL), - option.WithDataPrefix(i.repoConfig.Repo.CS3.DataPrefix), - option.WithJWTSecret(i.repoConfig.Repo.CS3.JWTSecret), - option.WithProviderAddr(i.repoConfig.Repo.CS3.ProviderAddr), - ) - } - - i.indices.addIndex(getTypeFQN(t), pkName, idx) - return idx.Init() -} - // Add a new entry to the indexer func (i Indexer) Add(t interface{}) error { typeName := getTypeFQN(t)