info

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: BSD-2-Clause Imports: 3 Imported by: 2

Documentation

Overview

Package info contains service discovery features.

These were separated out into a separate package to prevent import loops.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Feature

type Feature struct {
	XMLName xml.Name `xml:"http://jabber.org/protocol/disco#info feature"`
	Var     string   `xml:"var,attr"`
}

Feature represents a feature supported by an entity on the network.

func (Feature) MarshalXML

func (f Feature) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML implements xml.Marshaler.

func (Feature) TokenReader

func (f Feature) TokenReader() xml.TokenReader

TokenReader implements xmlstream.Marshaler.

func (Feature) WriteXML

func (f Feature) WriteXML(w xmlstream.TokenWriter) (int, error)

WriteXML implements xmlstream.WriterTo.

type FeatureIter

type FeatureIter interface {
	ForFeatures(node string, f func(Feature) error) error
}

FeatureIter is the interface implemented by types that implement disco features.

type Identity

type Identity struct {
	XMLName  xml.Name `xml:"http://jabber.org/protocol/disco#info identity"`
	Category string   `xml:"category,attr"`
	Type     string   `xml:"type,attr"`
	Name     string   `xml:"name,attr,omitempty"`
	Lang     string   `xml:"http://www.w3.org/XML/1998/namespace lang,attr,omitempty"`
}

Identity is the type and category of a node on the network. Normally one of the pre-defined Identity types should be used.

func (Identity) MarshalXML

func (i Identity) MarshalXML(e *xml.Encoder, _ xml.StartElement) error

MarshalXML implements xml.Marshaler.

func (Identity) TokenReader

func (i Identity) TokenReader() xml.TokenReader

TokenReader implements xmlstream.Marshaler.

func (Identity) WriteXML

func (i Identity) WriteXML(w xmlstream.TokenWriter) (int, error)

WriteXML implements xmlstream.WriterTo.

type IdentityIter

type IdentityIter interface {
	ForIdentities(node string, f func(Identity) error) error
}

IdentityIter is the interface implemented by types that implement disco identities.

Jump to

Keyboard shortcuts

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