Add implementation for folder store methods (#57700)

* Add implementation for folder store methods

* Add Move implementation

* Add back comment and fix query

* Remove Move from store

* Adjust GetChildren

* Fix errutil error declaration and usage

* Add org id to get children query
This commit is contained in:
idafurjes
2022-10-28 15:35:49 +02:00
committed by GitHub
parent 2cd9cbd359
commit 6b483a8dca
4 changed files with 46 additions and 26 deletions
+1 -4
View File
@@ -6,7 +6,7 @@ import (
"github.com/grafana/grafana/pkg/services/folder"
)
// Store is the interface which a folder store must implement.
// store is the interface which a folder store must implement.
type store interface {
// Create creates a folder and returns the newly-created folder.
Create(ctx context.Context, cmd *folder.CreateFolderCommand) (*folder.Folder, error)
@@ -18,9 +18,6 @@ type store interface {
// Use Move to change a dashboard's parent ID.
Update(ctx context.Context, cmd *folder.UpdateFolderCommand) (*folder.Folder, error)
// Move changes the given folder's parent folder uid and applies any necessary permissions changes.
Move(ctx context.Context, cmd *folder.MoveFolderCommand) (*folder.Folder, error)
// Get returns a folder.
Get(ctx context.Context, cmd *folder.GetFolderQuery) (*folder.Folder, error)