Documentation
¶
Index ¶
- func DeleteCard(ctx context.Context, cardID string, ...) error
- func NewYSKCard(ctx context.Context, YSKCard YSKCard, ...) error
- func ToCodegenYSKCard(card YSKCard) (codegen.YSKCard, error)
- type ActionPosition
- type CartType
- type RenderType
- type YSKCard
- func (YSKCard YSKCard) UpsertFooterAction(action YSKCardFooterAction) YSKCard
- func (yskCard YSKCard) WithFooterActions(actions []YSKCardFooterAction) YSKCard
- func (yskCard YSKCard) WithIconText(icon YSKCardIcon, description string) YSKCard
- func (ysk YSKCard) WithId(id string) YSKCard
- func (yskCard YSKCard) WithList(params []YSKCardListItem) YSKCard
- func (yskCard YSKCard) WithProgress(label string, progress int) YSKCard
- func (ysk YSKCard) WithTaskContent(TitleIcon YSKCardIcon, TitleText string) YSKCard
- type YSKCardContent
- type YSKCardFooterAction
- type YSKCardIcon
- type YSKCardIconWithText
- type YSKCardListItem
- type YSKCardMessageBusAction
- type YSKCardProgress
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteCard ¶
func NewYSKCard ¶
Types ¶
type ActionPosition ¶
type ActionPosition string
const ( ActionPositionLeft ActionPosition = "left" ActionPositionRight ActionPosition = "right" )
type RenderType ¶
type RenderType string
const ( RenderTypeCardTask RenderType = "task" RenderTypeCardListNotice RenderType = "list-notice" RenderTypeCardIconTextNotice RenderType = "icon-text-notice" RenderTypeCardMarkdownNotice RenderType = "markdown-notice" )
type YSKCard ¶
type YSKCard struct { Id string `json:"id"` CardType CartType `json:"cardType"` RenderType RenderType `json:"renderType"` Content YSKCardContent `json:"content"` }
func (YSKCard) UpsertFooterAction ¶
func (YSKCard YSKCard) UpsertFooterAction(action YSKCardFooterAction) YSKCard
it will replace the old action by same side and style
func (YSKCard) WithFooterActions ¶
func (yskCard YSKCard) WithFooterActions(actions []YSKCardFooterAction) YSKCard
replace the all old action
func (YSKCard) WithIconText ¶
func (yskCard YSKCard) WithIconText(icon YSKCardIcon, description string) YSKCard
func (YSKCard) WithList ¶
func (yskCard YSKCard) WithList(params []YSKCardListItem) YSKCard
func (YSKCard) WithProgress ¶
func (YSKCard) WithTaskContent ¶
func (ysk YSKCard) WithTaskContent(TitleIcon YSKCardIcon, TitleText string) YSKCard
type YSKCardContent ¶
type YSKCardContent struct { TitleIcon YSKCardIcon `json:"titleIcon" gorm:"column:title_icon"` TitleText string `json:"titleText" gorm:"column:title_text"` BodyProgress *YSKCardProgress `json:"bodyProgress,omitempty" gorm:"serializer:json"` BodyIconWithText *YSKCardIconWithText `json:"bodyIconWithText,omitempty" gorm:"serializer:json"` BodyList []YSKCardListItem `json:"bodyList,omitempty" gorm:"serializer:json"` }
func (*YSKCardContent) Scan ¶
func (p *YSKCardContent) Scan(value interface{}) error
type YSKCardFooterAction ¶
type YSKCardFooterAction struct {}
type YSKCardIcon ¶
type YSKCardIcon string
const ( FileIcon YSKCardIcon = "/modules/icewhale_files/appicon.svg" DiskIcon YSKCardIcon = "/src/assets/img/storage/disk.png" ZimaIcon YSKCardIcon = "/src/assets/img/zima.svg" StorageIcon YSKCardIcon = "/src/assets/img/storage/storage.svg" AppStoreIcon YSKCardIcon = "/src/assets/img/welcome/appstore.svg" )
type YSKCardIconWithText ¶
type YSKCardIconWithText struct { Icon YSKCardIcon `json:"icon"` Description string `json:"description"` }
type YSKCardListItem ¶
type YSKCardListItem struct { Icon YSKCardIcon `json:"icon"` Description string `json:"description"` RightText string `json:"rightText"` }
type YSKCardMessageBusAction ¶
type YSKCardProgress ¶
Click to show internal directories.
Click to hide internal directories.