~samwhited/xmpp

fe1d39e963f556b5bed79d2bed9079f64066309c — Sam Whited 6 months ago 31f9b09
all: generate disco features

Signed-off-by: Sam Whited <sam@samwhited.com>
M carbons/carbons.go => carbons/carbons.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -receiver "h Handler"

// Package carbons implements carbon copying messages to all interested clients.
package carbons // import "mellium.im/xmpp/carbons"


A carbons/disco.go => carbons/disco.go +25 -0
@@ 0,0 1,25 @@
// Code generated by "genfeature -receiver h Handler"; DO NOT EDIT.

package carbons

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

// ForFeatures implements info.FeatureIter.
func (h Handler) ForFeatures(node string, f func(info.Feature) error) error {
	if node != "" {
		return nil
	}
	var err error
	err = f(Feature)
	if err != nil {
		return err
	}
	return nil
}

M commands/commands.go => commands/commands.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package commands implements executable ad-hoc commands.
package commands // import "mellium.im/xmpp/commands"


A commands/disco.go => commands/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package commands

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

A form/disco.go => form/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package form

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M form/doc.go => form/doc.go +2 -0
@@ 2,5 2,7 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package form implements sending and submitting data forms.
package form // import "mellium.im/xmpp/form"

A forward/disco.go => forward/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package forward

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M forward/forward.go => forward/forward.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package forward implements forwarding messages.
package forward // import "mellium.im/xmpp/forward"


A ibr2/disco.go => ibr2/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package ibr2

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M ibr2/doc.go => ibr2/doc.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package ibr2 implements Extensible In-Band Registration.
//
// BE ADVISED: This API is incomplete and is subject to change.

A jid/disco.go => jid/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature -vars=FeatureEscaping:`jid\20escaping`"; DO NOT EDIT.

package jid

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	FeatureEscaping = info.Feature{Var: `jid\20escaping`}
)

M jid/doc.go => jid/doc.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -vars=FeatureEscaping:`jid\20escaping`

// Package jid implements the XMPP address format.
//
// XMPP addresses, more often called "JID's" (Jabber ID's) for historical

M muc/muc.go => muc/muc.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -receiver "*Client"

// Package muc implements Multi-User Chat.
//
// Unlike many Multi-User Chat (MUC) implementations, the muc package tries to

A oob/disco.go => oob/disco.go +13 -0
@@ 0,0 1,13 @@
// Code generated by "genfeature -vars=Feature:NS,FeatureIQ:NS"; DO NOT EDIT.

package oob

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature   = info.Feature{Var: NS}
	FeatureIQ = info.Feature{Var: NS}
)

M oob/oob.go => oob/oob.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -vars=Feature:NS,FeatureIQ:NS

// Package oob implements XEP-0066: Out of Band Data.
package oob // import "mellium.im/xmpp/oob"


A paging/disco.go => paging/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package paging

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M paging/rsm.go => paging/rsm.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package paging implements result set management.
package paging // import "mellium.im/xmpp/paging"


A ping/disco.go => ping/disco.go +25 -0
@@ 0,0 1,25 @@
// Code generated by "genfeature -receiver h Handler"; DO NOT EDIT.

package ping

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

// ForFeatures implements info.FeatureIter.
func (h Handler) ForFeatures(node string, f func(info.Feature) error) error {
	if node != "" {
		return nil
	}
	var err error
	err = f(Feature)
	if err != nil {
		return err
	}
	return nil
}

M ping/ping.go => ping/ping.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -receiver "h Handler"

// Package ping implements XEP-0199: XMPP Ping.
package ping // import "mellium.im/xmpp/ping"


M ping/ping_test.go => ping/ping_test.go +2 -0
@@ 11,6 11,7 @@ import (
	"testing"

	"mellium.im/xmlstream"
	"mellium.im/xmpp/disco/info"
	"mellium.im/xmpp/internal/xmpptest"
	"mellium.im/xmpp/jid"
	"mellium.im/xmpp/mux"


@@ 23,6 24,7 @@ var (
	_ xmlstream.WriterTo  = ping.IQ{}
	_ xmlstream.Marshaler = ping.IQ{}
	_ mux.IQHandler       = ping.Handler{}
	_ info.FeatureIter    = ping.Handler{}
)

var marshalTestCases = []xmpptest.EncodingTestCase{

A receipts/disco.go => receipts/disco.go +25 -0
@@ 0,0 1,25 @@
// Code generated by "genfeature -receiver h *Handler"; DO NOT EDIT.

package receipts

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

// ForFeatures implements info.FeatureIter.
func (h *Handler) ForFeatures(node string, f func(info.Feature) error) error {
	if node != "" {
		return nil
	}
	var err error
	err = f(Feature)
	if err != nil {
		return err
	}
	return nil
}

M receipts/receipts.go => receipts/receipts.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -receiver "h *Handler"

// Package receipts implements XEP-0184: Message Delivery Receipts.
package receipts // import "mellium.im/xmpp/receipts"


A styling/disco.go => styling/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package styling

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M styling/styling.go => styling/styling.go +1 -0
@@ 2,6 2,7 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature
//go:generate go run -tags=tools golang.org/x/tools/cmd/stringer -type=Style

// Package styling implements XEP-0393: Message Styling, a simple styling

A version/disco.go => version/disco.go +12 -0
@@ 0,0 1,12 @@
// Code generated by "genfeature"; DO NOT EDIT.

package version

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

M version/version.go => version/version.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature

// Package version queries a remote entity for software version info.
package version // import "mellium.im/xmpp/version"


A xtime/disco.go => xtime/disco.go +25 -0
@@ 0,0 1,25 @@
// Code generated by "genfeature -receiver h Handler"; DO NOT EDIT.

package xtime

import (
	"mellium.im/xmpp/disco/info"
)

// A list of service discovery features that are supported by this package.
var (
	Feature = info.Feature{Var: NS}
)

// ForFeatures implements info.FeatureIter.
func (h Handler) ForFeatures(node string, f func(info.Feature) error) error {
	if node != "" {
		return nil
	}
	var err error
	err = f(Feature)
	if err != nil {
		return err
	}
	return nil
}

M xtime/time.go => xtime/time.go +2 -0
@@ 2,6 2,8 @@
// Use of this source code is governed by the BSD 2-clause
// license that can be found in the LICENSE file.

//go:generate go run ../internal/genfeature -receiver "h Handler"

// Package xtime implements time related XMPP functionality.
//
// In particular, this package implements XEP-0202: Entity Time and XEP-0082: