- Added ListSwitches method to SwitchService in switch_grpc.pb.go. - Implemented SwitchGRPC adapter for ListSwitches in switch.go. - Created SwitchApp for managing switch states and added ListSwitches logic. - Updated core domain with Switch struct and associated methods. - Enhanced LightApp to include ListLights functionality. - Updated protobuf definitions for Switch and Light services to include new request and response messages. - Introduced error handling for unimplemented methods in the gRPC server.
9 lines
174 B
Go
9 lines
174 B
Go
package domain
|
|
|
|
type Switch struct {
|
|
EntityID EntityID
|
|
FriendlyName string
|
|
State string // "on" | "off" | "unavailable"
|
|
DeviceClass string // e.g. "switch"
|
|
}
|