larkcard

package
v3.1.1-beta.1 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 9 Imported by: 25

Documentation

Index

Constants

View Source
const (
	TemplateBlue      = "blue"
	TemplateWathet    = "wathet"
	TemplateTurquoise = "turquoise"
	TemplateGreen     = "green"
	TemplateYellow    = "yellow"
	TemplateOrange    = "orange"
	TemplateRed       = "red"
	TemplateCarmine   = "carmine"
	TemplateViolet    = "violet"
	TemplatePurple    = "purple"
	TemplateIndigo    = "indigo"
	TemplateGrey      = "grey"
)

Variables

This section is empty.

Functions

func Signature

func Signature(timestamp, nonce, token, body string) string

Types

type CardAction

type CardAction struct {
	*larkevent.EventReq
	OpenID        string `json:"open_id"`
	UserID        string `json:"user_id"`
	OpenMessageID string `json:"open_message_id"`
	OpenChatId    string `json:"open_chat_id"`
	TenantKey     string `json:"tenant_key"`
	Token         string `json:"token"`
	Timezone      string `json:"timezone"`
	Challenge     string `json:"challenge"`
	Type          string `json:"type"`

	Action *struct {
		Value    map[string]interface{} `json:"value"`
		Tag      string                 `json:"tag"`
		Option   string                 `json:"option"`
		Timezone string                 `json:"timezone"`
	} `json:"action"`
}

type CardActionBody

type CardActionBody struct {
	*CardAction
	Challenge string `json:"challenge"`
	Type      string `json:"type"`
}

type CardActionHandler

type CardActionHandler struct {
	*larkcore.Config
	// contains filtered or unexported fields
}

func NewCardActionHandler

func NewCardActionHandler(verificationToken, eventEncryptKey string, handler func(context.Context, *CardAction) (interface{}, error)) *CardActionHandler

func (*CardActionHandler) AuthByChallenge

func (h *CardActionHandler) AuthByChallenge(ctx context.Context, cardAction *CardAction) (*larkevent.EventResp, error)

func (*CardActionHandler) DoHandle

func (h *CardActionHandler) DoHandle(ctx context.Context, cardAction *CardAction) (*larkevent.EventResp, error)

func (*CardActionHandler) Event

func (h *CardActionHandler) Event() interface{}

func (*CardActionHandler) Handle

func (h *CardActionHandler) Handle(ctx context.Context, req *larkevent.EventReq) (eventResp *larkevent.EventResp)

func (*CardActionHandler) InitConfig

func (h *CardActionHandler) InitConfig(options ...larkevent.OptionFunc)

func (*CardActionHandler) Logger

func (h *CardActionHandler) Logger() larkcore.Logger

func (*CardActionHandler) VerifySign

func (h *CardActionHandler) VerifySign(ctx context.Context, req *larkevent.EventReq) error

type CustomResp

type CustomResp struct {
	StatusCode int
	Body       map[string]interface{}
}

type CustomToastBody

type CustomToastBody struct {
	Content string `json:"content"`
	I18n    *I18n  `json:"i18n"`
}

type I18n

type I18n struct {
	ZhCn string `json:"zh_cn"`
	EnCn string `json:"en_us"`
	JaJp string `json:"ja_jp"`
}

type MessageCard

type MessageCard struct {
	Config_       *MessageCardConfig       `json:"config,omitempty"`
	Header_       *MessageCardHeader       `json:"header,omitempty"`
	Elements_     []MessageCardElement     `json:"elements,omitempty"`
	I18nElements_ *MessageCardI18nElements `json:"i18n_elements,omitempty"`
	CardLink_     *MessageCardURL          `json:"card_link,omitempty"`
}

func NewMessageCard

func NewMessageCard() *MessageCard

func (*MessageCard) Build

func (card *MessageCard) Build() *MessageCard
func (card *MessageCard) CardLink(cardLink *MessageCardURL) *MessageCard

func (*MessageCard) Config

func (card *MessageCard) Config(config *MessageCardConfig) *MessageCard

func (*MessageCard) Elements

func (card *MessageCard) Elements(elements []MessageCardElement) *MessageCard

func (*MessageCard) Header

func (card *MessageCard) Header(header *MessageCardHeader) *MessageCard

func (*MessageCard) I18nElements

