MCPcopy Create free account
hub / github.com/monitoror/monitoror / Enable

Method Enable

monitorables/github/github_faker.go:44–58  ·  view source on GitHub ↗
(variantName coreModels.VariantName)

Source from the content-addressed store, hash-verified

42}
43
44func (m *Monitorable) Enable(variantName coreModels.VariantName) {
45 usecase := githubUsecase.NewGithubUsecase()
46 delivery := githubDelivery.NewGithubDelivery(usecase)
47
48 // EnableTile route to echo
49 routeGroup := m.store.MonitorableRouter.Group("/github", variantName)
50 routeCount := routeGroup.GET("/count", delivery.GetCount)
51 routeChecks := routeGroup.GET("/checks", delivery.GetChecks)
52 routePullRequest := routeGroup.GET("/pullrequest", delivery.GetPullRequest)
53
54 // EnableTile data for config hydration
55 m.countTileEnabler.Enable(variantName, &githubModels.CountParams{}, routeCount.Path)
56 m.checksTileEnabler.Enable(variantName, &githubModels.ChecksParams{}, routeChecks.Path)
57 m.pullRequestTileEnabler.Enable(variantName, &githubModels.PullRequestParams{}, routePullRequest.Path)
58}

Callers

nothing calls this directly

Calls 3

GroupMethod · 0.65
GETMethod · 0.65
EnableMethod · 0.65

Tested by

no test coverage detected