openfire

package
Version: v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Id

func Id(from string) string

生成ID

func Plain

func Plain(uid string, password string) string

生成鉴权

func Resource

func Resource(pieces []string) string

生成来源

func Type

func Type(types string) string

消息类型

Types

type AuthMessageXML

type AuthMessageXML struct {
	XMLName   xml.Name `xml:"auth"`
	Text      string   `xml:",chardata"`
	Xmlns     string   `xml:"xmlns,attr"`
	Mechanism string   `xml:"mechanism,attr"`
}

鉴权消息

type BindContentMessageXML

type BindContentMessageXML struct {
	Text     string `xml:",chardata"`
	Xmlns    string `xml:"xmlns,attr"`
	Resource string `xml:"resource"`
}

绑定内容

type BindMessageXML

type BindMessageXML struct {
	XMLName xml.Name              `xml:"iq"`
	Text    string                `xml:",chardata"`
	Type    string                `xml:"type,attr"`
	ID      string                `xml:"id,attr"`
	Xmlns   string                `xml:"xmlns,attr"`
	Bind    BindContentMessageXML `xml:"bind"`
}

绑定消息

type CloseXML

type CloseXML struct {
	XMLName xml.Name `xml:"close"`
}

关闭对话

type H

type H map[string]interface{}

type HandShakeXML

type HandShakeXML struct {
	XMLName xml.Name `xml:"open"`
	Text    string   `xml:",chardata"`
	Xmlns   string   `xml:"xmlns,attr"`
	To      string   `xml:"to,attr"`
	Version string   `xml:"version,attr"`
}

握手消息

type HeartbeatXML

type HeartbeatXML struct {
	XMLName xml.Name `xml:"presence"`
	Text    string   `xml:",chardata"`
	Xmlns   string   `xml:"xmlns,attr"`
}

心跳消息

type JoinMessageJSON

type JoinMessageJSON struct {
	Type     int    `json:"type"`
	RoomId   int    `json:"roomid"`
	UID      int    `json:"uid"`
	Avatar   string `json:"avatar"`
	Nickname string `json:"nickname"`
}

加入消息

type JoinMessageXML

type JoinMessageXML struct {
	XMLName xml.Name       `xml:"iq"`
	Text    string         `xml:",chardata"`
	Type    string         `xml:"type,attr"`
	Xmlns   string         `xml:"xmlns,attr"`
	Request JoinRequestXML `xml:"request"`
}

加入消息

type JoinRequestXML

type JoinRequestXML struct {
	Text  string `xml:",cdata"`
	Xmlns string `xml:"xmlns,attr"`
}

加入请求

type MessageJSON

type MessageJSON struct {
	Type      int64    `json:"type"`
	RoomID    int64    `json:"roomId"`
	UID       int64    `json:"uid"`
	Nickname  string   `json:"nickname"`
	Templates []string `json:"templates"`
	Session   string   `json:"sessionCreateDate"`
}

消息JSON

type MessageXML

type MessageXML struct {
	XMLName xml.Name `xml:"message"`
	Xmlns   string   `xml:"xmlns,attr"`
	From    string   `xml:"from,attr"`
	Type    string   `xml:"type,attr"`
	To      string   `xml:"to,attr"`
	Body    string   `xml:"body"`
}

消息结构

type SessionAttrXML

type SessionAttrXML struct {
	Text  string `xml:",chardata"`
	Xmlns string `xml:"xmlns,attr"`
}

状态内容

type SessionMessageXML

type SessionMessageXML struct {
	XMLName xml.Name       `xml:"iq"`
	Text    string         `xml:",chardata"`
	Type    string         `xml:"type,attr"`
	ID      string         `xml:"id,attr"`
	Xmlns   string         `xml:"xmlns,attr"`
	Session SessionAttrXML `xml:"session"`
}

状态消息

Jump to

Keyboard shortcuts

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