message

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TEXT     = "text"
	MARKDOWN = "markdown"
	IMAGE    = "image"
	NEWS     = "news"
	FILE     = "file"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Articles

type Articles struct {
	Title       string `json:"title"`
	Description string `json:"description"`
	URL         string `json:"url"`
	Picurl      string `json:"picurl"`
}

type File

type File struct {
	MediaID string `json:"media_id"`
}

type FileMessage

type FileMessage struct {
	Msgtype string `json:"msgtype"`
	File    File   `json:"file"`
}

FileMessage

func NewFileMessage

func NewFileMessage(mediaId string) *FileMessage

type Image

type Image struct {
	Base64 string `json:"base64"`
	Md5    string `json:"md5"`
}

type ImageMessage

type ImageMessage struct {
	Msgtype string `json:"msgtype"`
	Image   Image  `json:"image"`
}

ImageMessage

func NewImageMessage

func NewImageMessage(base64 string, md5 string) *ImageMessage

type Markdown

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

type MarkdownMessage

type MarkdownMessage struct {
	Msgtype  string   `json:"msgtype"`
	Markdown Markdown `json:"markdown"`
}

MarkdownMessage

func NewMarkdownMessage

func NewMarkdownMessage(content string) *MarkdownMessage

type News

type News struct {
	Articles []Articles `json:"articles"`
}

type NewsMessage

type NewsMessage struct {
	Msgtype string `json:"msgtype"`
	News    News   `json:"news"`
}

NewsMessage

func NewNewsMessage

func NewNewsMessage(articles []Articles) *NewsMessage

type Text

type Text struct {
	Content             string   `json:"content"`
	MentionedList       []string `json:"mentioned_list"`
	MentionedMobileList []string `json:"mentioned_mobile_list"`
}

type TextMessage

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

TextMessage

func NewTextMessage

func NewTextMessage(content string, mentionedList []string, mentionedMobileList []string) *TextMessage

Jump to

Keyboard shortcuts

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