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
This commit is contained in:
Will Browne
2022-03-04 17:09:50 +01:00
committed by GitHub
parent b409c9782f
commit 6a8cbd8663
9 changed files with 43 additions and 31 deletions
@@ -92,15 +92,19 @@ func (m *mockStore) GetPluginSettingById(ctx context.Context, query *models.GetP
return models.ErrPluginSettingNotFound
}
func (m *mockStore) UpdatePluginSetting(ctx context.Context, cmd *models.UpdatePluginSettingCmd) error {
func (m *mockStore) UpdatePluginSetting(_ context.Context, cmd *models.UpdatePluginSettingCmd) error {
m.sentCommands = append(m.sentCommands, cmd)
return nil
}
func (m *mockStore) UpdatePluginSettingVersion(ctx context.Context, cmd *models.UpdatePluginSettingVersionCmd) error {
func (m *mockStore) UpdatePluginSettingVersion(_ context.Context, _ *models.UpdatePluginSettingVersionCmd) error {
return nil
}
func (m *mockStore) GetPluginSettings(ctx context.Context, orgID int64) ([]*models.PluginSettingInfoDTO, error) {
func (m *mockStore) GetPluginSettings(_ context.Context, _ int64) ([]*models.PluginSettingInfoDTO, error) {
return nil, nil
}
func (m *mockStore) DecryptedValues(_ *models.PluginSetting) map[string]string {
return nil
}