diff --git a/rpc/device.go b/rpc/device.go index 1836cdd..ae966aa 100644 --- a/rpc/device.go +++ b/rpc/device.go @@ -7,6 +7,7 @@ const ( DEVICE_DELETE DEVICE_READ DEVICE_WRITE + DEVICE_STATUS DEVICE_EVENT DEVICE_ACTION ) diff --git a/rpc/fs.go b/rpc/fs.go index dd051a7..4c956ec 100644 --- a/rpc/fs.go +++ b/rpc/fs.go @@ -1,5 +1,16 @@ package rpc +const ( + FS_LIST uint8 = iota + FS_STATE + FS_DOWNLOAD + FS_UPLOAD + FS_REMOVE + FS_MOVE + FS_MKDIR + FS_FORMAT +) + type FsPath struct { Path string `json:"path"` } diff --git a/rpc/gateway.go b/rpc/gateway.go index ce2be03..9c08967 100644 --- a/rpc/gateway.go +++ b/rpc/gateway.go @@ -1,5 +1,12 @@ package rpc +const ( + GATEWAY_STATUS uint8 = iota + GATEWAY_EVENT + GATEWAY_SETTING + GATEWAY_METRICS +) + type GatewayStatusRequest struct { Battery int `json:"battery,omitempty"` Rssi int `json:"rssi,omitempty"` diff --git a/rpc/gpio.go b/rpc/gpio.go index 94fbaa3..4a87d47 100644 --- a/rpc/gpio.go +++ b/rpc/gpio.go @@ -1,5 +1,12 @@ package rpc +const ( + GPIO_LIST uint8 = iota + GPIO_WRITE + GPIO_READ + GPIO_STATUS +) + type GpioPath struct { Path string `json:"path"` } diff --git a/rpc/product.go b/rpc/product.go index d5e2226..f0652d6 100644 --- a/rpc/product.go +++ b/rpc/product.go @@ -1,5 +1,12 @@ package rpc +const ( + PRODUCT_LIST uint8 = iota + PRODUCT_DOWNLOAD + PRODUCT_UPLOAD + PRODUCT_DELETE +) + type ProductId struct { Id string `json:"id"` } diff --git a/rpc/serial.go b/rpc/serial.go index cf9d263..66c3730 100644 --- a/rpc/serial.go +++ b/rpc/serial.go @@ -1,5 +1,13 @@ package rpc +const ( + SERIAL_LIST uint8 = iota + SERIAL_OPEN + SERIAL_CLOSE + SERIAL_WATCH + SERIAL_PIPE +) + type SerialId struct { Id string `json:"id"` } diff --git a/rpc/tcp.go b/rpc/tcp.go index 42e86bc..4523961 100644 --- a/rpc/tcp.go +++ b/rpc/tcp.go @@ -1,5 +1,14 @@ package rpc +const ( + TCP_LIST uint8 = iota + TCP_CREATE + TCP_DELETE + TCP_RESTART + TCP_WATCH + TCP_PIPE +) + type TcpId struct { Id string `json:"id"` }