mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-12 09:04:14 +02:00
75bd409ba0
Backend support for subscribing/unsubscribing to blocks, typically cards and boards. Notifies subscribers when changes are made to cards they are subscribed to.
24 lines
837 B
Go
24 lines
837 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"
|
|
websocketActionUpdateConfig = "UPDATE_CLIENT_CONFIG"
|
|
websocketActionUpdateSubscription = "UPDATE_SUBSCRIPTION"
|
|
)
|
|
|
|
type Adapter interface {
|
|
BroadcastBlockChange(workspaceID string, block model.Block)
|
|
BroadcastBlockDelete(workspaceID, blockID, parentID string)
|
|
BroadcastConfigChange(clientConfig model.ClientConfig)
|
|
BroadcastSubscriptionChange(workspaceID string, subscription *model.Subscription)
|
|
}
|