Documentation
¶
Index ¶
- func AddContact(handler *xmpp.XMPPHandler, jid string) error
- func CreateUser(domain, port, username, password string) error
- func JoinGroupChat(handler *xmpp.XMPPHandler, roomJID, nickname string) error
- func Login(domain, port, username, password string) (*xmpp.XMPPHandler, error)
- func Logout(handler *xmpp.XMPPHandler) error
- func ReceiveMessages(handler *xmpp.XMPPHandler) (string, error)
- func RemoveAccount(handler *xmpp.XMPPHandler) error
- func SendFile(handler *xmpp.XMPPHandler, to, filePath string) error
- func SendMessage(handler *xmpp.XMPPHandler, to, message string) error
- func SendNotification(handler *xmpp.XMPPHandler, to, notification string) error
- type Contact
- type ContactDetails
- type IQ
- type RosterItem
- type RosterQuery
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddContact ¶
func AddContact(handler *xmpp.XMPPHandler, jid string) error
AddContact adds a new contact to the user's roster.
func CreateUser ¶
CreateUser creates a new account on the XMPP server.
func JoinGroupChat ¶
func JoinGroupChat(handler *xmpp.XMPPHandler, roomJID, nickname string) error
JoinGroupChat allows the user to join a multi-user chat room.
func Login ¶
func Login(domain, port, username, password string) (*xmpp.XMPPHandler, error)
Login authenticates a user and returns an XMPPHandler.
func Logout ¶
func Logout(handler *xmpp.XMPPHandler) error
Logout closes the XMPP connection gracefully.
func ReceiveMessages ¶
func ReceiveMessages(handler *xmpp.XMPPHandler) (string, error)
ReceiveMessages handles incoming messages and stanzas.
func RemoveAccount ¶
func RemoveAccount(handler *xmpp.XMPPHandler) error
RemoveAccount removes a user account from the XMPP server.
func SendFile ¶
func SendFile(handler *xmpp.XMPPHandler, to, filePath string) error
SendFile sends a file to a specific contact.
func SendMessage ¶
func SendMessage(handler *xmpp.XMPPHandler, to, message string) error
SendMessage sends a one-to-one message to a specific user.
func SendNotification ¶
func SendNotification(handler *xmpp.XMPPHandler, to, notification string) error
SendNotification sends a notification to a user or group.
Types ¶
type Contact ¶
func CheckContacts ¶
func CheckContacts(handler *xmpp.XMPPHandler, contacts []Contact) []Contact
func GetContacts ¶
func GetContacts(handler *xmpp.XMPPHandler) ([]Contact, error)
GetContacts retrieves the user's roster (contact list).
type ContactDetails ¶
func GetContactDetails ¶
func GetContactDetails(handler *xmpp.XMPPHandler, contactJID string) (ContactDetails, error)
GetContactDetails retrieves details about a specific contact.
type RosterItem ¶
type RosterQuery ¶
type RosterQuery struct {
XMLName xml.Name `xml:"query"`
Items []RosterItem `xml:"item"`
}