Kévin Gomez
Kévin Gomez
Mappings can be quite tedious to define. See: https://github.com/grafana/grafana-foundation-sdk/issues/38 They could use some veneers to make them easier to discover and use.
Overrides can be quite tedious to define. See: https://github.com/grafana/cog/blob/fa1fbdc25da82b0478280f7b01c9edbd6bcff105/examples/_go/disk.go#L138-L177 They could use some veneers to make them easier to discover and use. The `matcher` argument seems like a good candidate...
Transformations can be quite tedious to define. See: https://github.com/grafana/cog/blob/fa1fbdc25da82b0478280f7b01c9edbd6bcff105/examples/_go/disk.go#L61-L136 They could use some veneers to make them easier to discover and use.
See: https://github.com/grafana/grafana-foundation-sdk/issues/36 Temporarily patched with https://github.com/grafana/cog/pull/240, until the schemas are updated
There are some places in the code that should never be reached ©, but no error would bubble up if we reached them. We need proper error handling/bubbling for these...
[Some of our existing Cue schemas](https://github.com/grafana/grafana/blob/b4ac0eee54e49dae8666a7b50fb0cf2dea05b718/packages/grafana-schema/src/common/dimensions.cue#L11) use similar concepts, and cuetsy supports generating Typescript [code that relies on extending types](https://github.com/grafana/grafana/blob/4f5728233c8994b47cd7904b2c66927c803f2a91/packages/grafana-schema/src/common/common.gen.ts#L66-L71). Should we support it in cog as well?
For go types: https://github.com/grafana/grafana-app-sdk/blob/324159db30045da4deb4f204b05f627998e89217/codegen/jennies/gotypes.go#L100-L108 (and other places too) As well as typescript, instead of cuetsy.
This PR introduces the code for a `grafana-foundation-sdk` CLI tool with - for now - two main capabilities: * converting JSON resources1 to Go * validating2 JSON resources 1: by...