absoluteuri

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 absoluteuri provides an implementation for NDEF Payloads of Absolute URI type.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	URIType string
	Payload []byte
}

Payload is a wrapper to store a Payload

func New

func New(uriType string, payload []byte) *Payload

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

func (*Payload) Len

func (absu *Payload) Len() int

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

func (*Payload) Marshal

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

Marshal returns the bytes representing the payload

func (*Payload) String

func (absu *Payload) String() string

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

func (*Payload) Type

func (absu *Payload) Type() string

Type returns the URI defining the type for this payload

func (*Payload) Unmarshal

func (absu *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