1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-11-24 08:22:29 +02:00
focalboard/server/ws/adapter.go
Miguel de la Cruz 9fac8f476e
Revert dnd (#4294)
* Revert "Fixed bug where boards would move to category of a different team (#4284)"

This reverts commit e075f408d3.

* Revert "Merge branch 'main' into only-explicit-boards-on-default-category"

This reverts commit 7db7e56296, reversing
changes made to 3feda10b6d.

* Revert "DND support for category and boards in LHS (#3964)"

This reverts commit 9918a0b3f8.
2022-12-05 15:03:34 -05:00

43 lines
1.8 KiB
Go

//go:generate mockgen -destination=mocks/mockstore.go -package mocks . Store
package ws
import (
"github.com/mattermost/focalboard/server/model"
)
const (
websocketActionAuth = "AUTH"
websocketActionSubscribeTeam = "SUBSCRIBE_TEAM"
websocketActionUnsubscribeTeam = "UNSUBSCRIBE_TEAM"
websocketActionSubscribeBlocks = "SUBSCRIBE_BLOCKS"
websocketActionUnsubscribeBlocks = "UNSUBSCRIBE_BLOCKS"
websocketActionUpdateBoard = "UPDATE_BOARD"
websocketActionUpdateMember = "UPDATE_MEMBER"
websocketActionDeleteMember = "DELETE_MEMBER"
websocketActionUpdateBlock = "UPDATE_BLOCK"
websocketActionUpdateConfig = "UPDATE_CLIENT_CONFIG"
websocketActionUpdateCategory = "UPDATE_CATEGORY"
websocketActionUpdateCategoryBoard = "UPDATE_BOARD_CATEGORY"
websocketActionUpdateSubscription = "UPDATE_SUBSCRIPTION"
websocketActionUpdateCardLimitTimestamp = "UPDATE_CARD_LIMIT_TIMESTAMP"
)
type Store interface {
GetBlock(blockID string) (*model.Block, error)
GetMembersForBoard(boardID string) ([]*model.BoardMember, error)
}
type Adapter interface {
BroadcastBlockChange(teamID string, block *model.Block)
BroadcastBlockDelete(teamID, blockID, boardID string)
BroadcastBoardChange(teamID string, board *model.Board)
BroadcastBoardDelete(teamID, boardID string)
BroadcastMemberChange(teamID, boardID string, member *model.BoardMember)
BroadcastMemberDelete(teamID, boardID, userID string)
BroadcastConfigChange(clientConfig model.ClientConfig)
BroadcastCategoryChange(category model.Category)
BroadcastCategoryBoardChange(teamID, userID string, blockCategory model.BoardCategoryWebsocketData)
BroadcastCardLimitTimestampChange(cardLimitTimestamp int64)
BroadcastSubscriptionChange(teamID string, subscription *model.Subscription)
}