- 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.
19 lines
270 B
Go
19 lines
270 B
Go
package domain
|
|
|
|
import (
|
|
"errors"
|
|
"time"
|
|
)
|
|
|
|
type EntityID string
|
|
|
|
type EntityState struct {
|
|
EntityID EntityID
|
|
State string
|
|
Attributes map[string]string
|
|
LastChanged time.Time
|
|
LastUpdated time.Time
|
|
}
|
|
|
|
var ErrNotImplemented = errors.New("not implemented")
|