content

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InferContentMsgType

func InferContentMsgType(content string) (msgType string, err error)

Types

type Content

type Content interface {
	ContentType
}

Content is the message content type interface.

type ContentTypeAudio

type ContentTypeAudio struct {
	FileKey string `json:"file_key"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#5d353271

type ContentTypeFile

type ContentTypeFile struct {
	FileKey string `json:"file_key"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#c92e6d46

type ContentTypeImage

type ContentTypeImage struct {
	ImageKey string `json:"image_key"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#7111df05

type ContentTypeInteractiveConfig

type ContentTypeInteractiveConfig struct {
	EnableForward  bool `json:"enable_forward"`
	UpdateMulti    bool `json:"update_multi"`
	WideScreenMode bool `json:"wide_screen_mode"`
}

type ContentTypeInteractiveElement

type ContentTypeInteractiveElement struct {
	Tag     string `json:"tag"`
	Content string `json:"content"`
	Href    struct {
		UrlVal struct {
			Url string `json:"url"`
		} `json:"urlVal"`
	} `json:"href"`
	At struct {
		Content string `json:"content"`
		Tag     string `json:"tag"`
	} `json:"at"`
	ImgKey string `json:"img_key"`
	Extra  struct {
		Alt struct {
			Content string `json:"content"`
			Tag     string `json:"tag"`
		} `json:"alt"`
		ImgKey string `json:"img_key"`
		Tag    string `json:"tag"`
	} `json:"extra"`
	Text struct {
		Content string `json:"content"`
		Tag     string `json:"tag"`
	} `json:"text"`
	Actions []struct {
		Tag  string `json:"tag"`
		Text struct {
			Content string `json:"content"`
			Tag     string `json:"tag"`
		} `json:"text"`
		Type string `json:"type"`
		Url  string `json:"url"`
	} `json:"actions"`
	Elements []struct {
		Content string `json:"content"`
		Tag     string `json:"tag"`
	} `json:"elements"`
}

type ContentTypeMedia

type ContentTypeMedia struct {
	FileKey  string `json:"file_key"`
	ImageKey string `json:"image_key"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#54406d84

type ContentTypePost

type ContentTypePost struct {
	ZhCN *ContentTypePostBody `json:"zh_cn,omitempty"`
	EnUS *ContentTypePostBody `json:"en_us,omitempty"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#45e0953e

type ContentTypePostBody

type ContentTypePostBody struct {
	Title   string                      `json:"title,omitempty"`
	Content [][]ContentTypePostBodyItem `json:"content,omitempty"`
}

type ContentTypePostBodyItem

type ContentTypePostBodyItem struct {
	// text | a | at | img
	Tag string `json:"tag"`

	// tag = text and a
	Text     string `json:"text,omitempty"`
	UnEscape bool   `json:"unescape,omitempty"`

	// tag = a
	Href string `json:"href,omitempty"`

	// tag = at
	UserID   string `json:"user_id,omitempty"`
	UserName string `json:"user_name,omitempty"`

	// tag = img | media
	ImageKey string `json:"image_key,omitempty"`

	// tag = media
	FileKey string `json:"file_key,omitempty"`

	// tag = emotion
	EmojiType string `json:"emoji_type,omitempty"`
}

type ContentTypeSticker

type ContentTypeSticker struct {
	FileKey string `json:"file_key"`
}

docs: https://open.feishu.cn/document/uAjLw4CM/ukTMukTMukTM/im-v1/message/create_json#7215e4f6

Jump to

Keyboard shortcuts

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