-
Notifications
You must be signed in to change notification settings - Fork 51
Add search folder by UID #22
base: master
Are you sure you want to change the base?
Conversation
ID int64 `json:"id"` | ||
UID string `json:"uid"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
FolderID int64 `json:"folderId"` | ||
FolderUID string `json:"folderUid"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above
Id int64 `json:"id"` | ||
Uid string `json:"uid"` | ||
ID int64 `json:"id"` | ||
UID string `json:"uid"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think it's a great idea to be renaming these, as we tend to follow the Id
and Uid
convention for these fields. Would you be alright keeping these as-is?
func (c *Client) DeleteDashboard(slug string) error { | ||
path := fmt.Sprintf("/api/dashboards/db/%s", slug) | ||
// DeleteDashboard deletes a grafana dashoboard | ||
func (c *Client) DeleteDashboard(uid string) (string, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a DeleteDashboardByUid
function and mark the existing one as deprecated?
@@ -31,6 +35,24 @@ type Dashboard struct { | |||
Overwrite bool `json:overwrite` | |||
} | |||
|
|||
// Dashboards represent json returned by search API | |||
type Dashboards struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is specific to the search endpoint can we name it something more along the lines of DashboardSearchResponse
?
Allow to search a folder in grafana by using UID