routes

package
v0.0.0-...-2387267 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetState

func GetState(w http.ResponseWriter, r *http.Request)

GetState combines core.device-registry data, with device state

func PutState

func PutState(w http.ResponseWriter, r *http.Request)

PutState updates a device state

Types

type Response

type Response struct {
	ID      string `json:"id"`
	Name    string `json:"name"`
	Address string `json:"address"`
	State   struct {
		Power bool `json:"power"`
	} `json:"state"`
}

Response : a typical response struct

Jump to

Keyboard shortcuts

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