2024-06-23 02:37:22 +02:00
|
|
|
package schema
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
|
|
|
type DashboardCreateRequest struct {
|
2024-08-19 20:12:28 +02:00
|
|
|
Dashboard any `json:"dashboard"`
|
2024-06-23 02:37:22 +02:00
|
|
|
FolderID uint `json:"folderId,omitempty"`
|
|
|
|
FolderUID string `json:"folderUid"`
|
|
|
|
Message string `json:"message,omitempty"`
|
|
|
|
Overwrite bool `json:"overwrite"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DashboardCreateResponse struct {
|
|
|
|
DashboardID uint `json:"id"`
|
|
|
|
DashboardUID string `json:"uid"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Status string `json:"status"`
|
|
|
|
Version uint `json:"version"`
|
|
|
|
Slug string `json:"slug"`
|
|
|
|
}
|
|
|
|
|
2024-07-27 18:53:38 +02:00
|
|
|
type Dashboard struct {
|
|
|
|
Meta DashboardMeta `json:"meta"`
|
|
|
|
Dashboard any `json:"dashboard"`
|
|
|
|
}
|
|
|
|
|
2024-06-23 02:37:22 +02:00
|
|
|
type DashboardMeta struct {
|
2024-07-27 18:53:38 +02:00
|
|
|
IsStarred bool `json:"isStarred"`
|
|
|
|
Type string `json:"type"`
|
|
|
|
CanSave bool `json:"canSave"`
|
|
|
|
CanEdit bool `json:"canEdit"`
|
|
|
|
CanAdmin bool `json:"canAdmin"`
|
|
|
|
CanStar bool `json:"canStar"`
|
|
|
|
CanDelete bool `json:"canDelete"`
|
|
|
|
Slug string `json:"slug"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
Expires time.Time `json:"expires"`
|
|
|
|
Created time.Time `json:"created"`
|
|
|
|
Updated time.Time `json:"updated"`
|
|
|
|
UpdatedBy string `json:"updatedBy"`
|
|
|
|
CreatedBy string `json:"createdBy"`
|
|
|
|
Version uint `json:"version"`
|
|
|
|
HasACL bool `json:"hasAcl"`
|
|
|
|
IsFolder bool `json:"isFolder"`
|
|
|
|
FolderID uint `json:"folderId"`
|
|
|
|
FolderUID string `json:"folderUid"`
|
|
|
|
FolderTitle string `json:"folderTitle"`
|
|
|
|
FolderURL string `json:"folderUrl"`
|
|
|
|
Provisioned bool `json:"provisioned"`
|
|
|
|
ProvisionedExternalID string `json:"provisionedExternalId"`
|
|
|
|
AnnotationsPermissions AnnotationsPermissions `json:"annotationsPermissions"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AnnotationsPermissions struct {
|
|
|
|
Dashboard AnnotationPermissions `json:"dashboard"`
|
|
|
|
Organization AnnotationPermissions `json:"organization"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type AnnotationPermissions struct {
|
|
|
|
CanAdd bool `json:"canAdd"`
|
|
|
|
CanEdit bool `json:"canEdit"`
|
|
|
|
CanDelete bool `json:"canDelete"`
|
2024-06-23 02:37:22 +02:00
|
|
|
}
|