appmessage

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppMsg

type AppMsg struct {
	*context.Context
	// contains filtered or unexported fields
}

AppMsg 群发消息

func NewAppMsg

func NewAppMsg(ctx *context.Context) *AppMsg

NewAppMsg new

func (*AppMsg) SendNews

func (appmsg *AppMsg) SendNews(user *User, mediaID string, ignoreReprint bool) (*Result, error)

SendNews 发送图文

func (*AppMsg) SendText

func (appmsg *AppMsg) SendText(user *User, content string) (*Result, error)

SendText 群发文本 user 为nil,表示全员发送 &User{TagID:2} 根据tag发送 &User{OpenID:[]string("xxx","xxx")} 根据openid发送

type MsgType

type MsgType string

MsgType 发送消息类型

const (
	// MsgTypeNews 图文消息
	MsgTypeNews MsgType = "mpnews"
	// MsgTypeText 文本
	MsgTypeText MsgType = "text"
)

type Result

type Result struct {
	util.CommonError
	MsgID     int64  `json:"msg_id"`
	MsgDataID int64  `json:"msg_data_id"`
	MsgStatus string `json:"msg_status"`
}

Result 群发返回结果

type User

type User struct {
	PartyID []string
	TagID   []string
	UserID  []string
}

User 发送的用户

Jump to

Keyboard shortcuts

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