wspush

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2024 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(w http.ResponseWriter, r *http.Request)

func PushMsgData

func PushMsgData(data []byte) error

推送FeedMsg信息

func SendMessage

func SendMessage(botToken string, reciverId int64, m interface{}, parseMode tele.ParseMode) error

Types

type FeedRichMsgBotInfoModel

type FeedRichMsgBotInfoModel struct {
	BotToken string `json:"botToken" form:"botToken"`
}

type FeedRichMsgChatInfoModel

type FeedRichMsgChatInfoModel struct {
	ToChatID int64 `json:"toChatID" form:"toChatID"`
}

type FeedRichMsgImageModel

type FeedRichMsgImageModel struct {
	PicURL   string `json:"picURL"  form:"picURL"`
	FilePath string `json:"filePath"  form:"filePath"`
	// (Optional)
	Caption string `json:"caption,omitempty"`
}

type FeedRichMsgModel

type FeedRichMsgModel struct {
	Msgtype string                `json:"msgtype"  form:"msgtype"` //rich text image video
	MsgID   string                `json:"msgID"  form:"msgID"`
	MsgTime string                `json:"msgTime"  form:"msgTime"`
	Text    FeedRichMsgTextModel  `json:"text"  form:"text"`
	Image   FeedRichMsgImageModel `json:"image"  form:"image"`
	Video   FeedRichMsgVideoModel `json:"video"  form:"video"`
	Link    string                `json:"link"  form:"link"`

	BotInfo  FeedRichMsgBotInfoModel  `json:"botInfo"  form:"botInfo"`
	ChatInfo FeedRichMsgChatInfoModel `json:"chatInfo"  form:"chatInfo"`
}

func (*FeedRichMsgModel) ToString

func (msg *FeedRichMsgModel) ToString() (res string)

type FeedRichMsgTextModel

type FeedRichMsgTextModel struct {
	Content         string `json:"content"  form:"content"`
	ContentEx       string `json:"contentEx"  form:"contentEx"`
	ContentExPic    string `json:"contentExPic"  form:"contentExPic"`
	ContentMarkdown string `json:"contentMarkdown"  form:"contentMarkdown"`
}

type FeedRichMsgVideoModel

type FeedRichMsgVideoModel struct {
	FileURL  string `json:"fileURL"  form:"fileURL"`
	FilePath string `json:"filePath"  form:"filePath"`
	// (Optional)
	Caption string `json:"caption,omitempty"`
}

Jump to

Keyboard shortcuts

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