mirror of
https://github.com/mattermost/focalboard.git
synced 2024-12-24 13:43:12 +02:00
61a8af8f34
Co-authored-by: Paul Esch-Laurent <paul.esch-laurent@mattermost.com> Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
43 lines
1.8 KiB
Go
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)
|
|
}
|