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