func (card *MessageCard) I18nElements(i18nElements *MessageCardI18nElements) *MessageCard

func (*MessageCard) JSON

func (m *MessageCard) JSON() (string, error)

func (*MessageCard) String

func (m *MessageCard) String() (string, error)

type MessageCardAction

type MessageCardAction struct {
	Actions_ []MessageCardActionElement `json:"actions,omitempty"`
	Layout_  *MessageCardActionLayout   `json:"layout,omitempty"`
}

func NewMessageCardAction

func NewMessageCardAction() *MessageCardAction

func (*MessageCardAction) Actions

func (cardAction *MessageCardAction) Actions(actions []MessageCardActionElement) *MessageCardAction

func (*MessageCardAction) Build

func (cardAction *MessageCardAction) Build() *MessageCardAction

func (*MessageCardAction) Layout

func (cardAction *MessageCardAction) Layout(layout *MessageCardActionLayout) *MessageCardAction

func (*MessageCardAction) MarshalJSON

func (m *MessageCardAction) MarshalJSON() ([]byte, error)

func (*MessageCardAction) Tag

func (m *MessageCardAction) Tag() string

type MessageCardActionConfirm

type MessageCardActionConfirm struct {
	Title_ *MessageCardPlainText `json:"title,omitempty"`
	Text_  *MessageCardPlainText `json:"text,omitempty"`
}

func NewMessageCardActionConfirm

func NewMessageCardActionConfirm() *MessageCardActionConfirm

func (*MessageCardActionConfirm) Build

func (*MessageCardActionConfirm) Text

func (*MessageCardActionConfirm) Title

type MessageCardActionElement

type MessageCardActionElement interface {
	MessageCardElement
	IsAction()
}

type MessageCardActionLayout

type MessageCardActionLayout string
const (
	MessageCardActionLayoutBisected   MessageCardActionLayout = "bisected"
	MessageCardActionLayoutTrisection MessageCardActionLayout = "trisection"
	MessageCardActionLayoutFlow       MessageCardActionLayout = "flow"
)

func (MessageCardActionLayout) Ptr

type MessageCardButtonType

type MessageCardButtonType string
const (
	MessageCardButtonTypeDefault MessageCardButtonType = "default"
	MessageCardButtonTypePrimary MessageCardButtonType = "primary"
	MessageCardButtonTypeDanger  MessageCardButtonType = "danger"
)

func (MessageCardButtonType) Ptr

type MessageCardConfig

type MessageCardConfig struct {
	EnableForward_  *bool `json:"enable_forward,omitempty"`
	UpdateMulti_    *bool `json:"update_multi,omitempty"`
	WideScreenMode_ *bool `json:"wide_screen_mode,omitempty"`
}

func NewMessageCardConfig

func NewMessageCardConfig() *MessageCardConfig

func (*MessageCardConfig) Build

func (config *MessageCardConfig) Build() *MessageCardConfig

func (*MessageCardConfig) EnableForward

func (config *MessageCardConfig) EnableForward(enableForward bool) *MessageCardConfig

func (*MessageCardConfig) UpdateMulti

func (config *MessageCardConfig) UpdateMulti(updateMulti bool) *MessageCardConfig

func (*MessageCardConfig) WideScreenMode

func (config *MessageCardConfig) WideScreenMode(wideScreenMode bool) *MessageCardConfig

type MessageCardDiv

type MessageCardDiv struct {
	Text_   MessageCardText         `json:"text,omitempty"`
	Fields_ []*MessageCardField     `json:"fields,omitempty"`
	Extra_  MessageCardExtraElement `json:"extra,omitempty"`
}

func NewMessageCardDiv

func NewMessageCardDiv() *MessageCardDiv

func (*MessageCardDiv) Build

func (div *MessageCardDiv) Build() *MessageCardDiv

func (*MessageCardDiv) Extra

func (*MessageCardDiv) Fields

func (div *MessageCardDiv) Fields(fields []*MessageCardField) *MessageCardDiv

func (*MessageCardDiv) MarshalJSON

func (m *MessageCardDiv) MarshalJSON() ([]byte, error)

func (*MessageCardDiv) Tag

func (m *MessageCardDiv) Tag() string

func (*MessageCardDiv) Text

type MessageCardElement

type MessageCardElement interface {
	Tag() string
	MarshalJSON() ([]byte, error)
}

type MessageCardEmbedButton

type MessageCardEmbedButton struct {
	Text_     MessageCardText           `json:"text,omitempty"`
	URL_      *string                   `json:"url,omitempty"`
	MultiURL_ *MessageCardURL           `json:"multi_url,omitempty"`
	Type_     *MessageCardButtonType    `json:"type,omitempty"`
	Value_    map[string]interface{}    `json:"value,omitempty"`
	Confirm_  *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func NewMessageCardEmbedButton

func NewMessageCardEmbedButton() *MessageCardEmbedButton

func (*MessageCardEmbedButton) Build

func (*MessageCardEmbedButton) Confirm

func (*MessageCardEmbedButton) IsAction

func (m *MessageCardEmbedButton) IsAction()

func (*MessageCardEmbedButton) IsExtra

func (m *MessageCardEmbedButton) IsExtra()

func (*MessageCardEmbedButton) MarshalJSON

func (m *MessageCardEmbedButton) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedButton) MultiUrl

func (*MessageCardEmbedButton) Tag

func (m *MessageCardEmbedButton) Tag() string

func (*MessageCardEmbedButton) Text

func (*MessageCardEmbedButton) Type

func (*MessageCardEmbedButton) Url

func (*MessageCardEmbedButton) Value

func (m *MessageCardEmbedButton) Value(value map[string]interface{}) *MessageCardEmbedButton

type MessageCardEmbedDatePicker

type MessageCardEmbedDatePicker struct {
	*MessageCardEmbedDatePickerBase
}

func NewMessageCardEmbedDatePicker

func NewMessageCardEmbedDatePicker() *MessageCardEmbedDatePicker

func (*MessageCardEmbedDatePicker) MarshalJSON

func (m *MessageCardEmbedDatePicker) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedDatePicker) MessageCardEmbedDatePicker

func (*MessageCardEmbedDatePicker) Tag

type MessageCardEmbedDatePickerBase

type MessageCardEmbedDatePickerBase struct {
	InitialDate_     *string                   `json:"initial_date,omitempty"`
	InitialTime_     *string                   `json:"initial_time,omitempty"`
	InitialDatetime_ *string                   `json:"initial_datetime,omitempty"`
	Placeholder_     *MessageCardPlainText     `json:"placeholder,omitempty"`
	Value_           map[string]interface{}    `json:"value,omitempty"`
	Confirm_         *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func NewMessageCardEmbedDatePickerBase

func NewMessageCardEmbedDatePickerBase() *MessageCardEmbedDatePickerBase

func (*MessageCardEmbedDatePickerBase) Build

func (*MessageCardEmbedDatePickerBase) Confirm

func (*MessageCardEmbedDatePickerBase) InitialDate

func (picker *MessageCardEmbedDatePickerBase) InitialDate(initialDate string) *MessageCardEmbedDatePickerBase

func (*MessageCardEmbedDatePickerBase) InitialDatetime

func (picker *MessageCardEmbedDatePickerBase) InitialDatetime(initialDatetime string) *MessageCardEmbedDatePickerBase

func (*MessageCardEmbedDatePickerBase) InitialTime

func (picker *MessageCardEmbedDatePickerBase) InitialTime(initialTime string) *MessageCardEmbedDatePickerBase

func (*MessageCardEmbedDatePickerBase) IsAction

func (m *MessageCardEmbedDatePickerBase) IsAction()

func (*MessageCardEmbedDatePickerBase) IsExtra

func (m *MessageCardEmbedDatePickerBase) IsExtra()

func (*MessageCardEmbedDatePickerBase) Placeholder

func (*MessageCardEmbedDatePickerBase) Value

func (picker *MessageCardEmbedDatePickerBase) Value(value map[string]interface{}) *MessageCardEmbedDatePickerBase

type MessageCardEmbedImage

type MessageCardEmbedImage struct {
	Alt_     *MessageCardPlainText  `json:"alt,omitempty"`
	ImgKey_  string                 `json:"img_key,omitempty"`
	Mode_    *MessageCardImageModel `json:"mode,omitempty"`
	Preview_ *bool                  `json:"preview,omitempty"`
}

func NewMessageCardEmbedImage

func NewMessageCardEmbedImage() *MessageCardEmbedImage

func (*MessageCardEmbedImage) Alt

func (*MessageCardEmbedImage) Build

func (*MessageCardEmbedImage) ImgKey

func (image *MessageCardEmbedImage) ImgKey(imgKey string) *MessageCardEmbedImage

func (*MessageCardEmbedImage) IsExtra

func (m *MessageCardEmbedImage) IsExtra()

func (*MessageCardEmbedImage) IsNote

func (m *MessageCardEmbedImage) IsNote()

func (*MessageCardEmbedImage) MarshalJSON added in v3.0.1

func (m *MessageCardEmbedImage) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedImage) Mode

