grafana/pkg/api
sam boyer 07e5f8117f
Reconcile coremodels, entities, objects under new kind framework (#56492)
* Update thema to latest

* Deal with s/Library/*Runtime/

* Commit new, working results of codegen

* We like pointers now

* Always take runtime arg for NewBase()

* Sketchy handwavy pass at entity meta framework

* Little nibbles

* Update pkg/framework/coremodel/entityframework.cue

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>

* Move file into new framework location

* Introduce loaders, Go code

* Complete rename to kind

* Flesh out framework, add svg/dashboard examples

* Cruft removal

* Remove generated kind go files from gitignore

* Refine maturity concept, add SlotKind

* Update embed and go deps

* Export PrefixWithGrafanaCUE

* Make the loader actually work, holy crap

* Many small tweaks to type.cue

* Add Apache 2 licensing exceptions for kinds

* Add new kinds dir, start of generator

* Roll back to earlier oapi-codegen

* Introduce new grafana-specific CUE loaders

* Introduce new tidy code generators framework

* Catch up kind framework with tinkering

* Add slices for the generators

* Add write/verify step to main generator

* Many renames

* Split up kind framework cue files

* Use kind.Decl within generated kinds

* Create kind.SomeDecl wrapper type to cache lineages

* Better names again

* Get one generated implemented, hopefully

* Copy dashboard schema into new kind.cue

* Small fixes to make the initial gen work

* Put svg kind in its new home

* Add generated Go dashboard type

* More renames and cleanups

* Add base kind registry and generator

* Stop blacklisting *_gen.go files

This is not the Go best practice, anyway. All we actually want to ignore
for enterprise is generated wire files.

* Change codegen output directories

pkg/kind -> pkg/kinds
pkg/registry/kindreg -> pkg/registry/corekind

* Rename pkg/framework/kind to pkg/kindsys

* Add core structured kind generator

* Add plural and machine names to kind spec

* Copy playlist over to kind system

* Consolidate kindsys files

* Add raw kind generator

* Update CODEOWNERS for kind framework

* Touch up comments a bit

* More docs tweaks

* Remove generated types to reduce noise for review

* Split each generator into its own file

* Rename Slot kind to Composable kind

* Add handwavy types for customkind loading

* Guard against init calls to framework loader

* First pass at doc on extending the kind system

* Improve attribute example in docs

* Fix wire imports

* Add basic TS types generator

* Fix composable kind category def

* No need for a separate file with generate directive

* Catch dashboard schema up

* Rename generator types to something saner and generic

* Make version configurable in ts/go generators

* Add CommonMeta to ease property access

* Add kindsys prop indicating whether lineage is group

* Put all kind categories back in a single file

* Finish with kindsys group props

* Refactor maturity progression per discussion

- Replace "committed" with "merged"
- All kindcats can use all maturity levels, at least for now

* Convert ts veneer index generator to modular system

* Move over to new jennywrites framework

* Strip down old coremodel generator

* Use public version of jennywrites

* Pull latest thema

* Commit generated Go types

* Add header injection postprocessor

* Move sdboyer/jennywrites to grafana/codejen

* Tweak header output

* Remove dashboard and playlist coremodels

* Fix up backend dashboards devenv test

* Fix TS import patterns to new gen filename

* Update internal imports, remove coremodel registry

* Fix compilation errors, wire generation

* Export and replace the prefix dropper

* More Go struct and field name changes

* Last name fixes, hopefully

* Fix lint errors

* Last lint error

Co-authored-by: Artur Wierzbicki <wierzbicki.artur.94@gmail.com>
2022-11-10 12:36:40 -08:00
..
apierrors chore/backend: move dashboard errors to dashboard service (#51593) 2022-06-30 09:31:54 -04:00
avatar Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
datasource backend/datasources: move datasources models into the datasources service package (#51267) 2022-06-27 12:23:15 -04:00
dtos API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
frontendlogging Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
pluginproxy Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
response pkg/web: closure-style middlewares (#51238) 2022-08-09 14:58:50 +02:00
routing Instrumentation: Fix HTTP request instrumentation of authentication failures (#44234) 2022-02-02 18:48:46 +01:00
static API: Extract OpenAPI specification from source code using go-swagger (#40528) 2022-02-08 13:38:43 +01:00
accesscontrol.go NavTree: Refactor out the navtree building from api/index.go and into it's own service (#55552) 2022-09-22 22:04:48 +02:00
admin_encryption.go manager exposes renderer + secrets manager (#54629) 2022-09-02 14:20:10 +02:00
admin_provisioning_test.go Alerting: Add file provisioning for contact points (#51924) 2022-08-01 18:17:42 +02:00
admin_provisioning.go Alerting: Add file provisioning for contact points (#51924) 2022-08-01 18:17:42 +02:00
admin_test.go RBAC: Refactor GetUserPermissions to use []accesscontrol.Permission (#50683) 2022-06-14 10:17:48 +02:00
admin_users_test.go UserService: use the UserService instead of calling sqlstore directly (#55745) 2022-09-27 07:58:49 -04:00
admin_users.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
admin.go Move SignedInUser to user service and RoleType and Roles to org (#53445) 2022-08-10 11:56:48 +02:00
alerting.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
annotations_test.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
annotations.go Annotation: Optionally allow storing longer annotation tags (#54754) 2022-09-23 06:04:41 -04:00
api.go Add move endpoint into folder service (#58575) 2022-11-10 09:06:52 -05:00
apikey.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
basic_auth_test.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
basic_auth.go Macaron: remove custom Request type (#37874) 2021-09-01 11:18:30 +02:00
comments.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
common_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
dashboard_permission_test.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
dashboard_permission.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
dashboard_snapshot_test.go Chore: Switch over to team.Service instead of sqlstore (#55497) 2022-09-20 18:58:04 +02:00
dashboard_snapshot.go FIX: RBAC prevents deleting empty snapshots (#54385) 2022-08-30 17:19:52 +02:00
dashboard_test.go Reconcile coremodels, entities, objects under new kind framework (#56492) 2022-11-10 12:36:40 -08:00
dashboard.go Reconcile coremodels, entities, objects under new kind framework (#56492) 2022-11-10 12:36:40 -08:00
dataproxy.go Chore: Move swagger definitions to the handlers (#52643) 2022-07-27 09:54:37 -04:00
datasources_test.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
datasources.go [main] Plugin fixes (#57399) 2022-10-21 13:54:55 +02:00
fakes.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
folder_permission_test.go API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
folder_permission.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
folder_test.go API: Support creating a nested folder (#58508) 2022-11-10 04:41:03 -05:00
folder.go Add move endpoint into folder service (#58575) 2022-11-10 09:06:52 -05:00
frontend_logging_test.go Frontend logging: handle logging endpoints without expensive middleware (#54960) 2022-09-12 13:04:43 +03:00
frontend_logging.go Frontend logging: handle logging endpoints without expensive middleware (#54960) 2022-09-12 13:04:43 +03:00
frontend_metrics.go Chore: Report frontend metrics for JS/CSS load time (#42421) 2021-12-02 09:34:39 +01:00
frontendsettings_test.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
frontendsettings.go Echo: Add config option to prevent duplicate page views for GA4 (#57619) 2022-11-09 15:09:19 +01:00
grafana_com_proxy.go Instrumentation: Proxy status code correction and various improvements (#47473) 2022-04-11 13:17:08 +02:00
health_test.go Chore: Remove bus from health api (#44897) 2022-02-04 14:33:35 +01:00
health.go Chore: Remove bus from health api (#44897) 2022-02-04 14:33:35 +01:00
http_server_test.go Plugins: Make backend plugin metrics endpoints available with optional authentication (#46467) 2022-03-29 11:18:26 +02:00
http_server.go Reconcile coremodels, entities, objects under new kind framework (#56492) 2022-11-10 12:36:40 -08:00
index.go Echo: Add config option to prevent duplicate page views for GA4 (#57619) 2022-11-09 15:09:19 +01:00
ldap_debug_test.go Chore: Move SearchOrgs to org service (#55416) 2022-09-20 09:55:40 +02:00
ldap_debug.go Chore: Move SearchOrgs to org service (#55416) 2022-09-20 09:55:40 +02:00
login_oauth_test.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
login_oauth.go OAuth: Fix misleading warn log related to oauth and increase logged content (#57336) 2022-10-20 05:50:12 -04:00
login_test.go NavTree: Make it possible to configure where in nav tree plugins live (#55484) 2022-09-28 08:29:35 +02:00
login.go Oauth: Display friendly error message when role_attribute_strict=true and no valid role found (#57818) 2022-10-31 09:11:31 +01:00
metrics_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
metrics.go Datasources: Support mixed datasources in a single query (#56832) 2022-10-14 10:27:06 -04:00
openapi3.go Implementing OpenApi 3 specs (converted from Swagger 2) (#53243) 2022-08-04 13:51:12 -03:00
org_invite_test.go RBAC: Enable rbac when creating new settings (#53531) 2022-08-11 15:37:31 +02:00
org_invite.go UserService: use the UserService instead of calling sqlstore directly (#55745) 2022-09-27 07:58:49 -04:00
org_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
org_users_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
org_users.go Chore: Use org service methods (#55738) 2022-09-26 18:53:17 +02:00
org.go Remove org methods from sqlstore interface (#56358) 2022-10-05 15:47:56 +02:00
password.go SAML: Do not SAML SLO if user is not SAML authenticated (#53418) 2022-08-10 10:21:33 +02:00
playlist_play.go Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
playlist.go Playlist: update service so it supports both read+write (#55959) 2022-10-04 11:11:18 -04:00
plugin_dashboards_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
plugin_dashboards.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
plugin_metrics_test.go Handle ioutil deprecations (#53526) 2022-08-10 15:37:51 +02:00
plugin_metrics.go Plugins: Make backend plugin metrics endpoints available with optional authentication (#46467) 2022-03-29 11:18:26 +02:00
plugin_proxy_test.go Plugins: Handle app plugin proxy routes per request (#51835) 2022-08-23 13:05:31 +02:00
plugin_proxy.go Plugins: Handle app plugin proxy routes per request (#51835) 2022-08-23 13:05:31 +02:00
plugin_resource.go Plugins: CallResource: Use canonical MIME headers when writing response (#58506) 2022-11-09 15:47:32 +01:00
plugins_test.go Plugins: CallResource: Use canonical MIME headers when writing response (#58506) 2022-11-09 15:47:32 +01:00
plugins.go Plugins: Make "README" the default markdown request param (#58264) 2022-11-07 11:16:17 +01:00
preferences_test.go NavTree: Refactor out the navtree building from api/index.go and into it's own service (#55552) 2022-09-22 22:04:48 +02:00
preferences.go Preferences: Support setting any dashboard as home, not just the starred ones (#54258) 2022-08-26 12:40:40 -04:00
quota_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
quota.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
render.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
search_test.go RBAC: Enable rbac when creating new settings (#53531) 2022-08-11 15:37:31 +02:00
search.go Chore: fix formating for swagger definitions (#54993) 2022-09-12 10:40:35 +03:00
short_url_test.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
short_url.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
signup.go Chore: Split temporary user (invite) service (#55397) 2022-09-20 11:29:17 +02:00
stars.go Star: Add uid in the endpoint (#54340) 2022-10-05 22:32:49 +02:00
swagger_responses.go Chore: Move swagger definitions to the handlers (#52643) 2022-07-27 09:54:37 -04:00
swagger_tags.json Chore: Move swagger definitions to the handlers (#52643) 2022-07-27 09:54:37 -04:00
swagger.go fix status code 200 (#47818) 2022-04-15 08:01:58 -04:00
team_members_test.go chore: remove sqlstore & mockstore dependencies from (most) packages (#57087) 2022-10-19 09:02:15 -04:00
team_members.go Chore: Switch over to team.Service instead of sqlstore (#55497) 2022-09-20 18:58:04 +02:00
team_test.go RBAC: Cleaup team api rbac tests (#57265) 2022-10-20 09:11:47 +02:00
team.go Chore: Switch over to team.Service instead of sqlstore (#55497) 2022-09-20 18:58:04 +02:00
user_test.go Revert "Chore: Refactor quota service (#57586)" (#58394) 2022-11-08 11:52:07 +02:00
user_token_test.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
user_token.go Chore: Add user service method SetUsingOrg and GetSignedInUserWithCacheCtx (#53343) 2022-08-11 13:28:55 +02:00
user.go Remove org methods from sqlstore interface (#56358) 2022-10-05 15:47:56 +02:00
utils.go Permissions: Validate against Team/User permission role update (#29101) 2020-11-18 15:36:41 +01:00