kanban

package
v1.0.6-alpha Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2022 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

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.

func (OpBoardCreate) OpKey

func (o OpBoardCreate) OpKey() cptype.OperationKey

OpKey .

type OpBoardCreateClientData

type OpBoardCreateClientData struct {
	Title string `json:"title,omitempty"`
}

OpBoardCreateClientData .

type OpBoardCreateServerData

type OpBoardCreateServerData struct{}

OpBoardCreateServerData .

type OpBoardDelete

type OpBoardDelete struct {
	cptype.Operation
	ServerData OpBoardDeleteServerData `json:"serverData,omitempty"`
	ClientData OpBoardDeleteClientData `json:"clientData,omitempty"`
}

OpBoardDelete .

func (OpBoardDelete) OpKey

func (o OpBoardDelete) OpKey() cptype.OperationKey

OpKey .

type OpBoardDeleteClientData

type OpBoardDeleteClientData struct {
	DataRef *Board `json:"dataRef,omitempty"`
}

OpBoardDeleteClientData .

type OpBoardDeleteServerData

type OpBoardDeleteServerData struct{}

OpBoardDeleteServerData .

type OpBoardLoadMore

type OpBoardLoadMore struct {
	cptype.Operation
	ServerData OpBoardLoadMoreServerData `json:"serverData,omitempty"`
	ClientData OpBoardLoadMoreClientData `json:"clientData,omitempty"`
}

OpBoardLoadMore .

func (OpBoardLoadMore) OpKey

OpKey .

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 .

func (OpBoardUpdate) OpKey

func (o OpBoardUpdate) OpKey() cptype.OperationKey

OpKey .

type OpBoardUpdateClientData

type OpBoardUpdateClientData struct {
	DataRef *Board `json:"dataRef,omitempty"`

	// update fields
	Title string `json:"title,omitempty"`
}

OpBoardUpdateClientData .

type OpBoardUpdateServerData

type OpBoardUpdateServerData struct{}

OpBoardUpdateServerData .

type OpCardMoveTo

type OpCardMoveTo struct {
	cptype.Operation
	ServerData OpCardMoveToServerData `json:"serverData,omitempty"`
	ClientData OpCardMoveToClientData `json:"clientData,omitempty"`
}

OpCardMoveTo .

func (OpCardMoveTo) OpKey

func (o OpCardMoveTo) OpKey() cptype.OperationKey

OpKey .

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 .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL