rostermodel

package
v0.3.5 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubscriptionNone   = "none"
	SubscriptionFrom   = "from"
	SubscriptionTo     = "to"
	SubscriptionBoth   = "both"
	SubscriptionRemove = "remove"
)

roster item subscription values

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Username     string
	JID          string
	Name         string
	Subscription string
	Ask          bool
	Ver          int
	Groups       []string
}

Item represents a roster item storage entity.

func NewItem

func NewItem(elem xmpp.XElement) (*Item, error)

NewItem parses an XML element returning a derived roster item instance.

func (*Item) ContactJID

func (ri *Item) ContactJID() *jid.JID

ContactJID parses and returns roster item contact JID.

func (*Item) Element

func (ri *Item) Element() xmpp.XElement

Element returns a roster item XML element representation.

func (*Item) FromGob

func (ri *Item) FromGob(dec *gob.Decoder)

FromGob deserializes a RosterItem entity from it's gob binary representation.

func (*Item) ToGob

func (ri *Item) ToGob(enc *gob.Encoder)

ToGob converts a RosterItem entity to it's gob binary representation.

type Notification

type Notification struct {
	Contact  string
	JID      string
	Presence *xmpp.Presence
}

Notification represents a roster subscription pending notification.

func (*Notification) FromGob

func (rn *Notification) FromGob(dec *gob.Decoder)

FromGob deserializes a Notification entity from it's gob binary representation.

func (*Notification) ToGob

func (rn *Notification) ToGob(enc *gob.Encoder)

ToGob converts a Notification entity to it's gob binary representation.

type Version

type Version struct {
	Ver         int
	DeletionVer int
}

Version represents a roster version info.

func (*Version) FromGob

func (rv *Version) FromGob(dec *gob.Decoder)

FromGob deserializes a Version entity from it's gob binary representation.

func (*Version) ToGob

func (rv *Version) ToGob(enc *gob.Encoder)

ToGob converts a Version entity to it's gob binary representation.

Jump to

Keyboard shortcuts

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