refactor(grafana): replace dashboard info with import compatible layout

This commit is contained in:
Tom Neuber 2024-07-27 18:53:38 +02:00
parent 4aad919153
commit 577f821b9d
Signed by: tom
GPG key ID: F17EFE4272D89FF6
8 changed files with 173 additions and 110 deletions

View file

@ -67,8 +67,8 @@ func NewClient(endpoint string, options ...ClientOption) *Client {
return client
}
func (c *Client) NewRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
url := fmt.Sprintf("%s/%s", c.endpoint, path)
func (c *Client) newRequest(ctx context.Context, method, path string, body io.Reader) (*http.Request, error) {
url := fmt.Sprintf("%s%s", c.endpoint, path)
req, err := http.NewRequest(method, url, body)
if err != nil {
return nil, err
@ -102,7 +102,7 @@ type ErrorResponse struct {
TraceID uint
}
func (c *Client) Do(req *http.Request, v any) (*Response, error) {
func (c *Client) do(req *http.Request, v any) (*Response, error) {
httpResp, err := c.httpClient.Do(req)
resp := &Response{Response: httpResp}
if err != nil {