grafana/pkg/services/ngalert/api
Joe Blubaugh 689ae96a0e
Alerting: Refactor API types generation with different names. (#51785)
This changes the API codegen template (controller-api.mustache) to simplify some names. When this package was created, most APIs "forked" to either a Grafana backend implementation or a "Lotex" remote implementation. As we have added APIs it's no longer the case. Provisioning, configuration, and testing APIs do not fork, and we are likely to add additional APIs that don't fork.

This change replaces {{classname}}ForkingService with {{classname}} for interface names, and names the concrete implementation {{classname}}Handler. It changes the implied implementation of a route handler from fork{{nickname}} to handle{{nickname}}. So PrometheusApiForkingService becomes PrometheusApi, ForkedPrometheusApi becomes PrometheusApiHandler and forkRouteGetGrafanaAlertStatuses becomes handleRouteGetGrafanaAlertStatuses

It also renames some files - APIs that do no forking go from forked_{{name}}.go to {{name}}.go and APIs that still fork go from forked_{{name}}.go to forking_{{name}}.go to capture the idea that those files a "doing forking" rather than "are a fork of something."

Signed-off-by: Joe Blubaugh <joe.blubaugh@grafana.com>
2022-07-18 03:08:08 -04:00
..
test-data Alerting: Modify endpoint for testing a datasource rule using the UID (#48070) 2022-05-17 14:10:20 +03:00
tooling Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
api_alertmanager_guards_test.go Alerting: Add provenance guard to config api (#50147) 2022-06-04 14:55:46 +02:00
api_alertmanager_guards.go Alerting: Add provenance guard to config api (#50147) 2022-06-04 14:55:46 +02:00
api_alertmanager_test.go RBAC: Refactor GetUserPermissions to use []accesscontrol.Permission (#50683) 2022-06-14 10:17:48 +02:00
api_alertmanager.go Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731) 2022-06-23 15:13:39 -05:00
api_configuration.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
api_prometheus_test_fixtures.go Alerting: Display query from grafana-managed alert rules on /api/v1/rules (#45969) 2022-03-14 10:39:20 +00:00
api_prometheus_test.go Alerting: Persist rule position in the group (#50051) 2022-06-22 10:52:46 -04:00
api_prometheus.go Alerting: Persist rule position in the group (#50051) 2022-06-22 10:52:46 -04:00
api_provisioning_test.go Alerting: Update DbStore to use disabled orgs from the config (#52156) 2022-07-15 14:13:30 -04:00
api_provisioning.go Alerting: Provisioning API respects global rule quota (#52180) 2022-07-13 17:36:17 -05:00
api_ruler_test.go Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731) 2022-06-23 15:13:39 -05:00
api_ruler_validation_test.go Alerting: Fix rule API to accept 0 duration of field For (#50992) 2022-06-30 11:46:26 -04:00
api_ruler_validation.go Alerting: Fix rule API to accept 0 duration of field For (#50992) 2022-06-30 11:46:26 -04:00
api_ruler.go Alerting: rule evaluation loop's update channel to provide version (#52170) 2022-07-15 12:32:52 -04:00
api_testing_test.go Alerting: Refactor Evaluator (#51673) 2022-07-12 16:51:32 -04:00
api_testing.go update Evaluator interface to accept context (#52151) 2022-07-13 10:21:11 -04:00
api.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
authorization_test.go Alerting: Persist rule position in the group (#50051) 2022-06-22 10:52:46 -04:00
authorization.go Alerting: Add method to reset notification policy tree back to the default (#51934) 2022-07-08 16:23:18 -05:00
configuration.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
forking_alertmanager.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
forking_prometheus.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
forking_ruler.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_alertmanager.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_configuration.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_prometheus.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_provisioning.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_ruler.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
generated_base_api_testing.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
lotex_am.go backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
lotex_prom.go Alerting: modify prometheus endpoints for proxying using the datasource UID (#48052) 2022-05-06 15:05:02 -04:00
lotex_ruler_test.go backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
lotex_ruler.go Alerting: Code-gen parsing of URL parameters and fix related bugs (#50731) 2022-06-23 15:13:39 -05:00
promql_compat_test.go Alerting/testing promql extraction (#34665) 2021-05-25 11:54:50 -04:00
promql_compat.go Alerting: check upstream response content type in lotex proxy (#34760) 2021-05-27 14:12:29 +03:00
provisioning.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
testing_api.go Alerting: Refactor API types generation with different names. (#51785) 2022-07-18 03:08:08 -04:00
testing.go Alerting: Remove mis-behaving fake and fix masked test failure in AM config API (#47747) 2022-04-13 19:31:57 -05:00
util_test.go Alerting: Rename Recipient path parameter to DatasourceID (#47949) 2022-04-20 16:20:17 +03:00
util.go Alerting: modify prometheus endpoints for proxying using the datasource UID (#48052) 2022-05-06 15:05:02 -04:00