func (*MessageCardEmbedImage) Preview

func (image *MessageCardEmbedImage) Preview(preview bool) *MessageCardEmbedImage

func (*MessageCardEmbedImage) Tag

func (m *MessageCardEmbedImage) Tag() string

type MessageCardEmbedOverflow

type MessageCardEmbedOverflow struct {
	Options_ []*MessageCardEmbedSelectOption `json:"options,omitempty"`
	Value_   map[string]interface {
	} `json:"value,omitempty"`
	Confirm_ *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func NewMessageCardEmbedOverflow

func NewMessageCardEmbedOverflow() *MessageCardEmbedOverflow

func (*MessageCardEmbedOverflow) Build

func (*MessageCardEmbedOverflow) Confirm

func (*MessageCardEmbedOverflow) IsAction

func (m *MessageCardEmbedOverflow) IsAction()

func (*MessageCardEmbedOverflow) IsExtra

func (m *MessageCardEmbedOverflow) IsExtra()

func (*MessageCardEmbedOverflow) MarshalJSON

func (m *MessageCardEmbedOverflow) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedOverflow) Options

func (*MessageCardEmbedOverflow) Tag

func (*MessageCardEmbedOverflow) Value

func (overFlow *MessageCardEmbedOverflow) Value(value map[string]interface{}) *MessageCardEmbedOverflow

type MessageCardEmbedPickerDatetime

type MessageCardEmbedPickerDatetime struct {
	*MessageCardEmbedDatePickerBase
}

func NewMessageCardEmbedPickerDatetime

func NewMessageCardEmbedPickerDatetime() *MessageCardEmbedPickerDatetime

func (*MessageCardEmbedPickerDatetime) Build

func (*MessageCardEmbedPickerDatetime) MarshalJSON

func (m *MessageCardEmbedPickerDatetime) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedPickerDatetime) MessageCardEmbedPickerDatetime

func (*MessageCardEmbedPickerDatetime) Tag

type MessageCardEmbedPickerTime

type MessageCardEmbedPickerTime struct {
	*MessageCardEmbedDatePickerBase
}

func NewMessageCardEmbedPickerTime

func NewMessageCardEmbedPickerTime() *MessageCardEmbedPickerTime

func (*MessageCardEmbedPickerTime) Build

func (*MessageCardEmbedPickerTime) MarshalJSON

func (m *MessageCardEmbedPickerTime) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedPickerTime) MessageCardEmbedPickerTime

func (*MessageCardEmbedPickerTime) Tag

type MessageCardEmbedSelectMenuBase

type MessageCardEmbedSelectMenuBase struct {
	Placeholder_   *MessageCardPlainText           `json:"placeholder,omitempty"`
	InitialOption_ string                          `json:"initial_option,omitempty"`
	Options_       []*MessageCardEmbedSelectOption `json:"options,omitempty"`
	Value_         map[string]interface {
	} `json:"value,omitempty"`
	Confirm_ *MessageCardActionConfirm `json:"confirm,omitempty"`
}

func NewMessageCardEmbedSelectMenuBase

func NewMessageCardEmbedSelectMenuBase() *MessageCardEmbedSelectMenuBase

func (*MessageCardEmbedSelectMenuBase) Build

func (*MessageCardEmbedSelectMenuBase) Confirm

func (*MessageCardEmbedSelectMenuBase) InitialOption

func (selectMenu *MessageCardEmbedSelectMenuBase) InitialOption(initialOption string) *MessageCardEmbedSelectMenuBase

func (*MessageCardEmbedSelectMenuBase) IsAction

func (m *MessageCardEmbedSelectMenuBase) IsAction()

func (*MessageCardEmbedSelectMenuBase) IsExtra

func (m *MessageCardEmbedSelectMenuBase) IsExtra()

