disco

package
v0.0.0-...-6e7897a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Disco

type Disco struct {
	InfoRequestHandler
	ItemsRequestHandler
	// contains filtered or unexported fields
}

func (*Disco) HandleIQ

func (r *Disco) HandleIQ(iq *xmpp.IQ)

func (*Disco) HandleStanza

func (r *Disco) HandleStanza(s xmpp.Stanza)

func (*Disco) Offline

func (r *Disco) Offline(error)

func (*Disco) Online

func (r *Disco) Online(s xmppc.Session)

func (*Disco) RequestInfo

func (disco *Disco) RequestInfo(jid xmpp.JID, handler func(*Info)) error

func (*Disco) RequestItems

func (disco *Disco) RequestItems(jid xmpp.JID, handler func(*Items)) error

type Identity

type Identity struct {
	Category string
	Type     string
	Name     string
	Lang     string
}

Identity stores identity information found in disco#info

type Info

type Info struct {
	JID        string
	Features   []string
	Identities []Identity
}

Info stores disco#info content

func (*Info) AddFeature

func (i *Info) AddFeature(f string)

AddFeature adds an item to the features list

func (*Info) AddIdentity

func (i *Info) AddIdentity(id Identity)

AddIdentity adds an item to the identities list

type InfoRequest

type InfoRequest struct {
	// contains filtered or unexported fields
}

func (*InfoRequest) JID

func (r *InfoRequest) JID() xmpp.JID

func (*InfoRequest) Respond

func (r *InfoRequest) Respond(info *Info)

type InfoRequestHandler

type InfoRequestHandler func(*InfoRequest)

type Item

type Item struct {
	JID  xmpp.JID
	Node string
	Name string
}

type Items

type Items struct {
	Node  string
	Items []Item
}

func (*Items) Add

func (i *Items) Add(item Item)

Add adds an item to the item list

type ItemsRequest

type ItemsRequest struct {
	Node string
	// contains filtered or unexported fields
}

func (*ItemsRequest) JID

func (r *ItemsRequest) JID() xmpp.JID

func (*ItemsRequest) Respond

func (r *ItemsRequest) Respond(items *Items)

type ItemsRequestHandler

type ItemsRequestHandler func(*ItemsRequest)

Jump to

Keyboard shortcuts

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