Documentation
¶
Index ¶
- type Card
- type DropDownMenu
- type DropDownMenuItem
- type Duration
- type IModel
- type IUnifiedColor
- type IUnifiedStatus
- type Icon
- type KV
- type Label
- type Labels
- type MoreOpItem
- type MoreOperations
- type OpClick
- type OpClickGoto
- type OpClickGotoServerData
- type OpDropDownMenuChange
- type OpDropDownMenuChangeClientData
- type OpDropDownMenuChangeServerData
- type OpMoreOperationsItemClick
- type OpMoreOperationsItemClickClientData
- type OpMoreOperationsItemClickGoto
- type OpMoreOperationsItemClickGotoClientData
- type OpMoreOperationsItemClickGotoServerData
- type OpMoreOperationsItemClickServerData
- type OpUserSelectorChange
- type OpUserSelectorChangeClientData
- type OpUserSelectorChangeServerData
- type ProgressBar
- type Text
- type UnifiedColor
- type UnifiedStatus
- type User
- type UserSelector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Card ¶
type Card struct {
ID string `json:"id,omitempty"`
Title string `json:"title,omitempty"`
cptype.Extra
}
Card .
type DropDownMenu ¶
type DropDownMenu struct {
Menus []DropDownMenuItem `json:"menus,omitempty"`
Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"`
}
DropDownMenu .
type DropDownMenuItem ¶
type DropDownMenuItem struct {
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Icon *Icon `json:"icon,omitempty"`
UnifiedStatus UnifiedStatus `json:"unifiedStatus,omitempty"`
Selected bool `json:"selected,omitempty"`
Disabled bool `json:"disabled,omitempty"`
Hidden bool `json:"hidden,omitempty"`
Tip string `json:"tip,omitempty"`
}
DropDownMenuItem .
type Duration ¶
type Duration struct {
Value int64 `json:"value,omitempty"`
Tip string `json:"tip,omitempty"` // Hover on the text, use '\n' for newlines
}
Duration A Duration represents the elapsed time between two instants Such as 10s 360s, if the value is -1 means not started
type Label ¶
type Label struct {
ID string `json:"id,omitempty"`
Title string `json:"title,omitempty"`
Color UnifiedColor `json:"color,omitempty"`
Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"`
}
Label .
type Labels ¶
type Labels struct {
Labels []Label `json:"labels,omitempty"`
Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"`
}
Labels .
type MoreOpItem ¶
type MoreOpItem struct {
ID string `json:"id,omitempty"`
Text string `json:"text,omitempty"`
Icon *Icon `json:"icon,omitempty"`
Operations map[cptype.OperationKey]cptype.Operation `json:"operations"`
}
MoreOpItem more operation item info
type MoreOperations ¶
type MoreOperations struct {
Ops []MoreOpItem `json:"ops,omitempty"` // use list for order
}
MoreOperations .
type OpClickGotoServerData ¶
type OpClickGotoServerData struct {
// open a new fronted page
JumpOut bool `json:"jumpOut,omitempty"`
// the jump out target of the new opened fronted page, e.g: projectAllIssue page
Target string `json:"target,omitempty"`
// params needed for jumping to the new page, e.g: projectId
Params map[string]interface{} `json:"params,omitempty"`
// the query condition of the new page, e.g: issueFilter__urlQuery
Query map[string]interface{} `json:"query,omitempty"`
}
OpClickGotoServerData .
type OpDropDownMenuChange ¶
type OpDropDownMenuChange struct {
cptype.Operation
ServerData OpDropDownMenuChangeServerData `json:"serverData,omitempty"`
ClientData OpDropDownMenuChangeClientData `json:"clientData,omitempty"`
}
OpDropDownMenuChange .
func (OpDropDownMenuChange) OpKey ¶
func (o OpDropDownMenuChange) OpKey() cptype.OperationKey
OpKey .
type OpDropDownMenuChangeClientData ¶
type OpDropDownMenuChangeClientData struct {
DataRef *DropDownMenuItem `json:"dataRef,omitempty"`
SelectedItemID string `json:"selectedItemID,omitempty"`
}
OpDropDownMenuChangeClientData .
type OpDropDownMenuChangeServerData ¶
type OpDropDownMenuChangeServerData struct{}
OpDropDownMenuChangeServerData .
type OpMoreOperationsItemClick ¶
type OpMoreOperationsItemClick struct {
OpClick
ServerData OpMoreOperationsItemClickServerData `json:"serverData,omitempty"`
ClientData OpMoreOperationsItemClickClientData `json:"clientData,omitempty"`
}
OpMoreOperationsItemClick .
type OpMoreOperationsItemClickClientData ¶
type OpMoreOperationsItemClickClientData struct {
DataRef *MoreOpItem `json:"dataRef,omitempty"`
ParentDataRef interface{} `json:"parentDataRef,omitempty"` // optional, such like list row data, table row data
}
OpMoreOperationsItemClickClientData .
type OpMoreOperationsItemClickGoto ¶
type OpMoreOperationsItemClickGoto struct {
OpClickGoto
}
OpMoreOperationsItemClickGoto .
type OpMoreOperationsItemClickGotoClientData ¶
type OpMoreOperationsItemClickGotoClientData struct {
OpMoreOperationsItemClickClientData
}
OpMoreOperationsItemClickGotoClientData .
type OpMoreOperationsItemClickGotoServerData ¶
type OpMoreOperationsItemClickGotoServerData struct {
OpClickGotoServerData
}
OpMoreOperationsItemClickGotoServerData .
type OpMoreOperationsItemClickServerData ¶
type OpMoreOperationsItemClickServerData struct {
}
OpMoreOperationsItemClickServerData .
type OpUserSelectorChange ¶
type OpUserSelectorChange struct {
cptype.Operation
ServerData OpUserSelectorChangeServerData `json:"serverData,omitempty"`
ClientData OpUserSelectorChangeClientData `json:"clientData,omitempty"`
}
OpUserSelectorChange .
func (OpUserSelectorChange) OpKey ¶
func (o OpUserSelectorChange) OpKey() cptype.OperationKey
OpKey .
type OpUserSelectorChangeClientData ¶
type OpUserSelectorChangeClientData struct {
DataRef *DropDownMenuItem `json:"dataRef,omitempty"`
SelectedUserIDs []string `json:"selectedUserIDs,omitempty"`
}
OpUserSelectorChangeClientData .
type OpUserSelectorChangeServerData ¶
type OpUserSelectorChangeServerData struct{}
OpUserSelectorChangeServerData .
type ProgressBar ¶
type ProgressBar struct {
// BarCompletedNum is Numerator.
BarCompletedNum int64 `json:"barCompletedNum,omitempty"`
// BarTotalNum is Denominator.
BarTotalNum int64 `json:"barTotalNum,omitempty"`
// BarPercent is the calculated result.
// Optional.
// If not present, BarCompletedNum and BarTotalNum must provide.
// For some situations, backend only have percent value.
BarPercent float64 `json:"barPercent,omitempty"` // optional, percent, range: [0,100], such as: 0.1, 20, 100
Text string `json:"text,omitempty"` // optional, bar detail text
Tip string `json:"tip,omitempty"` // optional, tip
Status UnifiedStatus `json:"status,omitempty"` // optional, status
}
ProgressBar is progress bar. formula: BarPercent = BarCompletedNum / BarTotalNum * 100 example: 7/10 * 100 = 70
type Text ¶
type Text struct {
Text string `json:"text,omitempty"`
EnableCopy bool `json:"enableCopy,omitempty"`
Status UnifiedStatus `json:"status,omitempty"`
Tip string `json:"tip,omitempty"` // Hover on the text, use '\n' for newlines
}
Text .
type UnifiedColor ¶
type UnifiedColor int
UnifiedColor .
const ( ColorRed UnifiedColor = iota ColorYellow ColorGreen ColorBlue ColorPurple ColorDefault )
UnifiedColor .
type UnifiedStatus ¶
type UnifiedStatus string
UnifiedStatus .
const ( ErrorStatus UnifiedStatus = "error" WarningStatus UnifiedStatus = "warning" SuccessStatus UnifiedStatus = "success" ProcessingStatus UnifiedStatus = "processing" DefaultStatus UnifiedStatus = "default" )
UnifiedStatus .
type User ¶
type User struct {
ID string `json:"id,omitempty"`
Name string `json:"name,omitempty"`
Avatar string `json:"avatar,omitempty"`
}
User .
type UserSelector ¶
type UserSelector struct {
Scope string `json:"scope,omitempty"` // org/project/app/etc
ScopeID string `json:"scopeID,omitempty"`
SelectedUserIDs []string `json:"selectedUserIDs,omitempty"`
Operations map[cptype.OperationKey]cptype.Operation `json:"operations,omitempty"`
}
UserSelector .