message

package
v0.0.0-...-73beaae Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instruction

type Instruction interface {
	HasPayload() bool
	Payload() interface{}
	Type() string
}

Instruction defines a generic interface for representing device instructions. Specific types of instructions simply need to satisfy this interface.

type VibrateInstruction

type VibrateInstruction struct{}

VibrateInstruction will instruct a device to turn its vibration function on/off we assume the actual device keeps track of its own state, so "vibrate vibrate vibrate" will turn the device on/off/on

func (VibrateInstruction) HasPayload

func (v VibrateInstruction) HasPayload() bool

HasPayload returns false; we don't have payloads for this instruction type

func (VibrateInstruction) Payload

func (v VibrateInstruction) Payload() interface{}

Payload returns nil for this instruction

func (VibrateInstruction) Type

func (v VibrateInstruction) Type() string

Type returns the capability type

Jump to

Keyboard shortcuts

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