grafana/pkg/services/pluginsettings/pluginsettings.go
Will Browne b25ea75bac
Plugins: Add secure JSON fields to plugin setting DTO (#55313)
* add secure JSON fields to plugin setting DTO

* add nil pointer fix

* adding secureJsonFields to the plugin meta.

Co-authored-by: Marcus Andersson <marcus.andersson@grafana.com>
2022-09-21 12:20:11 +02:00

20 lines
835 B
Go

package pluginsettings
import (
"context"
)
type Service interface {
// GetPluginSettings returns all Plugin Settings for the provided Org
GetPluginSettings(ctx context.Context, args *GetArgs) ([]*InfoDTO, error)
// GetPluginSettingByPluginID returns a Plugin Settings by Plugin ID
GetPluginSettingByPluginID(ctx context.Context, args *GetByPluginIDArgs) (*DTO, error)
// UpdatePluginSetting updates a Plugin Setting
UpdatePluginSetting(ctx context.Context, args *UpdateArgs) error
// UpdatePluginSettingPluginVersion updates a Plugin Setting's plugin version
UpdatePluginSettingPluginVersion(ctx context.Context, args *UpdatePluginVersionArgs) error
// DecryptedValues decrypts the encrypted secureJSONData of the provided plugin setting and
// returns the decrypted values.
DecryptedValues(ps *DTO) map[string]string
}