cardlist

package
v1.0.6 Latest Latest
Warning

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

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

Documentation

Index

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"`
	ImgURL         string                                   `json:"imgURL"`
	Icon           string                                   `json:"icon"`
	Title          string                                   `json:"title"`
	TitleState     []TitleState                             `json:"titleState"`
	Star           bool                                     `json:"star"`
	TextMeta       []TextMeta                               `json:"textMeta"`
	IconOperations []IconOperations                         `json:"iconOperations"`
	Operations     map[cptype.OperationKey]cptype.Operation `json:"operations"`
	cptype.Extra
}

Card .

type CustomData

type CustomData interface {
	CustomDataPtr() interface{}
	EncodeFromCustomData(customDataPtr interface{}, stdDataPtr *Data)
	DecodeToCustomData(stdDataPtr *Data, customDataPtr interface{})
}

CustomData is cardList'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 cardList'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 cardList's custom state handler.

type Data

type Data struct {
	Total        int    `json:"total"`
	Title        string `json:"title"`
	TitleSummary string `json:"titleSummary"`
	Cards        []Card `json:"cards"`
}

Data card std data

type ICard

type ICard interface {
	cptype.IComponent
	ICardListStdOps
}

ICard .

type ICardListStdOps

type ICardListStdOps interface {
	// RegisterCardListStarOp give card star
	RegisterCardListStarOp(opData OpCardListStar) (opFunc cptype.OperationFunc)
}

ICardListStdOps .

type IconOperations

type IconOperations struct {
	Icon       string                                   `json:"icon"`
	Tip        string                                   `json:"tip"`
	Operations map[cptype.OperationKey]cptype.Operation `json:"operations"`
}

IconOperations .

type OpCardListGoto

type OpCardListGoto struct {
	cptype.Operation
	ServerData *OpCardListGotoData `json:"serverData,omitempty"`
}

OpCardListGoto define click operation of cardList .

func (OpCardListGoto) OpKey

OpKey .

type OpCardListGotoData

type OpCardListGotoData struct {
	// if JumpOut is true ,open new window, else open slide window
	JumpOut bool            `json:"jumpOut"`
	Target  string          `json:"target"`
	Query   cptype.ExtraMap `json:"query,omitempty"`
	Params  cptype.ExtraMap `json:"params,omitempty"`
}

OpCardListGotoData define click operation data of cardList .

type OpCardListStar

type OpCardListStar struct {
	cptype.Operation
	Icon string `json:"icon"`
	Tip  string `json:"tip"`
}

OpCardListStar give card star.

func (OpCardListStar) OpKey

OpKey .

type TextMeta

type TextMeta struct {
	MainText   float64                                  `json:"mainText"`
	SubText    string                                   `json:"subText"`
	Operations map[cptype.OperationKey]cptype.Operation `json:"operations"`
}

TextMeta .

type TitleState

type TitleState struct {
	Text   string `json:"text"`
	Color  string `json:"color"`
	Status string `json:"status"`
}

TitleState .

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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