Documentation ¶
Index ¶
- type Board
- type Card
- type CustomData
- type CustomInParams
- type CustomState
- type Data
- type IKanban
- type IKanbanStdOps
- type OpBoardCreate
- type OpBoardCreateClientData
- type OpBoardCreateServerData
- type OpBoardDelete
- type OpBoardDeleteClientData
- type OpBoardDeleteServerData
- type OpBoardLoadMore
- type OpBoardLoadMoreClientData
- type OpBoardLoadMoreServerData
- type OpBoardUpdate
- type OpBoardUpdateClientData
- type OpBoardUpdateServerData
- type OpCardMoveTo
- type OpCardMoveToClientData
- type OpCardMoveToServerData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Board ¶
type Board struct { ID string `json:"id,omitempty"` Title string `json:"title,omitempty"` Cards []Card `json:"cards,omitempty"` PageNo uint64 `json:"pageNo,omitempty"` PageSize uint64 `json:"pageSize,omitempty"` Total uint64 `json:"total,omitempty"` Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"` }
Board includes list of cards.
type Card ¶
type Card struct { ID string `json:"id,omitempty"` Title string `json:"title,omitempty"` Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"` cptype.Extra }
Card is a minimal unit in kanban.
type CustomData ¶
type CustomData interface { CustomDataPtr() interface{} EncodeFromCustomData(customDataPtr interface{}, stdDataPtr *Data) DecodeToCustomData(stdDataPtr *Data, customDataPtr interface{}) }
CustomData is kanban's custom data handler.
type CustomInParams ¶
type CustomInParams interface { CustomInParamsPtr() interface{} EncodeFromCustomInParams(customInParamsPtr interface{}, stdInParamsPtr *cptype.ExtraMap) DecodeToCustomInParams(stdInParamsPtr *cptype.ExtraMap, customInParamsPtr interface{}) }
CustomInParams is kanban's custom inParams handler.
type CustomState ¶
type CustomState interface { CustomStatePtr() interface{} EncodeFromCustomState(customStatePtr interface{}, stdStatePtr *cptype.ExtraMap) DecodeToCustomState(stdStatePtr *cptype.ExtraMap, customStatePtr interface{}) }
CustomState is kanban's custom state handler.
type Data ¶
type Data struct { Boards []Board `json:"boards,omitempty"` Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"` UserIDs []string `json:"userIDs,omitempty"` }
Data includes list of boards.
type IKanban ¶
type IKanban interface { cptype.IComponent IKanbanStdOps }
IKanban is user-level interface for kanban.
type IKanbanStdOps ¶
type IKanbanStdOps interface { // kanban-level // RegisterBoardCreateOp will refresh all boards. RegisterBoardCreateOp(opData OpBoardCreate) (opFunc cptype.OperationFunc) // board-level // RegisterBoardLoadMoreOp only return specific board data, not all boards data. RegisterBoardLoadMoreOp(opData OpBoardLoadMore) (opFunc cptype.OperationFunc) // RegisterBoardUpdateOp will refresh all boards. RegisterBoardUpdateOp(opData OpBoardUpdate) (opFunc cptype.OperationFunc) // RegisterBoardDeleteOp will refresh all boards. RegisterBoardDeleteOp(opData OpBoardDelete) (opFunc cptype.OperationFunc) // card-level RegisterCardMoveToOp(opData OpCardMoveTo) (opFunc cptype.OperationFunc) }
IKanbanStdOps defines all standard operations of kanban.
type OpBoardCreate ¶
type OpBoardCreate struct { cptype.Operation ServerData OpBoardCreateServerData `json:"serverData,omitempty"` ClientData OpBoardCreateClientData `json:"clientData,omitempty"` }
OpBoardCreate includes std op and server&client data.
type OpBoardCreateClientData ¶
type OpBoardCreateClientData struct {
Title string `json:"title,omitempty"`
}
OpBoardCreateClientData .
type OpBoardDelete ¶
type OpBoardDelete struct { cptype.Operation ServerData OpBoardDeleteServerData `json:"serverData,omitempty"` ClientData OpBoardDeleteClientData `json:"clientData,omitempty"` }
OpBoardDelete .
type OpBoardDeleteClientData ¶
type OpBoardDeleteClientData struct {
DataRef *Board `json:"dataRef,omitempty"`
}
OpBoardDeleteClientData .
type OpBoardLoadMore ¶
type OpBoardLoadMore struct { cptype.Operation ServerData OpBoardLoadMoreServerData `json:"serverData,omitempty"` ClientData OpBoardLoadMoreClientData `json:"clientData,omitempty"` }
OpBoardLoadMore .
type OpBoardLoadMoreClientData ¶
type OpBoardLoadMoreClientData struct { DataRef *Board `json:"dataRef,omitempty"` PageNo uint64 `json:"pageNo,omitempty"` PageSize uint64 `json:"pageSize,omitempty"` }
OpBoardLoadMoreClientData .
type OpBoardLoadMoreServerData ¶
type OpBoardLoadMoreServerData struct{}
OpBoardLoadMoreServerData .
type OpBoardUpdate ¶
type OpBoardUpdate struct { cptype.Operation ServerData OpBoardUpdateServerData `json:"serverData,omitempty"` ClientData OpBoardUpdateClientData `json:"clientData,omitempty"` }
OpBoardUpdate .
type OpBoardUpdateClientData ¶
type OpBoardUpdateClientData struct { DataRef *Board `json:"dataRef,omitempty"` // update fields Title string `json:"title,omitempty"` }
OpBoardUpdateClientData .
type OpCardMoveTo ¶
type OpCardMoveTo struct { cptype.Operation ServerData OpCardMoveToServerData `json:"serverData,omitempty"` ClientData OpCardMoveToClientData `json:"clientData,omitempty"` }
OpCardMoveTo .
type OpCardMoveToClientData ¶
type OpCardMoveToClientData struct { DataRef *Card `json:"dataRef,omitempty"` TargetBoardID string `json:"targetBoardID,omitempty"` }
OpCardMoveToClientData .
type OpCardMoveToServerData ¶
type OpCardMoveToServerData struct {
AllowedTargetBoardIDs []string `json:"allowedTargetBoardIDs,omitempty"`
}
OpCardMoveToServerData .