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 {
1414Folder  int64  `json:"folderId"` 
1515}
1616
17+ // DashboardSaveResponse represents the Grafana API response to creating or saving a dashboard. 
1718type  DashboardSaveResponse  struct  {
1819Slug  string  `json:"slug"` 
1920Id  int64  `json:"id"` 
@@ -22,6 +23,7 @@ type DashboardSaveResponse struct {
2223Version  int64  `json:"version"` 
2324}
2425
26+ // DashboardSearchResponse represents the Grafana API dashboard search response. 
2527type  DashboardSearchResponse  struct  {
2628Id  uint  `json:"id"` 
2729Uid  string  `json:"uid"` 
@@ -38,6 +40,7 @@ type DashboardSearchResponse struct {
3840FolderUrl  string  `json:"folderUrl"` 
3941}
4042
43+ // Dashboard represents a Grafana dashboard. 
4144type  Dashboard  struct  {
4245Meta  DashboardMeta  `json:"meta"` 
4346Model  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  {
1011Id  int64  `json:"id,omitempty"` 
1112Name  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  {
1011Id  int64  `json:"id"` 
1112Uid  string  `json:"uid"` 
Original file line number Diff line number Diff line change @@ -27,10 +27,12 @@ type FolderPermission struct {
2727DashboardId  int64  `json:"dashboardId,omitempty"` 
2828}
2929
30+ // PermissionItems represents Grafana folder permission items. 
3031type  PermissionItems  struct  {
3132Items  []* 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  {
1011OrgId  int64  `json:"orgId"` 
1112UserId  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  {
1011Id  int64  `json:"id"` 
1112Name  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  {
1011Type  string  `json:"type"` 
1112Value  string  `json:"value"` 
1213Order  int  `json:"order"` 
1314Title  string  `json:"title"` 
1415}
1516
17+ // PlaylistItem represents a Grafana playlist. 
1618type  Playlist  struct  {
1719Id  int  `json:"id"` 
1820Name  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  {
1112TotalCount  int64  `json:"totalCount,omitempty"` 
1213Teams  []* Team  `json:"teams,omitempty"` 
@@ -26,7 +27,7 @@ type Team struct {
2627Permission  int64  `json:"permission,omitempty"` 
2728}
2829
29- // TeamMember 
30+ // TeamMember represents a Grafana team member.  
3031type  TeamMember  struct  {
3132OrgId  int64  `json:"orgId,omitempty"` 
3233TeamId  int64  `json:"teamId,omitempty"` 
@@ -37,6 +38,7 @@ type TeamMember struct {
3738Permission  int64  `json:"permission,omitempty"` 
3839}
3940
41+ // Preferences represents Grafana preferences. 
4042type  Preferences  struct  {
4143Theme  string  `json:"theme"` 
4244HomeDashboardId  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  {
89Id  int64  `json:"id,omitempty"` 
910Email  string  `json:"email,omitempty"` 
                                 You can’t perform that action at this time. 
               
                  
0 commit comments