|
|
@ -38,19 +38,19 @@ type RepoProvider interface {
|
|
|
|
|
|
|
|
|
|
|
|
type repoProvider struct {
|
|
|
|
type repoProvider struct {
|
|
|
|
sync.RWMutex
|
|
|
|
sync.RWMutex
|
|
|
|
rs RepoService
|
|
|
|
rs Service
|
|
|
|
cp CredentialProvider
|
|
|
|
cp CredentialProvider
|
|
|
|
gcsrp GCSRepoProvider
|
|
|
|
gcsrp GCSRepoProvider
|
|
|
|
repos map[string]ChartRepo
|
|
|
|
repos map[string]ChartRepo
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// NewRepoProvider creates a new repository provider.
|
|
|
|
// 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)
|
|
|
|
return newRepoProvider(rs, gcsrp, cp)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// newRepoProvider creates a new repository provider.
|
|
|
|
// 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 {
|
|
|
|
if rs == nil {
|
|
|
|
rs = NewInmemRepoService()
|
|
|
|
rs = NewInmemRepoService()
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -69,7 +69,7 @@ func newRepoProvider(rs RepoService, gcsrp GCSRepoProvider, cp CredentialProvide
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// GetRepoService returns the repository service used by this repository provider.
|
|
|
|
// GetRepoService returns the repository service used by this repository provider.
|
|
|
|
func (rp *repoProvider) GetRepoService() RepoService {
|
|
|
|
func (rp *repoProvider) GetRepoService() Service {
|
|
|
|
return rp.rs
|
|
|
|
return rp.rs
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|