func (*MessageCardEmbedSelectMenuBase) Options

func (*MessageCardEmbedSelectMenuBase) Placeholder

func (*MessageCardEmbedSelectMenuBase) Value

func (selectMenu *MessageCardEmbedSelectMenuBase) Value(value map[string]interface{}) *MessageCardEmbedSelectMenuBase

type MessageCardEmbedSelectMenuPerson

type MessageCardEmbedSelectMenuPerson struct {
	*MessageCardEmbedSelectMenuBase
}

func NewMessageCardEmbedSelectMenuPerson

func NewMessageCardEmbedSelectMenuPerson() *MessageCardEmbedSelectMenuPerson

func (*MessageCardEmbedSelectMenuPerson) Build

func (menuPerson *MessageCardEmbedSelectMenuPerson) Build(messageCardEmbedSelectMenuBase *MessageCardEmbedSelectMenuBase) *MessageCardEmbedSelectMenuPerson

func (*MessageCardEmbedSelectMenuPerson) MarshalJSON

func (m *MessageCardEmbedSelectMenuPerson) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedSelectMenuPerson) MessageCardEmbedSelectMenu

func (menuPerson *MessageCardEmbedSelectMenuPerson) MessageCardEmbedSelectMenu(messageCardEmbedSelectMenuBase *MessageCardEmbedSelectMenuBase) *MessageCardEmbedSelectMenuPerson

func (*MessageCardEmbedSelectMenuPerson) Tag

type MessageCardEmbedSelectMenuStatic

type MessageCardEmbedSelectMenuStatic struct {
	*MessageCardEmbedSelectMenuBase
}

func NewMessageCardEmbedSelectMenuStatic

func NewMessageCardEmbedSelectMenuStatic() *MessageCardEmbedSelectMenuStatic

func (*MessageCardEmbedSelectMenuStatic) Build

func (*MessageCardEmbedSelectMenuStatic) MarshalJSON

func (m *MessageCardEmbedSelectMenuStatic) MarshalJSON() ([]byte, error)

func (*MessageCardEmbedSelectMenuStatic) MessageCardEmbedSelectMenuStatic

func (*MessageCardEmbedSelectMenuStatic) Tag

type MessageCardEmbedSelectOption

type MessageCardEmbedSelectOption struct {
	Text_     *MessageCardPlainText  `json:"text,omitempty"`
	Value_    string                 `json:"value,omitempty"`
	URL_      *string                `json:"url,omitempty"`
	MultiURL_ *MessageCardURL        `json:"multi_url,omitempty"`
	Type_     *MessageCardButtonType `json:"type,omitempty"`
}

func NewMessageCardEmbedSelectOption

func NewMessageCardEmbedSelectOption() *MessageCardEmbedSelectOption

func (*MessageCardEmbedSelectOption) Build

func (*MessageCardEmbedSelectOption) MultiUrl

func (*MessageCardEmbedSelectOption) Text

func (*MessageCardEmbedSelectOption) Type

func (*MessageCardEmbedSelectOption) URL

func (*MessageCardEmbedSelectOption) Value

type MessageCardExtraElement

type MessageCardExtraElement interface {
	MessageCardElement
	IsExtra()
}

type MessageCardField

type MessageCardField struct {
	IsShort_ bool            `json:"is_short,omitempty"`
	Text_    MessageCardText `json:"text,omitempty"`
}

func NewMessageCardField

func NewMessageCardField() *MessageCardField

func (*MessageCardField) Build

func (field *MessageCardField) Build() *MessageCardField

func (*MessageCardField) IsShort

func (field *MessageCardField) IsShort(isShort bool) *MessageCardField

func (*MessageCardField) Text

type MessageCardHeader

type MessageCardHeader struct {
	Template_ *string               `json:"template,omitempty"`
	Title_    *MessageCardPlainText `json:"title,omitempty"`
}

func NewMessageCardHeader

func NewMessageCardHeader() *MessageCardHeader

func (*MessageCardHeader) Build

func (header *MessageCardHeader) Build() *MessageCardHeader

func (*MessageCardHeader) Template

func (header *MessageCardHeader) Template(template string) *MessageCardHeader

func (*MessageCardHeader) Title

type MessageCardHr

type MessageCardHr struct {
}

func NewMessageCardHr

