func GetEndDeviceFormat(id string) EndDeviceFormat {
	endDeviceFormatsMu.RLock()
	res := endDeviceFormats[id]
	endDeviceFormatsMu.RUnlock()
	return res
}
GetEndDeviceFormat returns the converter by ID.
package qrcode
import (
	"encoding"
	"sync"
	"go.thethings.network/lorawan-stack/v3/pkg/errors"
	"go.thethings.network/lorawan-stack/v3/pkg/ttnpb"
	"go.thethings.network/lorawan-stack/v3/pkg/types"
)
type Data interface {
	Validate() error
	encoding.TextMarshaler
	encoding.TextUnmarshaler
}
type EndDeviceData interface {
	Data
	Encode(*ttnpb.EndDevice) error
}
type AuthenticatedEndDeviceIdentifiers interface {
	AuthenticatedEndDeviceIdentifiers() (joinEUI, devEUI types.EUI64, authenticationCode string)
}
var (
	errFormat    = errors.DefineInvalidArgument("format", "invalid format")
	errCharacter = errors.DefineInvalidArgument("character", "invalid character `{r}`")
	errNoJoinEUI = errors.DefineFailedPrecondition("no_join_eui", "no JoinEUI")
	errNoDevEUI  = errors.DefineFailedPrecondition("no_dev_eui", "no DevEUI")
)
func Parse(data []byte) (Data, error) {
	for _, model := range [...]Data{
		&LoRaAllianceTR005{},
		&LoRaAllianceTR005Draft3{},
		&LoRaAllianceTR005Draft2{},
	} {
		if err := model.UnmarshalText(data); err == nil {
			return model, nil
		}
	}
	return nil, errFormat.New()
}
type EndDeviceFormat interface {
	Format() *ttnpb.QRCodeFormat
	New() EndDeviceData
}
var (
	endDeviceFormats   = map[string]EndDeviceFormat{}
	endDeviceFormatsMu sync.RWMutex
)
func GetEndDeviceFormats() map[string]EndDeviceFormat {
	res := make(map[string]EndDeviceFormat)
	endDeviceFormatsMu.RLock()
	for k, v := range endDeviceFormats {
		res[k] = v
	}
	endDeviceFormatsMu.RUnlock()
	return res
}