Documentation ¶
Overview ¶
Package gateways provides a QR code parser for gateways.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data interface { // FormatID returns the ID of the format used to parse the QR Code data. FormatID() string GatewayEUI() types.EUI64 OwnerToken() string encoding.TextUnmarshaler }
Data represents gateway QR code data.
type Format ¶
type Format interface { Format() *ttnpb.QRCodeFormat New() Data }
Format is a gateway QR code format.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server provides methods for gateways QR codes.
func (*Server) Formats ¶
func (s *Server) Formats() []*ttnpb.QRCodeFormat
Formats returns the registered gateway QR code formats.
func (*Server) GetGatewayFormat ¶
GetGatewayFormat returns the format by ID.
func (*Server) GetGatewayFormats ¶
GetGatewayFormats returns the registered gateway QR code formats.
func (*Server) Parse ¶
Parse the given QR code data. If formatID is provided, only that format is used. Otherwise, the first format registered will be used.
func (*Server) RegisterGatewayFormat ¶
RegisterGatewayFormat registers the given gateway QR code format.
type TTIGPRO1Format ¶
type TTIGPRO1Format struct{}
TTIGPRO1Format implements the TTIGPRO1 Format.
func (TTIGPRO1Format) Format ¶
func (TTIGPRO1Format) Format() *ttnpb.QRCodeFormat
Format implements the Format interface.
func (TTIGPRO1Format) ID ¶
func (TTIGPRO1Format) ID() string
ID is the identifier of the format as a string.