Versions in this module Expand all Collapse all v1 v1.9.1 Mar 9, 2022 Changes in this version + const ControlAndReadDevice + func MajorTypeList(c *gin.Context) + func MinorTypeList(c *gin.Context) type Device + DepartmentID int + DepartmentName string + DeviceInstances plugin.DeviceInstances + type MajorResp struct + type MinorReq struct + Type plugin.DeviceType + type MinorResp struct + Types MinorTypes + type MinorType struct + Devices []ModelDevice + type MinorTypes []MinorType + func (t MinorTypes) Len() int + func (t MinorTypes) Less(i, j int) bool + func (t MinorTypes) Swap(i, j int) + type Types []Type + func (t Types) Len() int + func (t Types) Less(i, j int) bool + func (t Types) Swap(i, j int) type UpdateDeviceReq + DepartmentID int v1.5.0 Nov 23, 2021 Changes in this version type CheckSaDeviceResp + Version string v1.4.0 Oct 19, 2021 Changes in this version + const AllDevice + const ControlDevice + func AddDevice(c *gin.Context) + func BuildInfoDevice(device entity.Device, user *session.User, req *http.Request) (iDevice infoDevice, err error) + func CheckSaDevice(c *gin.Context) + func ControlPermissions(d entity.Device) ([]types.Permission, error) + func DelDevice(c *gin.Context) + func DeviceManagePermissions(d entity.Device) []types.Permission + func DevicePermissions(d entity.Device) (ps []types.Permission, err error) + func InfoDevice(c *gin.Context) + func IsAccessAllow(c *gin.Context) + func IsDeviceControlPermit(areaID uint64, userID int, pluginID, identity string, data json.RawMessage) bool + func ListAllDevice(c *gin.Context) + func ListLocationDevices(c *gin.Context) + func RegisterDeviceRouter(r gin.IRouter) + func TypeList(c *gin.Context) + func UpdateDevice(c *gin.Context) + type CheckSaDeviceResp struct + IsBind bool + Revision string + type Device struct + Control string + ID int + Identity string + IsSA bool + LocationID int + LocationName string + Logo string + LogoURL string + Name string + PluginID string + PluginURL string + Type string + func WrapDevices(c *gin.Context, devices []entity.Device, listType listType) (result []Device) + type IsAccessAllowResp struct + AccessAllow bool + type ModelDevice struct + Logo string + Manufacturer string + Model string + Name string + PluginID string + Provisioning string + type Permissions struct + DeleteDevice bool + UpdateDevice bool + type Response struct + Types []Type + type Type struct + Devices []ModelDevice + Name string + Type plugin.DeviceType + type UpdateDeviceReq struct + LocationID int + Name *string + func (req *UpdateDeviceReq) Validate() (updateDevice entity.Device, err error)