feat: [CDE-195]: Add factory constructor method to create factory with providers map (#2323)

* update method name
* feat: [CDE-195]: Add factory constructor method to create factory with providers map
This commit is contained in:
Kapil Garg 2024-07-30 10:49:24 +00:00 committed by Harness
parent a3203ef284
commit 3edc1db615

View File

@ -35,6 +35,10 @@ type Factory struct {
providers map[enum.GitspaceCodeRepoType]Provider
}
func NewFactoryWithProviders(providers map[enum.GitspaceCodeRepoType]Provider) Factory {
return Factory{providers: providers}
}
func NewFactory(gitnessProvider *GitnessSCM, genericSCM *GenericSCM) Factory {
providers := make(map[enum.GitspaceCodeRepoType]Provider)
providers[enum.CodeRepoTypeGitness] = gitnessProvider