Adding interplugin communication. (#12829)

* Adding interplugin communication.

* Naming changes and moving ResponseTransfer to own file.

* Fix.

* Tests and moving to buffering bytes.

* Switching API to passing plugin ID through path rather than a header.

* Review feedback.
Этот коммит содержится в:
Christopher Speller
2019-11-04 17:35:58 -08:00
коммит произвёл GitHub
родитель 501da809f3
Коммит 428454cee4
9 изменённых файлов: 351 добавлений и 19 удалений

Просмотреть файл

@@ -6,9 +6,11 @@ package plugintest
import (
io "io"
http "net/http"
mock "github.com/stretchr/testify/mock"
model "github.com/mattermost/mattermost-server/model"
mock "github.com/stretchr/testify/mock"
)
// API is an autogenerated mock type for the API type
@@ -2334,6 +2336,22 @@ func (_m *API) PermanentDeleteBot(botUserId string) *model.AppError {
return r0
}
// PluginHTTP provides a mock function with given fields: request
func (_m *API) PluginHTTP(request *http.Request) *http.Response {
ret := _m.Called(request)
var r0 *http.Response
if rf, ok := ret.Get(0).(func(*http.Request) *http.Response); ok {
r0 = rf(request)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*http.Response)
}
}
return r0
}
// PublishWebSocketEvent provides a mock function with given fields: event, payload, broadcast
func (_m *API) PublishWebSocketEvent(event string, payload map[string]interface{}, broadcast *model.WebsocketBroadcast) {
_m.Called(event, payload, broadcast)