Add plugin methods to plugin API (#9744)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
93e581d642
Коммит
e67d89b9a8
@@ -333,6 +333,38 @@ func (_m *API) DeleteUser(userId string) *model.AppError {
|
||||
return r0
|
||||
}
|
||||
|
||||
// DisablePlugin provides a mock function with given fields: id
|
||||
func (_m *API) DisablePlugin(id string) *model.AppError {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// EnablePlugin provides a mock function with given fields: id
|
||||
func (_m *API) EnablePlugin(id string) *model.AppError {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetChannel provides a mock function with given fields: channelId
|
||||
func (_m *API) GetChannel(channelId string) (*model.Channel, *model.AppError) {
|
||||
ret := _m.Called(channelId)
|
||||
@@ -779,6 +811,56 @@ func (_m *API) GetLDAPUserAttributes(userId string, attributes []string) (map[st
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPluginStatus provides a mock function with given fields: id
|
||||
func (_m *API) GetPluginStatus(id string) (*model.PluginStatus, *model.AppError) {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.PluginStatus
|
||||
if rf, ok := ret.Get(0).(func(string) *model.PluginStatus); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.PluginStatus)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
|
||||
r1 = rf(id)
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPlugins provides a mock function with given fields:
|
||||
func (_m *API) GetPlugins() ([]*model.Manifest, *model.AppError) {
|
||||
ret := _m.Called()
|
||||
|
||||
var r0 []*model.Manifest
|
||||
if rf, ok := ret.Get(0).(func() []*model.Manifest); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*model.Manifest)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 *model.AppError
|
||||
if rf, ok := ret.Get(1).(func() *model.AppError); ok {
|
||||
r1 = rf()
|
||||
} else {
|
||||
if ret.Get(1) != nil {
|
||||
r1 = ret.Get(1).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetPost provides a mock function with given fields: postId
|
||||
func (_m *API) GetPost(postId string) (*model.Post, *model.AppError) {
|
||||
ret := _m.Called(postId)
|
||||
@@ -1664,6 +1746,22 @@ func (_m *API) RegisterCommand(command *model.Command) error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemovePlugin provides a mock function with given fields: id
|
||||
func (_m *API) RemovePlugin(id string) *model.AppError {
|
||||
ret := _m.Called(id)
|
||||
|
||||
var r0 *model.AppError
|
||||
if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
|
||||
r0 = rf(id)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.AppError)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// RemoveReaction provides a mock function with given fields: reaction
|
||||
func (_m *API) RemoveReaction(reaction *model.Reaction) *model.AppError {
|
||||
ret := _m.Called(reaction)
|
||||
|
||||
Ссылка в новой задаче
Block a user