github.com/e154/smart-home@v0.17.2-0.20240311175135-e530a6e5cd45/api/dto/dto.go (about) 1 // This file is part of the Smart Home 2 // Program complex distribution https://github.com/e154/smart-home 3 // Copyright (C) 2016-2023, Filippov Alex 4 // 5 // This library is free software: you can redistribute it and/or 6 // modify it under the terms of the GNU Lesser General Public 7 // License as published by the Free Software Foundation; either 8 // version 3 of the License, or (at your option) any later version. 9 // 10 // This library is distributed in the hope that it will be useful, 11 // but WITHOUT ANY WARRANTY; without even the implied warranty of 12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 // Library General Public License for more details. 14 // 15 // You should have received a copy of the GNU Lesser General Public 16 // License along with this library. If not, see 17 // <https://www.gnu.org/licenses/>. 18 19 package dto 20 21 // Dto ... 22 type Dto struct { 23 Role Role 24 User User 25 Image Image 26 Script Script 27 Tag Tag 28 Plugin Plugin 29 Entity Entity 30 Zigbee2mqtt Zigbee2mqtt 31 Area Area 32 Action Action 33 Condition Condition 34 Trigger Trigger 35 Automation Automation 36 Log Log 37 Dashboard Dashboard 38 DashboardCard DashboardCard 39 DashboardCardItem DashboardCardItem 40 DashboardTab DashboardTab 41 Variable Variable 42 EntityStorage EntityStorage 43 MessageDelivery MessageDelivery 44 DeveloperTools DeveloperTools 45 Mqtt Mqtt 46 Backup Backup 47 } 48 49 // NewDto ... 50 func NewDto() Dto { 51 return Dto{ 52 Role: NewRoleDto(), 53 User: NewUserDto(), 54 Image: NewImageDto(), 55 Script: NewScriptDto(), 56 Plugin: NewPluginDto(), 57 Entity: NewEntityDto(), 58 Zigbee2mqtt: NewZigbee2mqttDto(), 59 Area: NewAreaDto(), 60 Action: NewActionDto(), 61 Condition: NewConditionDto(), 62 Trigger: NewTriggerDto(), 63 Automation: NewAutomationDto(), 64 Log: NewLogDto(), 65 Dashboard: NewDashboardDto(), 66 DashboardCard: NewDashboardCardDto(), 67 DashboardCardItem: NewDashboardCardItemDto(), 68 DashboardTab: NewDashboardTabDto(), 69 Variable: NewVariableDto(), 70 EntityStorage: NewEntityStorageDto(), 71 MessageDelivery: NewMessageDeliveryDto(), 72 DeveloperTools: NewDeveloperToolsDto(), 73 Mqtt: NewMqttDto(), 74 Backup: NewBackupDto(), 75 } 76 }