Skip to content

rzr/webthing-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Aug 28, 2019
078aab3 · Aug 28, 2019

History

55 Commits
Aug 28, 2019
Aug 19, 2019
Aug 28, 2019
Aug 7, 2019
Aug 20, 2019
Aug 7, 2019
Aug 8, 2019
Aug 28, 2019
Aug 7, 2019
Aug 28, 2019
Aug 28, 2019
Aug 19, 2019
Aug 20, 2019
Aug 20, 2019
Aug 7, 2019

Repository files navigation

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