2018-01-29 20:51:01 +08:00
|
|
|
package dtos
|
|
|
|
|
|
2022-06-22 16:29:26 +08:00
|
|
|
import (
|
|
|
|
|
"time"
|
|
|
|
|
|
|
|
|
|
"github.com/grafana/grafana/pkg/services/accesscontrol"
|
|
|
|
|
)
|
2018-01-29 20:51:01 +08:00
|
|
|
|
|
|
|
|
type Folder struct {
|
2022-06-22 16:29:26 +08:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Uid string `json:"uid"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
Url string `json:"url"`
|
2022-07-18 21:14:58 +08:00
|
|
|
HasACL bool `json:"hasAcl" xorm:"has_acl"`
|
2022-06-22 16:29:26 +08:00
|
|
|
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"`
|
2022-11-24 21:59:47 +08:00
|
|
|
Version int `json:"version,omitempty"`
|
2022-06-22 16:29:26 +08:00
|
|
|
AccessControl accesscontrol.Metadata `json:"accessControl,omitempty"`
|
2022-11-10 17:41:03 +08:00
|
|
|
// only used if nested folders are enabled
|
2022-11-24 21:59:47 +08:00
|
|
|
ParentUID string `json:"parentUid,omitempty"`
|
2023-04-25 16:22:20 +08:00
|
|
|
// the parent folders starting from the root going down
|
|
|
|
|
Parents []Folder `json:"parents,omitempty"`
|
2018-01-29 20:51:01 +08:00
|
|
|
}
|
2018-02-20 20:57:32 +08:00
|
|
|
|
|
|
|
|
type FolderSearchHit struct {
|
2023-04-21 22:05:11 +08:00
|
|
|
Id int64 `json:"id"`
|
|
|
|
|
Uid string `json:"uid"`
|
|
|
|
|
Title string `json:"title"`
|
|
|
|
|
ParentUID string `json:"parentUid,omitempty"`
|
2018-02-20 20:57:32 +08:00
|
|
|
}
|