messages

package
v3.2.20 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 5 Imported by: 11

Documentation

Index

Constants

View Source
const DEVICE_EVENT = 256
View Source
const DEVICE_TEXT = 512
View Source
const EVENT = 1048576
View Source
const FILE = 1024
View Source
const IMAGE = 4
View Source
const LINK = 128
View Source
const LOCATION = 64
View Source
const MINIPROGRAM_NOTICE = 4194304
View Source
const MINIPROGRAM_PAGE = 2097152
View Source
const SHORT_VIDEO = 32
View Source
const TEXT = 2
View Source
const TEXT_CARD = 2048
View Source
const TRANSFER = 4096
View Source
const VIDEO = 16
View Source
const VOICE = 8
View Source
const VOID = 0

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	*Message
}

func NewArticle

func NewArticle(items *power.HashMap) *Article

type Card

type Card struct {
	*Message
}

func NewCard

func NewCard(cardID string) *Card

type DeviceEvent

type DeviceEvent struct {
	*Message
}

func NewDeviceEvent

func NewDeviceEvent(items *power.HashMap) *DeviceEvent

type DeviceText

type DeviceText struct {
	*Message
}

func NewDeviceText

func NewDeviceText(items *power.HashMap) *DeviceText

func (*DeviceText) OverrideToXmlArray

func (msg *DeviceText) OverrideToXmlArray()

Override ToXmlArray

type File

type File struct {
	*Media
}

func NewFile

func NewFile(mediaID string, items *power.HashMap) *File

type Image

type Image struct {
	*Media
}

func NewImage

func NewImage(mediaID string, items *power.HashMap) *Image

type InteractiveTaskCard

type InteractiveTaskCard struct {
	*Message
}

func NewInteractiveTaskCard

func NewInteractiveTaskCard(items *power.HashMap) *InteractiveTaskCard
type Link struct {
	*Message
}
func NewLink(items *power.HashMap) *Link

type Location

type Location struct {
	*Message
}

func NewLocation

func NewLocation(items *power.HashMap) *Location

type Media

type Media struct {
	*Message
}

func NewMedia

func NewMedia(mediaID string, sType string, items *power.HashMap) *Media

func (*Media) GetMediaID

func (msg *Media) GetMediaID() string

func (*Media) OverrideToXmlArray

func (msg *Media) OverrideToXmlArray()

Override ToXmlArray

type Message

type Message struct {
	contract.MessageInterface

	*object.Attribute

	Type        string
	ID          int
	To          string
	From        string
	Properties  []string
	JsonAliases *object.HashMap

	PropertiesToArray func(data *object.HashMap, aliases *object.HashMap) (*object.HashMap, error)
	ToXmlArray        func() *object.HashMap
}

func NewMessage

func NewMessage(attributes *power.HashMap) *Message

func (*Message) GetType

func (msg *Message) GetType() string

func (*Message) SetType

func (msg *Message) SetType(strType string)

func (*Message) TransformForJsonRequest

func (msg *Message) TransformForJsonRequest(appends *object.HashMap, withType bool) (*object.HashMap, error)

func (*Message) TransformForJsonRequestWithoutType

func (msg *Message) TransformForJsonRequestWithoutType(appends *object.HashMap) (*object.HashMap, error)

func (*Message) TransformToXml

func (msg *Message) TransformToXml(appends *object.HashMap, returnAsArray bool) (interface{}, error)

return string or hashmap

type MiniProgramNotice

type MiniProgramNotice struct {
	*Message
}

func NewMiniProgramNotice

func NewMiniProgramNotice(items *power.HashMap) *MiniProgramNotice

type MiniProgramPage

type MiniProgramPage struct {
	*Message
}

func NewMiniProgramPage

func NewMiniProgramPage(items *power.HashMap) *MiniProgramPage

type MsgMenu added in v3.0.25

type MsgMenu struct {
	*Message
}

func NewMsgMenu added in v3.0.25

func NewMsgMenu(items *power.HashMap) *MsgMenu

func (*MsgMenu) OverrideToXmlArray added in v3.0.25

func (msg *MsgMenu) OverrideToXmlArray()

Override ToXmlArray

type Music

type Music struct {
	*Message
}

func NewMusic

func NewMusic(items *power.HashMap) *Music

func (*Music) OverrideToXmlArray

func (msg *Music) OverrideToXmlArray()

Override ToXmlArray

type News

type News struct {
	*Message
}

func NewNews

func NewNews(items []*object.HashMap) *News

func (*News) OverridePropertiesToArray added in v3.0.40

func (msg *News) OverridePropertiesToArray()

func (*News) OverrideToXmlArray

func (msg *News) OverrideToXmlArray()

Override ToXmlArray

type NewsArticle added in v3.0.25

type NewsArticle struct {
	*Message
}

func NewNewsArticle added in v3.0.25

func NewNewsArticle(items *power.HashMap) *NewsArticle

type NewsItem

type NewsItem struct {
	*Message
}

func NewNewsItem added in v3.0.30

func NewNewsItem(data *object.HashMap) *NewsItem

func (*NewsItem) OverrideToXmlArray

func (msg *NewsItem) OverrideToXmlArray()

Override ToXmlArray

func (*NewsItem) ToJsonArray

func (msg *NewsItem) ToJsonArray() *object.HashMap

type Raw

type Raw struct {
	*Message
}

func NewRaw

func NewRaw(content string) *Raw

func (*Raw) TransformForJsonRequest

func (msg *Raw) TransformForJsonRequest(appends *object.HashMap, withType bool) (data *object.HashMap, err error)

type ReplyInteractiveTaskCard

type ReplyInteractiveTaskCard struct {
	*Message
}

func NewReplyInteractiveTaskCard

func NewReplyInteractiveTaskCard(replaceName string) *ReplyInteractiveTaskCard

func (*ReplyInteractiveTaskCard) OverrideToXmlArray

func (msg *ReplyInteractiveTaskCard) OverrideToXmlArray()

Override ToXmlArray

type ShortVideo

type ShortVideo struct {
	*Video
}

func NewShortVideo

func NewShortVideo(mediaID string, items *power.HashMap) *ShortVideo

type TaskCard

type TaskCard struct {
	*Message
}

func NewTaskCard

func NewTaskCard(items *power.HashMap) *TaskCard

type Text

type Text struct {
	*Message
}

func NewText

func NewText(content string) *Text

func (*Text) OverrideToXmlArray

func (msg *Text) OverrideToXmlArray()

Override ToXmlArray

type TextCard

type TextCard struct {
	*Message
}

func NewTextCard

func NewTextCard(items *power.HashMap) *TextCard

type Transfer

type Transfer struct {
	*Message
}

func NewTransfer

func NewTransfer(account string) *Transfer

func (*Transfer) OverrideToXmlArray

func (msg *Transfer) OverrideToXmlArray()

Override ToXmlArray

type Video

type Video struct {
	*Media
}

func NewVideo

func NewVideo(mediaID string, item *power.HashMap) *Video

func (*Video) OverrideToXmlArray

func (msg *Video) OverrideToXmlArray()

Override ToXmlArray

type Voice

type Voice struct {
	*Media
}

func NewVoice

func NewVoice(mediaID string, item *power.HashMap) *Voice

Jump to

Keyboard shortcuts

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