Documentation
¶
Overview ¶
Package xmpp provides a comprehensive, production-grade XMPP library for Go.
It supports both client and server roles, is fully extensible via a plugin architecture, and aims to cover every modern XMPP feature including OMEMO encryption, MUC, PubSub, Jingle, and more.
The library is organized into several layers:
- Core: JID parsing, XML streaming, stanza types, transport abstractions
- Session: Stream negotiation, SASL, TLS, resource binding, stanza routing
- Client/Server: High-level APIs for building XMPP clients and servers
- Plugin System: Extensible architecture for XEP implementations
- Plugins: Ready-to-use implementations of 50+ XEPs
- Storage: Pluggable backends (Memory, File, SQLite, PostgreSQL, MySQL, MongoDB, Redis)
Basic client usage:
client, err := xmpp.NewClient(
jid.MustParse("user@example.com"),
"password",
xmpp.WithPlugins(
disco.New(),
roster.New(),
carbons.New(),
),
)
if err != nil {
log.Fatal(err)
}
defer client.Close()
if err := client.Connect(context.Background()); err != nil {
log.Fatal(err)
}
Index ¶
- Constants
- func ErrBadRequest(text string) *stanza.StanzaError
- func ErrConflict(text string) *stanza.StanzaError
- func ErrFeatureNotImplemented(text string) *stanza.StanzaError
- func ErrForbidden(text string) *stanza.StanzaError
- func ErrInternalServerError(text string) *stanza.StanzaError
- func ErrItemNotFound(text string) *stanza.StanzaError
- func ErrNotAllowed(text string) *stanza.StanzaError
- func ErrNotAuthorized(text string) *stanza.StanzaError
- func ErrRecipientUnavailable(text string) *stanza.StanzaError
- func ErrServiceUnavailable(text string) *stanza.StanzaError
- type AuthError
- type AuthFunc
- type BindRequest
- type BindResult
- type CertIdentityFunc
- type Client
- func (c *Client) Close() error
- func (c *Client) Connect(ctx context.Context) error
- func (c *Client) Done() <-chan error
- func (c *Client) JID() jid.JID
- func (c *Client) Plugin(name string) (plugin.Plugin, bool)
- func (c *Client) Resume(ctx context.Context) error
- func (c *Client) Send(ctx context.Context, st stanza.Stanza) error
- func (c *Client) SendIQ(ctx context.Context, iq *stanza.IQ) (*stanza.IQ, error)
- func (c *Client) Session() *Session
- type ClientOption
- func WithBOSH(url string) ClientOption
- func WithClientDialer(d *dial.Dialer) ClientOption
- func WithClientTLS(config *tls.Config) ClientOption
- func WithConnectAddr(addr string) ClientOption
- func WithDirectTLS() ClientOption
- func WithHandler(h Handler) ClientOption
- func WithInsecureSASL() ClientOption
- func WithLang(lang string) ClientOption
- func WithNoTLS() ClientOption
- func WithPlugins(plugins ...plugin.Plugin) ClientOption
- func WithResource(resource string) ClientOption
- func WithSASLMechanisms(mechanisms ...string) ClientOption
- func WithWebSocket(url string) ClientOption
- func WithoutStreamManagement() ClientOption
- func WithoutStreamResumption() ClientOption
- type Component
- type ComponentOption
- type Handler
- type HandlerFunc
- type Middleware
- type Mux
- func (m *Mux) Handle(name xml.Name, stanzaType string, handler Handler)
- func (m *Mux) HandleFunc(name xml.Name, stanzaType string, f HandlerFunc)
- func (m *Mux) HandleStanza(ctx context.Context, session *Session, st stanza.Stanza) error
- func (m *Mux) SetFallback(h Handler)
- func (m *Mux) Use(mw ...Middleware)
- type MuxOption
- type Negotiator
- type S2SResolver
- type Server
- func (s *Server) Addr() net.Addr
- func (s *Server) BOSHHandler() http.Handler
- func (s *Server) Close() error
- func (s *Server) Domain() string
- func (s *Server) ListenAndServe(ctx context.Context) error
- func (s *Server) Plugin(name string) (plugin.Plugin, bool)
- func (s *Server) SessionCount() int
- func (s *Server) WebSocketHandler() http.Handler
- type ServerOption
- func WithServerAddr(addr string) ServerOption
- func WithServerAnonymous() ServerOption
- func WithServerAuth(f AuthFunc) ServerOption
- func WithServerClientCertAuth(caPool *x509.CertPool, identity CertIdentityFunc) ServerOption
- func WithServerPluginFactory(factory func() []plugin.Plugin) ServerOption
- func WithServerPlugins(plugins ...plugin.Plugin) ServerOption
- func WithServerResumeTimeout(d time.Duration) ServerOption
- func WithServerS2S(secret string, resolver S2SResolver) ServerOption
- func WithServerSessionHandler(f SessionHandlerFunc) ServerOption
- func WithServerStorage(s storage.Storage) ServerOption
- func WithServerTLS(cert, key string) ServerOption
- func WithServerTLSConfig(cfg *tls.Config) ServerOption
- type Session
- func (s *Session) Close() error
- func (s *Session) EnableSM()
- func (s *Session) Framing() bool
- func (s *Session) LocalAddr() jid.JID
- func (s *Session) Mux() *Mux
- func (s *Session) Reader() *xmppxml.StreamReader
- func (s *Session) RemoteAddr() jid.JID
- func (s *Session) RequestSMAck(ctx context.Context) (uint32, error)
- func (s *Session) Restart()
- func (s *Session) SASLMechanism() string
- func (s *Session) SMEnabled() bool
- func (s *Session) SMHandled() uint32
- func (s *Session) SMPrevID() string
- func (s *Session) SMResumable() bool
- func (s *Session) Send(ctx context.Context, st stanza.Stanza) error
- func (s *Session) SendElement(ctx context.Context, v any) error
- func (s *Session) SendRaw(ctx context.Context, r io.Reader) error
- func (s *Session) Serve(handler Handler) error
- func (s *Session) SetFraming(v bool)
- func (s *Session) SetLocalAddr(j jid.JID)
- func (s *Session) SetRemoteAddr(j jid.JID)
- func (s *Session) SetSASLMechanism(name string)
- func (s *Session) SetSMResume(previd string, max int)
- func (s *Session) SetState(state SessionState)
- func (s *Session) State() SessionState
- func (s *Session) Transport() transport.Transport
- func (s *Session) Writer() *xmppxml.StreamWriter
- type SessionHandlerFunc
- type SessionOption
- type SessionState
- type StreamError
- type StreamFeature
Constants ¶
const LibraryVersion = "0.1.0"
LibraryVersion is reported by the server in XEP-0092 Software Version replies.
Variables ¶
This section is empty.
Functions ¶
func ErrBadRequest ¶
func ErrBadRequest(text string) *stanza.StanzaError
func ErrConflict ¶
func ErrConflict(text string) *stanza.StanzaError
func ErrFeatureNotImplemented ¶
func ErrFeatureNotImplemented(text string) *stanza.StanzaError
func ErrForbidden ¶
func ErrForbidden(text string) *stanza.StanzaError
func ErrInternalServerError ¶
func ErrInternalServerError(text string) *stanza.StanzaError
func ErrItemNotFound ¶
func ErrItemNotFound(text string) *stanza.StanzaError
func ErrNotAllowed ¶
func ErrNotAllowed(text string) *stanza.StanzaError
func ErrNotAuthorized ¶
func ErrNotAuthorized(text string) *stanza.StanzaError
func ErrRecipientUnavailable ¶
func ErrRecipientUnavailable(text string) *stanza.StanzaError
func ErrServiceUnavailable ¶
func ErrServiceUnavailable(text string) *stanza.StanzaError
Types ¶
type AuthError ¶
type AuthError struct {
Condition string // SASL failure condition local name
Text string // optional human-readable description
}
AuthError is returned when SASL authentication fails. It exposes the SASL failure condition (e.g. "not-authorized") so callers can distinguish a bad password from other failures.
type BindRequest ¶
type BindRequest struct {
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"`
Resource string `xml:"resource,omitempty"`
}
BindRequest represents a resource bind request.
type BindResult ¶
type BindResult struct {
XMLName xml.Name `xml:"urn:ietf:params:xml:ns:xmpp-bind bind"`
JID string `xml:"jid"`
}
BindResult represents a resource bind result.
type CertIdentityFunc ¶
type CertIdentityFunc func(cert *x509.Certificate) (username string, ok bool)
CertIdentityFunc maps a verified client certificate to the local username the server should authenticate it as. Returning false rejects the certificate.
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a high-level XMPP client.
func (*Client) Connect ¶
Connect dials the server, performs full stream negotiation (STARTTLS, SASL authentication, and resource binding), initializes plugins, and starts the background receive loop.
It returns only once the session has reached StateReady. Authentication failures are surfaced as *AuthError; a connection that cannot be established returns the underlying dial error.
func (*Client) Done ¶
Done returns a channel that receives the receive-loop error when the session terminates (nil on a clean stream close). It is valid after Connect returns.
func (*Client) Resume ¶
Resume revives a dropped session using XEP-0198 §5 stream resumption: it dials a fresh connection, re-authenticates, and — if the previous session negotiated resumption — restores its bound resource and replays any unacknowledged stanzas rather than binding a new resource. If the server declines resumption, it transparently falls back to a fresh bind (a new resource).
Resume is used after the receive loop reports the connection dropped (see Done). It requires that the prior session had resumption enabled.
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption configures a Client.
func WithBOSH ¶
func WithBOSH(url string) ClientOption
WithBOSH connects over XMPP-over-BOSH (XEP-0124/0206) to the given HTTP(S) connection-manager endpoint (typically http(s)://host/http-bind) instead of a TCP connection.
func WithClientDialer ¶
func WithClientDialer(d *dial.Dialer) ClientOption
WithClientDialer sets a custom dialer.
func WithClientTLS ¶
func WithClientTLS(config *tls.Config) ClientOption
WithClientTLS sets the TLS configuration for the client.
func WithConnectAddr ¶
func WithConnectAddr(addr string) ClientOption
WithConnectAddr pins the TCP address (host:port) the client dials, bypassing DNS SRV resolution of the JID domain. Useful for testing and for connecting to a server that is not discoverable via SRV.
func WithHandler ¶
func WithHandler(h Handler) ClientOption
WithHandler sets the stanza handler for the client.
func WithInsecureSASL ¶
func WithInsecureSASL() ClientOption
WithInsecureSASL permits password-bearing SASL mechanisms (PLAIN) over an unencrypted connection. This is unsafe and intended only for testing against a local server; by default the client refuses to send a cleartext password without TLS.
func WithLang ¶
func WithLang(lang string) ClientOption
WithLang sets the default xml:lang advertised in the client stream header.
func WithPlugins ¶
func WithPlugins(plugins ...plugin.Plugin) ClientOption
WithPlugins registers plugins to be initialized on connect.
func WithResource ¶
func WithResource(resource string) ClientOption
WithResource requests a specific resource for the bound JID. If empty (the default) the server assigns one.
func WithSASLMechanisms ¶
func WithSASLMechanisms(mechanisms ...string) ClientOption
WithSASLMechanisms overrides the client's SASL mechanism preference order. Only mechanisms in this list are attempted, most-preferred first. Recognized names: SCRAM-SHA-512, SCRAM-SHA-256, SCRAM-SHA-1, PLAIN. When unset the client prefers SCRAM-SHA-512 > SCRAM-SHA-256 > SCRAM-SHA-1 > PLAIN.
func WithWebSocket ¶
func WithWebSocket(url string) ClientOption
WithWebSocket connects over XMPP-over-WebSocket (RFC 7395) to the given ws:// or wss:// endpoint instead of a TCP connection.
func WithoutStreamManagement ¶
func WithoutStreamManagement() ClientOption
WithoutStreamManagement disables XEP-0198 Stream Management even when the server advertises it.
func WithoutStreamResumption ¶
func WithoutStreamResumption() ClientOption
WithoutStreamResumption keeps XEP-0198 Stream Management enabled (stanza acknowledgement) but does not request resumption support, so the session cannot be revived after a dropped connection.
type Component ¶
type Component struct {
// contains filtered or unexported fields
}
Component implements the Jabber Component Protocol (XEP-0114).
func NewComponent ¶
func NewComponent(domain, secret string, opts ...ComponentOption) (*Component, error)
NewComponent creates a new XMPP component.
type ComponentOption ¶
type ComponentOption interface {
// contains filtered or unexported methods
}
ComponentOption configures a Component.
func WithComponentAddr ¶
func WithComponentAddr(addr string) ComponentOption
WithComponentAddr sets the server address to connect to.
type Handler ¶
type Handler interface {
HandleStanza(ctx context.Context, session *Session, st stanza.Stanza) error
}
Handler handles incoming XMPP stanzas.
func Chain ¶
func Chain(handler Handler, middleware ...Middleware) Handler
Chain applies a series of middleware to a handler.
type HandlerFunc ¶
HandlerFunc is an adapter to allow ordinary functions as handlers.
func (HandlerFunc) HandleStanza ¶
HandleStanza calls f(ctx, session, st).
type Middleware ¶
Middleware wraps a Handler to add cross-cutting behavior.
func RecoverMiddleware ¶
func RecoverMiddleware() Middleware
RecoverMiddleware recovers from panics in handlers.
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux is a stanza multiplexer that routes stanzas to handlers.
func (*Mux) HandleFunc ¶
func (m *Mux) HandleFunc(name xml.Name, stanzaType string, f HandlerFunc)
HandleFunc registers a handler function.
func (*Mux) HandleStanza ¶
HandleStanza routes a stanza to the appropriate handler.
A route's name is matched against the stanza element name (message, presence, iq) and, for IQ stanzas, against the IQ payload (child) element name. This lets plugins register for a payload namespace such as urn:xmpp:ping without caring that the wrapping element is <iq>.
func (*Mux) SetFallback ¶
SetFallback sets the fallback handler for unmatched stanzas.
type Negotiator ¶
type Negotiator struct {
// contains filtered or unexported fields
}
Negotiator handles XMPP stream negotiation.
func NewNegotiator ¶
func NewNegotiator(features ...StreamFeature) *Negotiator
NewNegotiator creates a new stream negotiator.
func (*Negotiator) AddFeature ¶
func (n *Negotiator) AddFeature(f StreamFeature)
AddFeature adds a stream feature to the negotiator.
func (*Negotiator) Features ¶
func (n *Negotiator) Features(state SessionState) []StreamFeature
Features returns the features available for the given session state.
type S2SResolver ¶
S2SResolver maps a remote XMPP domain to a dialable "host:port" address. It replaces DNS SRV resolution of `_xmpp-server._tcp` and is required for server-to-server federation (also handy for testing and private deployments).
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a high-level XMPP server.
func NewServer ¶
func NewServer(domain string, opts ...ServerOption) (*Server, error)
NewServer creates a new XMPP server.
func (*Server) Addr ¶
Addr returns the address the server is listening on, or nil if it is not yet listening.
func (*Server) BOSHHandler ¶
BOSHHandler returns an http.Handler implementing the server side of XMPP over BOSH (XEP-0124/0206). Mount it on an HTTP(S) endpoint (typically /http-bind):
http.Handle("/http-bind", srv.BOSHHandler())
Each BOSH session is bridged to the library's standard negotiation and routing, so SASL authentication, resource binding, presence, and message delivery all work identically to the TCP and WebSocket transports.
func (*Server) ListenAndServe ¶
ListenAndServe starts listening for XMPP connections.
func (*Server) SessionCount ¶
SessionCount returns the number of active sessions.
func (*Server) WebSocketHandler ¶
WebSocketHandler returns an http.Handler that serves XMPP-over-WebSocket (RFC 7395) client connections using the server's negotiation and routing. The server must already be initialized (via ListenAndServe or Init).
Mount it on an HTTPS endpoint (path typically /xmpp-websocket):
http.Handle("/xmpp-websocket", srv.WebSocketHandler())
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption configures a Server.
func WithServerAddr ¶
func WithServerAddr(addr string) ServerOption
WithServerAddr sets the listen address.
func WithServerAnonymous ¶
func WithServerAnonymous() ServerOption
WithServerAnonymous enables the SASL ANONYMOUS mechanism, allowing clients to authenticate without credentials; each is assigned a random JID.
func WithServerAuth ¶
func WithServerAuth(f AuthFunc) ServerOption
WithServerAuth sets the authentication handler.
func WithServerClientCertAuth ¶
func WithServerClientCertAuth(caPool *x509.CertPool, identity CertIdentityFunc) ServerOption
WithServerClientCertAuth enables SASL EXTERNAL authentication via client certificates (RFC 6120 §6, mutual TLS). The server requests a client certificate during the TLS handshake, verifies it against caPool, and — when the client selects EXTERNAL — maps the presented certificate to a local username via identity. TLS must be configured (WithServerTLS or WithServerTLSConfig) for this to take effect.
func WithServerPluginFactory ¶
func WithServerPluginFactory(factory func() []plugin.Plugin) ServerOption
WithServerPluginFactory registers a factory that produces a fresh set of plugins for each authenticated session. Each session's plugins are initialized with session-scoped send/handle hooks and receive inbound IQ dispatch (matched by payload namespace) after the built-in service handlers. Because a new instance is created per session, plugins may hold per-session state safely. The session's plugins are closed when the session ends.
func WithServerPlugins ¶
func WithServerPlugins(plugins ...plugin.Plugin) ServerOption
WithServerPlugins registers server-global plugins, initialized once when the server starts. Use these for shared services with server-wide state. They do not receive per-session inbound-stanza dispatch; for that use WithServerPluginFactory.
func WithServerResumeTimeout ¶
func WithServerResumeTimeout(d time.Duration) ServerOption
WithServerResumeTimeout sets how long a dropped but Stream-Management- resumable session is held for resumption before being torn down. The default is 120 seconds.
func WithServerS2S ¶
func WithServerS2S(secret string, resolver S2SResolver) ServerOption
WithServerS2S enables server-to-server federation using XEP-0220 Server Dialback. secret is this server's private dialback secret (used to generate and verify dialback keys for its own domain), and resolver maps remote XMPP domains to dialable addresses (replacing DNS SRV lookup of `_xmpp-server._tcp`). Stanzas addressed to non-local domains are then routed over authenticated s2s streams, and inbound s2s streams are accepted and verified via dialback.
func WithServerSessionHandler ¶
func WithServerSessionHandler(f SessionHandlerFunc) ServerOption
WithServerSessionHandler sets the handler for new sessions.
func WithServerStorage ¶
func WithServerStorage(s storage.Storage) ServerOption
WithServerStorage sets the pluggable storage backend.
func WithServerTLS ¶
func WithServerTLS(cert, key string) ServerOption
WithServerTLS sets TLS certificate and key files.
func WithServerTLSConfig ¶
func WithServerTLSConfig(cfg *tls.Config) ServerOption
WithServerTLSConfig sets an explicit *tls.Config to use for STARTTLS instead of loading a certificate/key from files. It takes precedence over WithServerTLS. Useful for in-memory certificates and advanced TLS settings (client-certificate auth, custom cipher suites).
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session represents an XMPP session (client or server).
func NewSession ¶
func NewSession(ctx context.Context, trans transport.Transport, opts ...SessionOption) (*Session, error)
NewSession creates a new XMPP session with the given transport and options.
func (*Session) EnableSM ¶
func (s *Session) EnableSM()
EnableSM marks Stream Management (XEP-0198) as active on the session.
func (*Session) Reader ¶
func (s *Session) Reader() *xmppxml.StreamReader
Reader returns the XML stream reader.
func (*Session) RemoteAddr ¶
RemoteAddr returns the remote JID.
func (*Session) RequestSMAck ¶
RequestSMAck sends an <r/> and waits for the peer's <a h='N'/>, returning the number of this session's outbound stanzas the peer reports as handled. It requires SM to be enabled.
func (*Session) Restart ¶
func (s *Session) Restart()
Restart resets the stream reader and writer over the current transport.
It must be called after a stream-altering negotiation step (STARTTLS or SASL success) so that a fresh XML stream — with a new root <stream:stream> — is parsed and written over the possibly-upgraded transport. Callers must ensure no concurrent Send/Serve is in flight; during negotiation this is guaranteed because the receive loop has not yet started.
func (*Session) SASLMechanism ¶
SASLMechanism returns the SASL mechanism that authenticated the session, or "" if unauthenticated.
func (*Session) SMHandled ¶
SMHandled returns the number of inbound stanzas handled ("h") since SM was enabled.
func (*Session) SMPrevID ¶
SMPrevID returns the resumption id, or "" if resumption is not available.
func (*Session) SMResumable ¶
SMResumable reports whether the session negotiated resumption support.
func (*Session) SendElement ¶
SendElement encodes an XML element to the stream.
func (*Session) SetFraming ¶
SetFraming selects RFC 7395 <open/> stream framing (used by WebSocket).
func (*Session) SetLocalAddr ¶
SetLocalAddr sets the local JID.
func (*Session) SetRemoteAddr ¶
SetRemoteAddr sets the remote JID.
func (*Session) SetSASLMechanism ¶
SetSASLMechanism records the SASL mechanism used to authenticate.
func (*Session) SetSMResume ¶
SetSMResume records the resumption id and negotiated timeout for the session.
func (*Session) SetState ¶
func (s *Session) SetState(state SessionState)
SetState sets session state flags.
func (*Session) State ¶
func (s *Session) State() SessionState
State returns the current session state.
func (*Session) Writer ¶
func (s *Session) Writer() *xmppxml.StreamWriter
Writer returns the XML stream writer.
type SessionHandlerFunc ¶
SessionHandlerFunc is called when a new session is established.
type SessionOption ¶
type SessionOption interface {
// contains filtered or unexported methods
}
SessionOption configures a Session.
func WithLocalAddr ¶
func WithLocalAddr(j jid.JID) SessionOption
WithLocalAddr sets the local JID for the session.
func WithRemoteAddr ¶
func WithRemoteAddr(j jid.JID) SessionOption
WithRemoteAddr sets the remote JID for the session.
func WithState ¶
func WithState(state SessionState) SessionOption
WithState sets the initial session state.
type SessionState ¶
type SessionState uint32
SessionState represents the state of an XMPP session.
const ( StateSecure SessionState = 1 << iota // TLS negotiated StateAuthenticated // SASL complete StateBound // Resource bound StateReady // Fully negotiated StateServer // Server role StateS2S // Server-to-server )
type StreamError ¶
StreamError represents an XMPP stream-level error condition.
func (*StreamError) Error ¶
func (e *StreamError) Error() string
type StreamFeature ¶
type StreamFeature struct {
// Name is the XML name of the feature element.
Name xml.Name
// Required indicates this feature must be negotiated.
Required bool
// Necessary is the state required before this feature can be negotiated.
Necessary SessionState
// Prohibited is the state that prevents this feature from being negotiated.
Prohibited SessionState
// List writes the feature advertisement to the stream.
List func(ctx context.Context, e *xmppxml.Encoder) error
// Parse reads the feature data from the stream.
Parse func(ctx context.Context, d *xmppxml.Decoder, start *xml.StartElement) (any, error)
// Negotiate performs the feature negotiation.
Negotiate func(ctx context.Context, session *Session, data any) (SessionState, error)
}
StreamFeature represents a feature that can be negotiated during stream setup.
func BindFeature ¶
func BindFeature() StreamFeature
BindFeature returns a StreamFeature for resource binding.
func SASLFeature ¶
func SASLFeature(mechanisms []string) StreamFeature
SASLFeature returns a StreamFeature for SASL authentication.
func StartTLS ¶
func StartTLS(config *tls.Config) StreamFeature
StartTLS returns a StreamFeature for STARTTLS negotiation.
Source Files
¶
- auth.go
- bind.go
- bosh_server.go
- channelbinding.go
- client.go
- client_options.go
- component.go
- doc.go
- errors.go
- features.go
- handler.go
- middleware.go
- mux.go
- negotiate.go
- negotiate_server.go
- negotiator.go
- presence.go
- router.go
- s2s.go
- server.go
- server_options.go
- server_plugins.go
- service_iq.go
- session.go
- session_options.go
- sm_server.go
- starttls.go
- streamxml.go
- websocket_server.go
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
xmppd
module
|
|
|
crypto
|
|
|
omemo
module
|
|
|
Package dial provides connection dialing with DNS SRV and host-meta resolution.
|
Package dial provides connection dialing with DNS SRV and host-meta resolution. |
|
internal
|
|
|
bosh
Package bosh implements the framing codec shared by the BOSH (XEP-0124/0206) client transport and server connection manager: it splits a continuous XMPP byte stream into discrete top-level elements and wraps/unwraps them in HTTP <body/> envelopes.
|
Package bosh implements the framing codec shared by the BOSH (XEP-0124/0206) client transport and server connection manager: it splits a continuous XMPP byte stream into discrete top-level elements and wraps/unwraps them in HTTP <body/> envelopes. |
|
ns
Package ns defines XML namespace constants used throughout the XMPP library.
|
Package ns defines XML namespace constants used throughout the XMPP library. |
|
Package jid implements XMPP JID (Jabber ID) parsing, validation, and escaping per RFC 7622 and XEP-0106.
|
Package jid implements XMPP JID (Jabber ID) parsing, validation, and escaping per RFC 7622 and XEP-0106. |
|
Package plugin defines the XMPP plugin interface and registry.
|
Package plugin defines the XMPP plugin interface and registry. |
|
plugins
|
|
|
avatar
Package avatar implements XEP-0084 User Avatar and XEP-0153 vCard-Based Avatars.
|
Package avatar implements XEP-0084 User Avatar and XEP-0153 vCard-Based Avatars. |
|
blocking
Package blocking implements XEP-0191 Blocking Command.
|
Package blocking implements XEP-0191 Blocking Command. |
|
bob
Package bob implements XEP-0231 Bits of Binary.
|
Package bob implements XEP-0231 Bits of Binary. |
|
bookmarks
Package bookmarks implements XEP-0402 PEP Native Bookmarks.
|
Package bookmarks implements XEP-0402 PEP Native Bookmarks. |
|
caps
Package caps implements XEP-0115 Entity Capabilities.
|
Package caps implements XEP-0115 Entity Capabilities. |
|
carbons
Package carbons implements XEP-0280 Message Carbons.
|
Package carbons implements XEP-0280 Message Carbons. |
|
chatmarkers
Package chatmarkers implements XEP-0333 Chat Markers.
|
Package chatmarkers implements XEP-0333 Chat Markers. |
|
chatstates
Package chatstates implements XEP-0085 Chat State Notifications.
|
Package chatstates implements XEP-0085 Chat State Notifications. |
|
commands
Package commands implements XEP-0050 Ad-Hoc Commands.
|
Package commands implements XEP-0050 Ad-Hoc Commands. |
|
correction
Package correction implements XEP-0308 Last Message Correction.
|
Package correction implements XEP-0308 Last Message Correction. |
|
csi
Package csi implements XEP-0352 Client State Indication.
|
Package csi implements XEP-0352 Client State Indication. |
|
delay
Package delay implements XEP-0203 Delayed Delivery.
|
Package delay implements XEP-0203 Delayed Delivery. |
|
dialback
Package dialback implements XEP-0220 Server Dialback and XEP-0288 Bidirectional S2S.
|
Package dialback implements XEP-0220 Server Dialback and XEP-0288 Bidirectional S2S. |
|
disco
Package disco implements XEP-0030 Service Discovery.
|
Package disco implements XEP-0030 Service Discovery. |
|
extdisco
Package extdisco implements XEP-0215 External Service Discovery.
|
Package extdisco implements XEP-0215 External Service Discovery. |
|
filetransfer
Package filetransfer implements XEP-0234 Jingle File Transfer and XEP-0446/0447/0448 Stateless File Sharing.
|
Package filetransfer implements XEP-0234 Jingle File Transfer and XEP-0446/0447/0448 Stateless File Sharing. |
|
form
Package form implements XEP-0004 Data Forms.
|
Package form implements XEP-0004 Data Forms. |
|
forward
Package forward implements XEP-0297 Stanza Forwarding.
|
Package forward implements XEP-0297 Stanza Forwarding. |
|
hash
Package hash implements XEP-0300 Cryptographic Hash Functions.
|
Package hash implements XEP-0300 Cryptographic Hash Functions. |
|
hints
Package hints implements XEP-0334 Message Processing Hints.
|
Package hints implements XEP-0334 Message Processing Hints. |
|
ibb
Package ibb implements XEP-0047 In-Band Bytestreams.
|
Package ibb implements XEP-0047 In-Band Bytestreams. |
|
jingle
Package jingle implements XEP-0166 Jingle and related extensions.
|
Package jingle implements XEP-0166 Jingle and related extensions. |
|
lastactivity
Package lastactivity implements XEP-0012 Last Activity.
|
Package lastactivity implements XEP-0012 Last Activity. |
|
mam
Package mam implements XEP-0313 Message Archive Management.
|
Package mam implements XEP-0313 Message Archive Management. |
|
mix
Package mix implements XEP-0369 MIX and related extensions (XEP-0403/0405/0406/0407).
|
Package mix implements XEP-0369 MIX and related extensions (XEP-0403/0405/0406/0407). |
|
moderation
Package moderation implements XEP-0425 Message Moderation.
|
Package moderation implements XEP-0425 Message Moderation. |
|
muc
Package muc implements XEP-0045 Multi-User Chat and XEP-0249 Direct MUC Invitations.
|
Package muc implements XEP-0045 Multi-User Chat and XEP-0249 Direct MUC Invitations. |
|
omemo
Package omemo implements XEP-0384 OMEMO Encryption, XEP-0380 EME, and XEP-0454 OMEMO Media Sharing.
|
Package omemo implements XEP-0384 OMEMO Encryption, XEP-0380 EME, and XEP-0454 OMEMO Media Sharing. |
|
oob
Package oob implements XEP-0066 Out of Band Data.
|
Package oob implements XEP-0066 Out of Band Data. |
|
ping
Package ping implements XEP-0199 XMPP Ping.
|
Package ping implements XEP-0199 XMPP Ping. |
|
presence
Package presence implements RFC 6121 Presence Management.
|
Package presence implements RFC 6121 Presence Management. |
|
pubsub
Package pubsub implements XEP-0060 Publish-Subscribe and XEP-0163 PEP.
|
Package pubsub implements XEP-0060 Publish-Subscribe and XEP-0163 PEP. |
|
push
Package push implements XEP-0357 Push Notifications.
|
Package push implements XEP-0357 Push Notifications. |
|
reactions
Package reactions implements XEP-0444 Message Reactions.
|
Package reactions implements XEP-0444 Message Reactions. |
|
receipts
Package receipts implements XEP-0184 Message Delivery Receipts.
|
Package receipts implements XEP-0184 Message Delivery Receipts. |
|
register
Package register implements XEP-0077 In-Band Registration.
|
Package register implements XEP-0077 In-Band Registration. |
|
retraction
Package retraction implements XEP-0424 Message Retraction.
|
Package retraction implements XEP-0424 Message Retraction. |
|
roster
Package roster implements RFC 6121 Roster Management.
|
Package roster implements RFC 6121 Roster Management. |
|
rsm
Package rsm implements XEP-0059 Result Set Management.
|
Package rsm implements XEP-0059 Result Set Management. |
|
sasl2
Package sasl2 implements XEP-0388 SASL2, XEP-0484 FAST, XEP-0386 Bind2, and XEP-0440 SASL Channel-Binding.
|
Package sasl2 implements XEP-0388 SASL2, XEP-0484 FAST, XEP-0386 Bind2, and XEP-0440 SASL Channel-Binding. |
|
sm
Package sm implements XEP-0198 Stream Management.
|
Package sm implements XEP-0198 Stream Management. |
|
socks5
Package socks5 implements XEP-0065 SOCKS5 Bytestreams.
|
Package socks5 implements XEP-0065 SOCKS5 Bytestreams. |
|
stanzaid
Package stanzaid implements XEP-0359 Unique and Stable Stanza IDs.
|
Package stanzaid implements XEP-0359 Unique and Stable Stanza IDs. |
|
styling
Package styling implements XEP-0393 Message Styling.
|
Package styling implements XEP-0393 Message Styling. |
|
time
Package time implements XEP-0082 Date/Time Profiles and XEP-0202 Entity Time.
|
Package time implements XEP-0082 Date/Time Profiles and XEP-0202 Entity Time. |
|
upload
Package upload implements XEP-0363 HTTP File Upload.
|
Package upload implements XEP-0363 HTTP File Upload. |
|
vcard
Package vcard implements XEP-0054 vcard-temp and XEP-0292 vCard4 over XMPP.
|
Package vcard implements XEP-0054 vcard-temp and XEP-0292 vCard4 over XMPP. |
|
version
Package version implements XEP-0092 Software Version.
|
Package version implements XEP-0092 Software Version. |
|
Package sasl implements SASL authentication mechanisms for XMPP.
|
Package sasl implements SASL authentication mechanisms for XMPP. |
|
Package stanza defines XMPP stanza types: Message, Presence, and IQ.
|
Package stanza defines XMPP stanza types: Message, Presence, and IQ. |
|
Package storage defines the pluggable storage interfaces for xmpp-go.
|
Package storage defines the pluggable storage interfaces for xmpp-go. |
|
file
Package file provides a file-based JSON storage backend for xmpp-go.
|
Package file provides a file-based JSON storage backend for xmpp-go. |
|
memory
Package memory provides an in-memory implementation of the storage interfaces.
|
Package memory provides an in-memory implementation of the storage interfaces. |
|
sql
Package sql provides a shared SQL storage implementation for xmpp-go.
|
Package sql provides a shared SQL storage implementation for xmpp-go. |
|
storagetest
Package storagetest provides a conformance test suite for storage backends.
|
Package storagetest provides a conformance test suite for storage backends. |
|
mongodb
module
|
|
|
mysql
module
|
|
|
postgres
module
|
|
|
redis
module
|
|
|
sqlite
module
|
|
|
Package stream provides XMPP stream header types and stream management.
|
Package stream provides XMPP stream header types and stream management. |
|
Package transport provides transport abstractions for XMPP connections.
|
Package transport provides transport abstractions for XMPP connections. |
|
Package xml provides streaming XML encoding and decoding for XMPP streams.
|
Package xml provides streaming XML encoding and decoding for XMPP streams. |