iotfast

command module
v0.0.0-...-5961e9c Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

README

/http
//http://localhost:8201/api/v1/device/deviceData/add
{
    "deviceId":1,
    "deviceSn":"1",
    "devicePwd":"1",
    "time":"2022-07-12 01:02:03",
    "property":{
        "temperature":23.2,
        "humidity":20
    },
    "event":{
        "hight":"当前温度值",
        "addr":"kunming"
    }
}

/device/{deviceId}/report
{
    "deviceId": "123",
    "messageId":123,
    "time":"20220712 01:02:03",
    "property":{
        "tempure":23.2,
    }
    "event":{
        "hight":"当前温度值",
        "addr":"",
    } 
}

/device/{deviceId}/read
{
    "deviceId":"123",
    "messageId": "",
    "properties":["sn","model"] //要读取到属性列表
}

/device/{deviceId}/read/reply
{
    "deviceId":"123",
    "messageId": "",
    "properties":{"sn":"13","model":"456"} //要读取到属性列表
}

/device/{deviceId}/write
{
"time":"20220712 01:02:03", //毫秒时间戳
"messageId":"消息ID",
"deviceId":"设备ID",
"properties":{"color":"red"} //要设置的属性
}


/device/{deviceId}/funtion
{
"time":"20220712 01:02:03", //毫秒时间戳
"messageId":"消息ID",
"deviceId":"设备ID",
"do":{"do_1":0} //要设置的属性
}



curl -d '{"name":"john","pass":"123","deviceId":1,"DeviceSn":"123"}' "http://localhost:8201/api/v1/device/deviceData/add/"

curl -d "deviceId=1&DeviceSn=123" "http://localhost:8201/api/v1/device/deviceData/add/"

curl -d '{"name":"1"}' "http://localhost:8201/api/v1/device/deviceLabel/add"


curl -d "name=john" "http://127.0.0.1:8201/api/v1/demo/demo"

curl -d '{"name":"john","pass":"123"}' "http://127.0.0.1:8201/api/v1/demo/demo"

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
app
internal
cmd
library
libMath
math-engine
math-engine
libMsgBus
Package event is lightweight event manager and dispatcher implements by Go.
Package event is lightweight event manager and dispatcher implements by Go.
plugin
server
mqtt/config
Package config is a generated GoMock package.
Package config is a generated GoMock package.
mqtt/persistence/queue
Package queue is a generated GoMock package.
Package queue is a generated GoMock package.
mqtt/persistence/session
Package session is a generated GoMock package.
Package session is a generated GoMock package.
mqtt/persistence/subscription
Package subscription is a generated GoMock package.
Package subscription is a generated GoMock package.
mqtt/persistence/unack
Package unack is a generated GoMock package.
Package unack is a generated GoMock package.
mqtt/pkg/packets
Package packets is a generated GoMock package.
Package packets is a generated GoMock package.
mqtt/pkg/pidfile
Package pidfile provides structure and helper functions to create and remove PID file.
Package pidfile provides structure and helper functions to create and remove PID file.
mqtt/plugin/admin
Package admin is a reverse proxy.
Package admin is a reverse proxy.
mqtt/plugin/auth
Package auth is a reverse proxy.
Package auth is a reverse proxy.
mqtt/plugin/federation
Package federation is a reverse proxy.
Package federation is a reverse proxy.
mqtt/retained
Package retained is a generated GoMock package.
Package retained is a generated GoMock package.
mqtt/server
Package server is a generated GoMock package.
Package server is a generated GoMock package.

Jump to

Keyboard shortcuts

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