custom

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CustomTypeText            = "text"
	CustomTypeImage           = "image"
	CustomTypeNews            = "news"
	CustomTypeMpNews          = "mpnews"
	CustomTypeMenu            = "msgmenu"
	CustomTypeMiniprogrampage = "miniprogrampage"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Custom

type Custom struct {
	*context.Context
}

客服消息

func NewCustom

func NewCustom(context *context.Context) *Custom

func (*Custom) Send

func (tpl *Custom) Send(msg *Message) (result define.CommonError, err error)

type MeesageMiniprogrampage

type MeesageMiniprogrampage struct {
	Title        string `json:"title"`
	AppID        string `json:"appid"`
	PagePath     string `json:"pagepath"`
	ThumbMediaID string `json:"thumb_media_id"`
}

type Message

type Message struct {
	Touser          string                  `json:"touser"`
	Msgtype         string                  `json:"msgtype"`
	Customservice   *MessageCustomservice   `json:"customservice,omitempty"`
	Text            *MessageText            `json:"text,omitempty"`
	Image           *MessageImage           `json:"image,omitempty"`
	News            *MessageNews            `json:"news,omitempty"`
	Msgmenu         *MessageMsgmenus        `json:"msgmenu,omitempty"`
	Miniprogrampage *MeesageMiniprogrampage `json:"miniprogrampage,omitempty"`
}

type MessageArticle

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

type MessageCustomservice

type MessageCustomservice struct {
	KfAccount string `json:"kf_account"`
}

type MessageImage

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

type MessageMsgmenu

type MessageMsgmenu struct {
	ID      string `json:"id"`
	Content string `json:"content"`
}

type MessageMsgmenus

type MessageMsgmenus struct {
	HeadContent string           `json:"head_content"`
	List        []MessageMsgmenu `json:"list"`
	TailContent string           `json:"tail_content"`
}

type MessageNews

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

type MessageText

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

Jump to

Keyboard shortcuts

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