This repository was archived by the owner on Jan 15, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 9 files changed +15
-1
lines changed Expand file tree Collapse file tree 9 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ type DashboardMeta struct {
1414 Folder int64 `json:"folderId"`
1515}
1616
17+ // DashboardSaveResponse represents the Grafana API response to creating or saving a dashboard.
1718type DashboardSaveResponse struct {
1819 Slug string `json:"slug"`
1920 Id int64 `json:"id"`
@@ -22,6 +23,7 @@ type DashboardSaveResponse struct {
2223 Version int64 `json:"version"`
2324}
2425
26+ // DashboardSearchResponse represents the Grafana API dashboard search response.
2527type DashboardSearchResponse struct {
2628 Id uint `json:"id"`
2729 Uid string `json:"uid"`
@@ -38,6 +40,7 @@ type DashboardSearchResponse struct {
3840 FolderUrl string `json:"folderUrl"`
3941}
4042
43+ // Dashboard represents a Grafana dashboard.
4144type Dashboard struct {
4245 Meta DashboardMeta `json:"meta"`
4346 Model map [string ]interface {} `json:"dashboard"`
Original file line number Diff line number Diff line change 66 "fmt"
77)
88
9+ // DataSource represents a Grafana data source.
910type DataSource struct {
1011 Id int64 `json:"id,omitempty"`
1112 Name string `json:"name"`
Original file line number Diff line number Diff line change 66 "fmt"
77)
88
9+ // Folder represents a Grafana folder.
910type Folder struct {
1011 Id int64 `json:"id"`
1112 Uid string `json:"uid"`
Original file line number Diff line number Diff line change @@ -27,10 +27,12 @@ type FolderPermission struct {
2727 DashboardId int64 `json:"dashboardId,omitempty"`
2828}
2929
30+ // PermissionItems represents Grafana folder permission items.
3031type PermissionItems struct {
3132 Items []* PermissionItem `json:"items"`
3233}
3334
35+ // PermissionItem represents a Grafana folder permission item.
3436type PermissionItem struct {
3537 // As you can see the docs, each item has a pair of [Role|TeamId|UserId] and Permission.
3638 // unnecessary fields are omitted.
Original file line number Diff line number Diff line change 66 "fmt"
77)
88
9+ // OrgUser represents a Grafana org user.
910type OrgUser struct {
1011 OrgId int64 `json:"orgId"`
1112 UserId int64 `json:"userId"`
Original file line number Diff line number Diff line change 66 "fmt"
77)
88
9+ // Org represents a Grafana org.
910type Org struct {
1011 Id int64 `json:"id"`
1112 Name string `json:"name"`
Original file line number Diff line number Diff line change @@ -6,13 +6,15 @@ import (
66 "fmt"
77)
88
9+ // PlaylistItem represents a Grafana playlist item.
910type PlaylistItem struct {
1011 Type string `json:"type"`
1112 Value string `json:"value"`
1213 Order int `json:"order"`
1314 Title string `json:"title"`
1415}
1516
17+ // PlaylistItem represents a Grafana playlist.
1618type Playlist struct {
1719 Id int `json:"id"`
1820 Name string `json:"name"`
Original file line number Diff line number Diff line change 77 "net/url"
88)
99
10+ // SearchTeam represents a search for a Grafana team.
1011type SearchTeam struct {
1112 TotalCount int64 `json:"totalCount,omitempty"`
1213 Teams []* Team `json:"teams,omitempty"`
@@ -26,7 +27,7 @@ type Team struct {
2627 Permission int64 `json:"permission,omitempty"`
2728}
2829
29- // TeamMember
30+ // TeamMember represents a Grafana team member.
3031type TeamMember struct {
3132 OrgId int64 `json:"orgId,omitempty"`
3233 TeamId int64 `json:"teamId,omitempty"`
@@ -37,6 +38,7 @@ type TeamMember struct {
3738 Permission int64 `json:"permission,omitempty"`
3839}
3940
41+ // Preferences represents Grafana preferences.
4042type Preferences struct {
4143 Theme string `json:"theme"`
4244 HomeDashboardId int64 `json:"homeDashboardId"`
Original file line number Diff line number Diff line change 44 "net/url"
55)
66
7+ // User represents a Grafana user.
78type User struct {
89 Id int64 `json:"id,omitempty"`
910 Email string `json:"email,omitempty"`
You can’t perform that action at this time.
0 commit comments