massbygroup

package
v0.0.0-...-f5adc6c Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2014 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

定义根据分组群发消息的消息数据结构

Index

Constants

View Source
const (
	MSG_TYPE_TEXT  = "text"
	MSG_TYPE_IMAGE = "image"
	MSG_TYPE_VOICE = "voice"
	MSG_TYPE_VIDEO = "mpvideo"
	MSG_TYPE_NEWS  = "mpnews"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonHead

type CommonHead struct {
	Filter struct {
		GroupId int64 `json:"group_id,string"`
	} `json:"filter"`
	MsgType string `json:"msgtype"`
}

type Image

type Image struct {
	CommonHead

	Image struct {
		MediaId string `json:"media_id"` // mediaId 通过上传多媒体文件得到
	} `json:"image"`
}

图片消息

func NewImage

func NewImage(groupId int64, mediaId string) *Image

新建图片消息

mediaId 通过上传多媒体文件得到

type News

type News struct {
	CommonHead

	News struct {
		MediaId string `json:"media_id"` // NOTE: mediaId 应该通过 Client.MediaCreateNews 得到
	} `json:"mpnews"`
}

图文消息

func NewNews

func NewNews(groupId int64, mediaId string) *News

新建图文消息

NOTE: mediaId 应该通过 Client.MediaCreateNews 得到

type Text

type Text struct {
	CommonHead

	Text struct {
		Content string `json:"content"`
	} `json:"text"`
}

文本消息

func NewText

func NewText(groupId int64, content string) *Text

新建文本消息

type Video

type Video struct {
	CommonHead

	Video struct {
		MediaId string `json:"media_id"` // NOTE: mediaId 应该通过 Client.MediaCreateVideo 得到
	} `json:"mpvideo"`
}

视频消息

func NewVideo

func NewVideo(groupId int64, mediaId string) *Video

新建视频消息

NOTE: mediaId 应该通过 Client.MediaCreateVideo 得到

type Voice

type Voice struct {
	CommonHead

	Voice struct {
		MediaId string `json:"media_id"` // mediaId 通过上传多媒体文件得到
	} `json:"voice"`
}

语音消息

func NewVoice

func NewVoice(groupId int64, mediaId string) *Voice

新建语音消息

mediaId 通过上传多媒体文件得到

Jump to

Keyboard shortcuts

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