card

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	Build() *buttonCard
	SetToMailTitle(mailTitle MainTitle) Builder
	SetSelection(selection ButtonSelection) Builder
	SetButtonList(buttons []Button) Builder
	SetContentList(list []HorizontalContentList) Builder
	SetTaskId(taskId string) Builder

	SetCustomFields(fields map[string]any) Builder
}

func NewButtonCardBuilder

func NewButtonCardBuilder() Builder

type Button

type Button struct {
	Type  int    `json:"type"`
	Text  string `json:"text"`
	Style int    `json:"style"`
	Key   string `json:"key"`
	Url   string `json:"url"`
}

type ButtonSelection

type ButtonSelection struct {
	QuestionKey string   `json:"question_key"`
	Title       string   `json:"title"`
	OptionList  []Option `json:"option_list"`
	SelectedID  string   `json:"selected_id"`
}

type HorizontalContentList

type HorizontalContentList struct {
	KeyName string `json:"keyname"`
	Value   string `json:"value"`
}

type MainTitle

type MainTitle struct {
	Title string `json:"title"`
	Desc  string `json:"desc"`
}

func NewMailTitle

func NewMailTitle(title, desc string) MainTitle

type Option

type Option struct {
	ID   string `json:"id"`
	Text string `json:"text"`
}

Jump to

Keyboard shortcuts

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