From 9702dffc33c9c3dc5c2075f1b7fdfcb2faf69b5d Mon Sep 17 00:00:00 2001 From: Michelle Noorali Date: Mon, 21 Mar 2016 09:57:18 -0600 Subject: [PATCH] ref(repo): change RepoService -> Service * fixes style errors in #401 --- pkg/repo/inmem_repo_service.go | 2 +- pkg/repo/repoprovider.go | 8 ++++---- pkg/repo/types.go | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkg/repo/inmem_repo_service.go b/pkg/repo/inmem_repo_service.go index 887345958..a58677a8b 100644 --- a/pkg/repo/inmem_repo_service.go +++ b/pkg/repo/inmem_repo_service.go @@ -26,7 +26,7 @@ type inmemRepoService struct { } // NewInmemRepoService returns a new memory based repository service. -func NewInmemRepoService() RepoService { +func NewInmemRepoService() Service { rs := &inmemRepoService{ repositories: make(map[string]Repo), } diff --git a/pkg/repo/repoprovider.go b/pkg/repo/repoprovider.go index abaa965bd..0473f0367 100644 --- a/pkg/repo/repoprovider.go +++ b/pkg/repo/repoprovider.go @@ -38,19 +38,19 @@ type RepoProvider interface { type repoProvider struct { sync.RWMutex - rs RepoService + rs Service cp CredentialProvider gcsrp GCSRepoProvider repos map[string]ChartRepo } // NewRepoProvider creates a new repository provider. -func NewRepoProvider(rs RepoService, gcsrp GCSRepoProvider, cp CredentialProvider) RepoProvider { +func NewRepoProvider(rs Service, gcsrp GCSRepoProvider, cp CredentialProvider) RepoProvider { return newRepoProvider(rs, gcsrp, cp) } // newRepoProvider creates a new repository provider. -func newRepoProvider(rs RepoService, gcsrp GCSRepoProvider, cp CredentialProvider) *repoProvider { +func newRepoProvider(rs Service, gcsrp GCSRepoProvider, cp CredentialProvider) *repoProvider { if rs == nil { rs = NewInmemRepoService() } @@ -69,7 +69,7 @@ func newRepoProvider(rs RepoService, gcsrp GCSRepoProvider, cp CredentialProvide } // GetRepoService returns the repository service used by this repository provider. -func (rp *repoProvider) GetRepoService() RepoService { +func (rp *repoProvider) GetRepoService() Service { return rp.rs } diff --git a/pkg/repo/types.go b/pkg/repo/types.go index b541c3c65..4f580142e 100644 --- a/pkg/repo/types.go +++ b/pkg/repo/types.go @@ -105,9 +105,9 @@ type ObjectStorageRepo interface { GetBucket() string } -// RepoService maintains a list of chart repositories that defines the scope of all +// Service maintains a list of chart repositories that defines the scope of all // repository based operations, such as search and chart reference resolution. -type RepoService interface { +type Service interface { // List returns the list of all known chart repositories List() ([]Repo, error) // Create adds a known repository to the list