19 lines
691 B
Protocol Buffer
19 lines
691 B
Protocol Buffer
syntax = "proto3";
|
|
package ha.v1;
|
|
option go_package = "gitea.nik4nao.com/nik/home-services/gen/ha/v1;hav1";
|
|
import "ha/v1/common.proto";
|
|
|
|
// TODO: implement SwitchService. Follow the same pattern as LightService:
|
|
// - domain type in core/domain/switch.go
|
|
// - port interface in core/ports/driving/switch.go
|
|
// - application logic in app/switch.go
|
|
// - gRPC adapter in adapters/primary/grpc/switch.go
|
|
service SwitchService {
|
|
rpc TurnOn(SwitchRequest) returns (SwitchResponse);
|
|
rpc TurnOff(SwitchRequest) returns (SwitchResponse);
|
|
rpc Toggle(SwitchRequest) returns (SwitchResponse);
|
|
}
|
|
|
|
message SwitchRequest { string entity_id = 1; }
|
|
message SwitchResponse { EntityState state = 1; }
|