func NewMessageCardHr() *MessageCardHr

func (*MessageCardHr) Build

func (hr *MessageCardHr) Build() *MessageCardHr

func (*MessageCardHr) MarshalJSON

func (m *MessageCardHr) MarshalJSON() ([]byte, error)

func (*MessageCardHr) Tag

func (m *MessageCardHr) Tag() string

type MessageCardI18nElements

type MessageCardI18nElements struct {
	ZhCN_ []MessageCardElement `json:"zh_cn,omitempty"`
	EnUS_ []MessageCardElement `json:"en_us,omitempty"`
	JaJP_ []MessageCardElement `json:"ja_jp,omitempty"`
}

func NewMessageCardI18nElements

func NewMessageCardI18nElements() *MessageCardI18nElements

func (*MessageCardI18nElements) Build

func (*MessageCardI18nElements) EnUS

func (*MessageCardI18nElements) JaJP

func (*MessageCardI18nElements) ZhCN

type MessageCardImage

type MessageCardImage struct {
	Alt_          *MessageCardPlainText  `json:"alt,omitempty"`
	Title_        MessageCardText        `json:"title,omitempty"`
	ImgKey_       string                 `json:"img_key,omitempty"`
	CustomWidth_  *int                   `json:"custom_width,omitempty"`
	CompactWidth_ *bool                  `json:"compact_width,omitempty"`
	Mode_         *MessageCardImageModel `json:"mode,omitempty"`
	Preview_      *bool                  `json:"preview,omitempty"`
}

func NewMessageCardImage

func NewMessageCardImage() *MessageCardImage

func (*MessageCardImage) Alt

func (*MessageCardImage) Build

func (image *MessageCardImage) Build() *MessageCardImage

func (*MessageCardImage) CompactWidth

func (image *MessageCardImage) CompactWidth(compactWidth bool) *MessageCardImage

func (*MessageCardImage) CustomWidth

func (image *MessageCardImage) CustomWidth(customWidth int) *MessageCardImage

func (*MessageCardImage) ImgKey

func (image *MessageCardImage) ImgKey(imgKey string) *MessageCardImage

func (*MessageCardImage) MarshalJSON

func (m *MessageCardImage) MarshalJSON() ([]byte, error)

func (*MessageCardImage) Mode

func (*MessageCardImage) Preview

func (image *MessageCardImage) Preview(preview bool) *MessageCardImage

func (*MessageCardImage) Tag

func (m *MessageCardImage) Tag() string

func (*MessageCardImage) Title

func (image *MessageCardImage) Title(title MessageCardText) *MessageCardImage

type MessageCardImageModel

type MessageCardImageModel string
const (
	MessageCardImageModelFitHorizontal MessageCardImageModel = "fit_horizontal"
	MessageCardImageModelCropCenter    MessageCardImageModel = "crop_center"
)

func (MessageCardImageModel) Ptr

type MessageCardLarkMd

type MessageCardLarkMd struct {
	Content_ string `json:"content,omitempty"`
}

func NewMessageCardLarkMd

func NewMessageCardLarkMd() *MessageCardLarkMd

func (*MessageCardLarkMd) Build

func (md *MessageCardLarkMd) Build() *MessageCardLarkMd

func (*MessageCardLarkMd) Content

func (md *MessageCardLarkMd) Content(content string) *MessageCardLarkMd

func (*MessageCardLarkMd) IsExtra

func (m *MessageCardLarkMd) IsExtra()

func (*MessageCardLarkMd) IsNote

func (m *MessageCardLarkMd) IsNote()

func (*MessageCardLarkMd) MarshalJSON

func (m *MessageCardLarkMd) MarshalJSON() ([]byte, error)

func (*MessageCardLarkMd) Tag

func (m *MessageCardLarkMd) Tag() string

func (*MessageCardLarkMd) Text

func (m *MessageCardLarkMd) Text() string

type MessageCardMarkdown

type MessageCardMarkdown struct {
	Content_ string                     `json:"content,omitempty"`
	Href_    map[string]*MessageCardURL `json:"href,omitempty"`
}

func NewMessageCardMarkdown

func NewMessageCardMarkdown() *MessageCardMarkdown

func (*MessageCardMarkdown) Build

func (markDown *MessageCardMarkdown) Build() *MessageCardMarkdown

func (*MessageCardMarkdown) Content

