focalboard/server/ws/adapter.go
Miguel de la Cruz e10229031f
Add a plugin adapter to reuse MM websocket in plugin mode (#1079)
* Add a plugin adapter to reuse MM websocket in plugin mode

* Remove development replace

* Switch all go.mod files to use 1.16

* Fix linter issues

* Fix linter

* Update server version to contain the new hooks
2021-08-27 10:59:14 +02:00

19 lines
575 B
Go

package ws
import (
"github.com/mattermost/focalboard/server/model"
)
const (
websocketActionAuth = "AUTH"
websocketActionSubscribeWorkspace = "SUBSCRIBE_WORKSPACE"
websocketActionUnsubscribeWorkspace = "UNSUBSCRIBE_WORKSPACE"
websocketActionSubscribeBlocks = "SUBSCRIBE_BLOCKS"
websocketActionUnsubscribeBlocks = "UNSUBSCRIBE_BLOCKS"
websocketActionUpdateBlock = "UPDATE_BLOCK"
)
type Adapter interface {
BroadcastBlockChange(workspaceID string, block model.Block)
BroadcastBlockDelete(workspaceID, blockID, parentID string)
}