[MM-11861] Design & implement a better way for plugins to update their own configuration (#9712)
* [MM-11861] Design & implement a better way for plugins to update their own configuration Added GetPluginConfig and SavePluginConfig plugin APIs. Added test cases for testing new APIs. * Fixed gofmt error * Minor changes requested in PR
Этот коммит содержится в:
коммит произвёл
Jesse Hallam
родитель
a50e8ac5b9
Коммит
7a6f957638
@@ -581,6 +581,20 @@ func (_m *API) GetConfig() *model.Config {
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetPluginConfig provides a mock function with given fields:
|
||||
func (_m *API) GetPluginConfig() map[string]interface{} {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 map[string]interface{}
|
||||
if rf, ok := ret.Get(0).(func() map[string]interface{}); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Get(0).(map[string]interface{})
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetDirectChannel provides a mock function with given fields: userId1, userId2
|
||||
func (_m *API) GetDirectChannel(userId1 string, userId2 string) (*model.Channel, *model.AppError) {
|
||||
ret := _m.Called(userId1, userId2)
|
||||
@@ -1819,6 +1833,22 @@ func (_m *API) SaveConfig(config *model.Config) *model.AppError {
|
||||
return r0
|
||||
}
|
||||
|
||||
// SavePluginConfig provides a mock function with given fields: pluginConfig
|
||||
func (_m *API) SavePluginConfig(pluginConfig map[string]interface{}) *model.AppError {
|
||||
ret := _m.Called(pluginConfig)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(map[string]interface{}) *model.AppError); ok {
|
||||
r0 = rf(pluginConfig)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// SearchChannels provides a mock function with given fields: teamId, term
|
||||
func (_m *API) SearchChannels(teamId string, term string) (*model.ChannelList, *model.AppError) {
|
||||
ret := _m.Called(teamId, term)
|
||||
|
||||
Ссылка в новой задаче
Block a user