func (markDown *MessageCardMarkdown) Content(content string) *MessageCardMarkdown

func (*MessageCardMarkdown) Href

func (markDown *MessageCardMarkdown) Href(href map[string]*MessageCardURL) *MessageCardMarkdown

func (*MessageCardMarkdown) MarshalJSON

func (m *MessageCardMarkdown) MarshalJSON() ([]byte, error)

func (*MessageCardMarkdown) Tag

func (m *MessageCardMarkdown) Tag() string

type MessageCardNote

type MessageCardNote struct {
	Elements_ []MessageCardNoteElement `json:"elements,omitempty"`
}

func NewMessageCardNote

func NewMessageCardNote() *MessageCardNote

func (*MessageCardNote) Build

func (note *MessageCardNote) Build() *MessageCardNote

func (*MessageCardNote) Elements

func (note *MessageCardNote) Elements(elements []MessageCardNoteElement) *MessageCardNote

func (*MessageCardNote) MarshalJSON

func (m *MessageCardNote) MarshalJSON() ([]byte, error)

func (*MessageCardNote) Tag

func (m *MessageCardNote) Tag() string

type MessageCardNoteElement

type MessageCardNoteElement interface {
	MessageCardElement
	IsNote()
}

type MessageCardPlainText

type MessageCardPlainText struct {
	Content_ string                    `json:"content,omitempty"`
	Lines_   *int                      `json:"lines,omitempty"`
	I18n_    *MessageCardPlainTextI18n `json:"i18n,omitempty"`
}

func NewMessageCardPlainText

func NewMessageCardPlainText() *MessageCardPlainText

func (*MessageCardPlainText) Build

func (plainText *MessageCardPlainText) Build() *MessageCardPlainText

func (*MessageCardPlainText) Content

func (plainText *MessageCardPlainText) Content(content string) *MessageCardPlainText

func (*MessageCardPlainText) I18n

func (*MessageCardPlainText) IsExtra

func (m *MessageCardPlainText) IsExtra()

func (*MessageCardPlainText) IsNote

func (m *MessageCardPlainText) IsNote()

func (*MessageCardPlainText) Lines

func (plainText *MessageCardPlainText) Lines(lines int) *MessageCardPlainText

func (*MessageCardPlainText) MarshalJSON

func (m *MessageCardPlainText) MarshalJSON() ([]byte, error)

func (*MessageCardPlainText) Tag

func (m *MessageCardPlainText) Tag() string

func (*MessageCardPlainText) Text

func (m *MessageCardPlainText) Text() string

type MessageCardPlainTextI18n

type MessageCardPlainTextI18n struct {
	ZhCN_ string `json:"zh_cn,omitempty"`
	EnUS_ string `json:"en_us,omitempty"`
	JaJP_ string `json:"ja_jp,omitempty"`
}

func NewMessageCardPlainTextI18n

func NewMessageCardPlainTextI18n() *MessageCardPlainTextI18n

func (*MessageCardPlainTextI18n) Build

func (*MessageCardPlainTextI18n) EnUS

func (*MessageCardPlainTextI18n) JaJP

func (*MessageCardPlainTextI18n) ZhCN

type MessageCardText

type MessageCardText interface {
	MessageCardElement
	Text() string
}

type MessageCardURL

type MessageCardURL struct {
	URL_        string `json:"url,omitempty"`
	AndroidURL_ string `json:"android_url,omitempty"`
	IOSURL_     string `json:"ios_url,omitempty"`
	PCURL_      string `json:"pc_url,omitempty"`
}

func NewMessageCardURL

func NewMessageCardURL() *MessageCardURL

func (*MessageCardURL) AndroidUrl

func (cardUrl *MessageCardURL) AndroidUrl(androidUrl string) *MessageCardURL

func (*MessageCardURL) Build

func (cardUrl *MessageCardURL) Build() *MessageCardURL

func (*MessageCardURL) IoSUrl

func (cardUrl *MessageCardURL) IoSUrl(iOSUrl string) *MessageCardURL

func (*MessageCardURL) PcUrl

func (cardUrl *MessageCardURL) PcUrl(pcURL string) *MessageCardURL

func (*MessageCardURL) Url

func (cardUrl *MessageCardURL) Url(url string) *MessageCardURL

Jump to

Keyboard shortcuts

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