K-Phoen / grabana

User-friendly Go library for building Grafana dashboards
MIT License
680 stars 69 forks source link

Make rawdashboardbyuid method public #225

Closed karthik-kasarapu closed 8 months ago

karthik-kasarapu commented 1 year ago

Would like rawDashboardByUID method public so it can be called outside the current package. This can help read the dashboard data for various other purposes.

codecov[bot] commented 1 year ago

Codecov Report

Merging #225 (7a2c0a5) into master (8a7600e) will increase coverage by 0.06%. Report is 7 commits behind head on master. The diff coverage is 100.00%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/K-Phoen/grabana/pull/225/graphs/tree.svg?width=650&height=150&src=pr&token=eJwYXNp5jD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K%C3%A9vin+Gomez)](https://app.codecov.io/gh/K-Phoen/grabana/pull/225?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K%C3%A9vin+Gomez) ```diff @@ Coverage Diff @@ ## master #225 +/- ## ========================================== + Coverage 90.07% 90.13% +0.06% ========================================== Files 92 92 Lines 6934 6977 +43 ========================================== + Hits 6246 6289 +43 + Misses 543 540 -3 - Partials 145 148 +3 ``` | [Files Changed](https://app.codecov.io/gh/K-Phoen/grabana/pull/225?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K%C3%A9vin+Gomez) | Coverage Δ | | |---|---|---| | [dashboards.go](https://app.codecov.io/gh/K-Phoen/grabana/pull/225?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K%C3%A9vin+Gomez#diff-ZGFzaGJvYXJkcy5nbw==) | `60.86% <100.00%> (ø)` | | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/K-Phoen/grabana/pull/225/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=K%C3%A9vin+Gomez)
K-Phoen commented 8 months ago

Since this method exposes an object coming from the sdk package, I'm not too keen on making it public.

grabana is meant to be a dashboard builder, it doesn't try to expose a complete Go client. If that's what you need, https://github.com/grafana/grafana-openapi-client-go might be a good fit :)