This repository has been archived by the owner on Oct 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
132 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
package rpc | ||
|
||
type DeviceId struct { | ||
Id string `json:"id"` | ||
} | ||
|
||
type DeviceItem struct { | ||
Id string `json:"id"` | ||
Name string `json:"name"` | ||
ProductId string `json:"product_id"` | ||
Station map[string]any `json:"station,omitempty"` | ||
} | ||
|
||
type DeviceListResponse []DeviceItem | ||
|
||
type DeviceCreateRequest DeviceItem | ||
|
||
type DeviceDeleteRequest DeviceId | ||
|
||
type DevicePropertyRequest struct { | ||
Id string `json:"id"` | ||
ProductId string `json:"product_id,omitempty"` | ||
Properties map[string]any `json:"properties"` | ||
} | ||
|
||
type DevicePropertyModifyRequest struct { | ||
Id string `json:"id"` | ||
Properties map[string]any `json:"properties"` | ||
} | ||
|
||
type DeviceEventRequest struct { | ||
Id string `json:"id"` | ||
Name string `json:"name,omitempty"` | ||
Type string `json:"type,omitempty"` | ||
Level int `json:"level,omitempty"` | ||
} | ||
|
||
type DeviceActionRequest struct { | ||
Id string `json:"id"` | ||
Name string `json:"name"` | ||
Parameters map[string]any `json:"parameters"` | ||
} | ||
|
||
type DeviceActionResponse struct { | ||
Return map[string]any `json:"return,omitempty"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
package rpc | ||
|
||
type FsPath struct { | ||
Path string `json:"path"` | ||
} | ||
|
||
type FsPathMove struct { | ||
Path string `json:"path"` | ||
Move string `json:"move"` | ||
} | ||
|
||
type FsItem struct { | ||
Name string `json:"name"` | ||
Dir bool `json:"dir,omitempty"` | ||
Size int64 `json:"size,omitempty"` | ||
Time int64 `json:"time,omitempty"` | ||
} | ||
|
||
type FsStream struct { | ||
Stream uint16 `json:"stream"` | ||
} | ||
|
||
type FsSearchRequest FsPath | ||
|
||
type FsSearchResponse []FsItem | ||
|
||
type FsDownloadRequest FsPath | ||
|
||
type FsDownloadResponse FsStream | ||
|
||
type FsUploadRequest FsPath | ||
|
||
type FsUploadResponse FsStream | ||
|
||
type FsDeleteRequest FsPath | ||
|
||
type FsMoveRequest FsPathMove | ||
|
||
type FsMakeDirectoryRequest FsPath | ||
|
||
type FsFormatRequest struct { | ||
Disk string `json:"disk"` | ||
Type string `json:"type"` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package rpc |