mirror of
https://github.com/grafana/grafana.git
synced 2025-02-11 16:15:42 -06:00
* Chore: Remove FolderID from DTO Folder * chore: add OrgID field to an instance of SaveDashboardCommand * chore: add another OrgID to pair with the FolderUID: * chore: add OrgId to Folder struct and expectedParentOrgIDs to testCase struct, unsure if last part is necessary * Fix folder test, add expected orgID * chore: regen specs --------- Co-authored-by: Ida Furjesova <ida.furjesova@grafana.com>
39 lines
1.5 KiB
Go
39 lines
1.5 KiB
Go
package dtos
|
|
|
|
import (
|
|
"time"
|
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
)
|
|
|
|
type Folder struct {
|
|
// Deprecated: use UID instead
|
|
ID int64 `json:"id" xorm:"pk autoincr 'id'"`
|
|
UID string `json:"uid" xorm:"uid"`
|
|
OrgID int64 `json:"orgId" xorm:"org_id"`
|
|
Title string `json:"title"`
|
|
URL string `json:"url" xorm:"url"`
|
|
HasACL bool `json:"hasAcl" xorm:"has_acl"`
|
|
CanSave bool `json:"canSave"`
|
|
CanEdit bool `json:"canEdit"`
|
|
CanAdmin bool `json:"canAdmin"`
|
|
CanDelete bool `json:"canDelete"`
|
|
CreatedBy string `json:"createdBy"`
|
|
Created time.Time `json:"created"`
|
|
UpdatedBy string `json:"updatedBy"`
|
|
Updated time.Time `json:"updated"`
|
|
Version int `json:"version,omitempty"`
|
|
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
|
// only used if nested folders are enabled
|
|
ParentUID string `json:"parentUid,omitempty"`
|
|
// the parent folders starting from the root going down
|
|
Parents []Folder `json:"parents,omitempty"`
|
|
}
|
|
|
|
type FolderSearchHit struct {
|
|
ID int64 `json:"id" xorm:"pk autoincr 'id'"`
|
|
UID string `json:"uid" xorm:"uid"`
|
|
Title string `json:"title"`
|
|
ParentUID string `json:"parentUid,omitempty"`
|
|
}
|