customer

package
v1.8.101 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: Zlib Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SendWithBytes

func SendWithBytes(api *token.Api, buf []byte) error

Types

type Content

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

type CustomService

type CustomService struct {
	Account string `json:"kf_account"`
}

type Customer

type Customer interface {
	SetToUser(toUser string)
	SetCustom(custom *CustomService)
}
type Head struct {
	ToUser string         `json:"touser"`
	Type   string         `json:"msgtype"`
	Custom *CustomService `json:"customservice,omitempty"`
}

func (*Head) SetCustom

func (h *Head) SetCustom(custom *CustomService)

func (*Head) SetToUser

func (h *Head) SetToUser(user string)

customer.Customer interface

type Image

type Image struct {
	MediaId string `json:"media_id"`
}

type ImageMsg

type ImageMsg struct {
	Head
	Image Image `json:"image"`
}

图片消息

func NewImageMsg

func NewImageMsg(to string, mediaId string) *ImageMsg
type Link struct {
	Title  string `json:"title"`
	Picurl string `json:"thumb_url"`
	Desc   string `json:"description"`
	Url    string `json:"url"`
}

type LinkMsg

type LinkMsg struct {
	Head
	Link Link `json:"link"`
}

{ "touser": "OPENID", "msgtype": "link", "link": { "title": "Happy Day", "description": "Is Really A Happy Day", "url": "URL", "thumb_url": "THUMB_URL" }

type Music

type Music struct {
	Title      string `json:"title"`
	Desc       string `json:"description"`
	MusicUrl   string `json:"musicurl"`
	HQMusicUrl string `json:"hqmusicurl"`
	MediaId    string `json:"thumb_media_id,omitempty"`
}

type MusicMsg

type MusicMsg struct {
	Head
	Music Music `json:"music"`
}

type Program

type Program struct {
	Title   string `json:"title"`                    //"title": "消息标题",
	AppId   string `json:"appid"`                    //"appid": "wx8bd80126147df384",
	Page    string `json:"pagepath"`                 //"page": "/path/index"
	MediaId string `json:"thumb_media_id,omitempty"` //"thumb_media_id": "MEDIA_ID",
}

type ProgramMsg

type ProgramMsg struct {
	Head
	Mp Program `json:"miniprogrampage"`
}

{ "touser":"OPENID", "msgtype":"miniprogrampage", "miniprogrampage": { "title":"title", "pagepath":"pagepath", "thumb_media_id":"thumb_media_id" } }

type TextMsg

type TextMsg struct {
	Head
	Text Content `json:"text"`
}

文本消息 { "touser": "openid", "msgtype": "text", "text": { "content": "Holiday Request For Pony(http://xxxxx)" }, }

func NewTextMsg

func NewTextMsg(to string, content string) *TextMsg

type Typing

type Typing struct {
	ToUser  string         `json:"touser"`
	Command string         `json:"command"` //"Typing","CancelTyping"
	Custom  *CustomService `json:"customservice,omitempty"`
}

type Video

type Video struct {
	MediaId  string `json:"media_id"`
	Title    string `json:"title"`
	Desc     string `json:"description"`
	ThumbMId string `json:"thumb_media_id,omitempty"`
}

type VideoMsg

type VideoMsg struct {
	Head
	Video Video `json:"video"`
}

视频消息

func NewVideoMsg

func NewVideoMsg(to string, video Video) *VideoMsg

type Voice

type Voice struct {
	MediaId string `json:"media_id"`
}

type VoiceMsg

type VoiceMsg struct {
	Head
	Voice Voice `json:"voice"`
}

语音消息

func NewVoiceMsg

func NewVoiceMsg(to string, mediaId string) *VoiceMsg

Jump to

Keyboard shortcuts

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