grafana/pkg/services/pluginsettings/pluginsettings.go
Will Browne 6a8cbd8663
Plugins: Plugin settings refactor (#46246)
* remove bus and direct use of sqlStore

* add decryption to interface

* return nil

* rename field

* re-order fields

* rename file
2022-03-04 17:09:50 +01:00

22 lines
926 B
Go

package pluginsettings
import (
"context"
"github.com/grafana/grafana/pkg/models"
)
type Service interface {
// GetPluginSettings returns all Plugin Settings for the provided Org
GetPluginSettings(ctx context.Context, orgID int64) ([]*models.PluginSettingInfoDTO, error)
// GetPluginSettingById returns a Plugin Settings by Plugin ID
GetPluginSettingById(ctx context.Context, query *models.GetPluginSettingByIdQuery) error
// UpdatePluginSetting updates a Plugin Setting
UpdatePluginSetting(ctx context.Context, cmd *models.UpdatePluginSettingCmd) error
// UpdatePluginSettingVersion updates a Plugin Setting's plugin version
UpdatePluginSettingVersion(ctx context.Context, cmd *models.UpdatePluginSettingVersionCmd) error
// DecryptedValues decrypts the encrypted secureJSONData of the provided plugin setting and
// returns the decrypted values.
DecryptedValues(ps *models.PluginSetting) map[string]string
}