generic

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2020 License: LGPL-3.0 Imports: 0 Imported by: 1

Documentation

Overview

Package generic provides a generic implementation for NDEF Payloads which are either custom or not supported yet.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Payload []byte
}

Payload is a wrapper to store a Payload.

func New

func New(payload []byte) *Payload

New returns a pointer to a Payload type holding the given payload.

func (*Payload) Len

func (g *Payload) Len() int

Len is the length of the byte slice resulting of Marshaling.

func (*Payload) Marshal

func (g *Payload) Marshal() []byte

Marshal returns the bytes representing the payload of a Record of generic type.

func (*Payload) String

func (g *Payload) String() string

String returns a string explaining that we are not sure how to print this type.

func (*Payload) Type

func (g *Payload) Type() string

Type returns the name of the payload type. In this case, it's generic.

func (*Payload) Unmarshal

func (g *Payload) Unmarshal(buf []byte)

Unmarshal parses a generic payload.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL