Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func BuildMessage ¶
BuildMessage is an alias for BuildTextMessage for backward compatibility
func BuildTextMessage ¶
BuildTextMessage creates an NDEF message with a single text record
func ParseToText ¶
ParseToText parses raw NDEF data and returns the first text or URI record as a string
func ValidateNDEFMessage ¶
ValidateNDEFMessage validates basic NDEF message structure
Types ¶
type NDEFMessage ¶
type NDEFMessage struct {
Records []NDEFRecord
}
NDEFMessage represents an NDEF message
type NDEFRecord ¶
type NDEFRecord struct {
Text string
URI string
Type NDEFRecordType
Payload []byte
}
NDEFRecord represents a single NDEF record
type NDEFRecordType ¶
type NDEFRecordType string
NDEFRecordType represents the type of an NDEF record
const ( // NDEFTypeText represents a text record type NDEFTypeText NDEFRecordType = "text" // NDEFTypeURI represents a URI record type NDEFTypeURI NDEFRecordType = "uri" )
Click to show internal directories.
Click to hide internal directories.