message

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 0 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TEXT        string = "text"
	LINK        string = "link"
	MARKDOWN    string = "markdown"
	ACTION_CARD string = "actionCard"
	FEED_CARD   string = "feedCard"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ActionCard

type ActionCard struct {
	Title          string `json:"title"`
	Text           string `json:"text"`
	BtnOrientation string `json:"btnOrientation"`
	Btns           Btns   `json:"btns"`
}

type ActionCardMessage

type ActionCardMessage struct {
	Msgtype    string     `json:"msgtype"`
	ActionCard ActionCard `json:"actionCard"`
}

func NewActionCardMessage

func NewActionCardMessage(actionCard ActionCard) *ActionCardMessage

type At

type At struct {
	AtMobiles []string `json:"atMobiles"`
	AtUserIds []string `json:"atUserIds"`
	IsAtAll   bool     `json:"isAtAll"`
}

type Btns

type Btns []struct {
	Title     string `json:"title"`
	ActionURL string `json:"actionURL"`
}

type FeedCard

type FeedCard struct {
	Links Links `json:"links"`
}

type FeedCardMessage

type FeedCardMessage struct {
	Msgtype  string   `json:"msgtype"`
	FeedCard FeedCard `json:"feedCard"`
}

func NewFeedCardMessage

func NewFeedCardMessage(feedCard FeedCard) *FeedCardMessage
type Link struct {
	Text       string `json:"text"`
	Title      string `json:"title"`
	PicUrl     string `json:"picUrl"`
	MessageUrl string `json:"messageUrl"`
}

type LinkMessage

type LinkMessage struct {
	Msgtype string `json:"msgtype"`
	Link    Link   `json:"link"`
}

func NewLinkMessage

func NewLinkMessage(link Link) *LinkMessage
type Links []struct {
	Title      string `json:"title"`
	MessageURL string `json:"messageURL"`
	PicURL     string `json:"picURL"`
}

type MarkDownMessage

type MarkDownMessage struct {
	Msgype   string   `json:"msgtype"`
	Markdown Markdown `json:"markdown"`
	At       At       `json:"at"`
}

func NewMarkDownMessage

func NewMarkDownMessage(markdown Markdown, at At) *MarkDownMessage

type Markdown

type Markdown struct {
	Title string `json:"title"`
	Text  string `json:"text"`
}

type MessageResponse

type MessageResponse struct {
	ErrCode int    `json:"errcode"`
	ErrMsg  string `json:"errmsg"`
}

type Text

type Text struct {
	Content string `json:"content"`
}

type TextMessage

type TextMessage struct {
	Msgtype string `json:"msgtype"`
	At      At     `json:"at"`
	Text    Text   `json:"text"`
}

func NewTextMessage

func NewTextMessage(at At, text Text) *TextMessage

Jump to

Keyboard shortcuts

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