messages

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 4 Imported by: 0

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 Message

type Message struct {
	contract.MessageInterface

	*object.Attribute

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

	ToXmlArray func() *object.HashMap
}

func NewMessage

func NewMessage(attributes *object.HashMap) *Message

func (*Message) GetType

func (msg *Message) GetType() string

func (*Message) PropertiesToArray

func (msg *Message) PropertiesToArray(data *object.HashMap, aliases *object.HashMap) (*object.HashMap, error)

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 News

type News struct {
	*Message
}

func NewNews

func NewNews(items *object.HashMap) *News

func (*News) OverrideToXmlArray

func (msg *News) OverrideToXmlArray()

Override ToXmlArray

func (*News) PropertiesToArray

func (msg *News) PropertiesToArray(data power.HashMap, aliases power.HashMap) *power.HashMap

type NewsItem

type NewsItem struct {
	*Message
}

func NewNewsItems

func NewNewsItems(content string) *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 *power.HashMap, withType bool) (data *power.HashMap)

type Text

type Text struct {
	*Message
}

func NewText

func NewText(content string) *Text

func (*Text) OverrideToXmlArray

func (msg *Text) OverrideToXmlArray()

Override ToXmlArray

Jump to

Keyboard shortcuts

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