Categorygithub.com/rzr/webthing-go
modulepackage
0.0.4
Repository: https://github.com/rzr/webthing-go.git
Documentation: pkg.go.dev

# README

WEBTHING-GO

Codacy Badge

GitHub forks license GitHub version GoDoc Build Status pulls Automated Builds Build Status Go Report Card codebeat badge

USAGE

To get started look at "example" directory:

go version
#| go version go1.10.4 linux/amd64

go get github.com/rzr/webthing-go

cd ~/go/src/github.com/rzr/webthing-go
go run example/simplest-webthing-go/simplest-thing.go
#| Listening: :8888

curl http://localhost:8888/properties
#| {"on":false}

curl -X PUT --data '{"on": true}'  http://localhost:8888/properties/on
#| {"on":true}

curl http://localhost:8888/properties/on
#| {"on":true}

curl http://localhost:8888 | jq -M .
#| { ...
#| "title": "ActuatorExample"
#| }

To import published module just use this alias:

import (
	webthing "github.com/rzr/webthing-go"
)

RESOURCES

# Packages

No description provided by the author

# Functions

NewProperty contructs and assign value.
NewServer constructs an http server to be started.
NewThing construct without properties.

# Structs

Property is made of value(s).
Server is an HTTP server made for webthings model.
Thing is made of Property(ies).
Value is a multitypes placeholder, only one is used.