-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(providers): Implement ability to specify header or body key for …
…token/event type
- Loading branch information
viction
committed
Dec 6, 2020
1 parent
aafe84d
commit f0aa9fa
Showing
3 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/main/scala/venix/hookla/services/ProviderService.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package venix.hookla.services | ||
|
||
import javax.inject.Inject | ||
import venix.hookla.providers.BaseProvider | ||
import venix.hookla.providers.gitlab.GitlabProvider | ||
|
||
class ProviderService @Inject()( | ||
gitlabProvider: GitlabProvider | ||
) { | ||
private def providers: List[BaseProvider] = gitlabProvider :: Nil | ||
|
||
def getById(id: String): Option[BaseProvider] = providers.find(p => p.id == id) | ||
} |