github.com/binkynet/BinkyNet@v1.12.1-0.20240421190447-da4e34c20be0/apis/v1/localworker.pb.go (about) 1 // Code generated by protoc-gen-gogo. DO NOT EDIT. 2 // source: localworker.proto 3 4 package v1 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 codes "google.golang.org/grpc/codes" 12 status "google.golang.org/grpc/status" 13 math "math" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 26 27 func init() { proto.RegisterFile("localworker.proto", fileDescriptor_4d9116c22e0c2dd1) } 28 29 var fileDescriptor_4d9116c22e0c2dd1 = []byte{ 30 // 285 bytes of a gzipped FileDescriptorProto 31 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x91, 0xcd, 0x4a, 0xf4, 0x30, 32 0x14, 0x86, 0xbf, 0x7e, 0xa2, 0x8b, 0x0c, 0x62, 0x8d, 0x0b, 0x71, 0x90, 0xae, 0x5c, 0xa7, 0x54, 33 0x71, 0x25, 0x08, 0x0e, 0xe3, 0x42, 0xa8, 0x3f, 0x4c, 0x40, 0xc1, 0x5d, 0x1b, 0x0e, 0x4e, 0x98, 34 0x9f, 0xc4, 0xe4, 0xb4, 0xa5, 0x17, 0xe0, 0x3d, 0x78, 0x0d, 0x5e, 0x89, 0x4b, 0x2f, 0x41, 0xea, 35 0x8d, 0x48, 0x5b, 0x02, 0x56, 0x82, 0xbb, 0xf0, 0xbe, 0xcf, 0xf3, 0x2e, 0x72, 0xc8, 0xee, 0x52, 36 0x89, 0x6c, 0x59, 0x29, 0xb3, 0x00, 0xc3, 0xb4, 0x51, 0xa8,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ef, 48 0x00, 0x00, 0x00, 0xff, 0xff, 0x8c, 0x32, 0xc2, 0xaa, 0x08, 0x02, 0x00, 0x00, 49 } 50 51 // Reference imports to suppress errors if they are not otherwise used. 52 var _ context.Context 53 var _ grpc.ClientConn 54 55 // This is a compile-time assertion to ensure that this generated file 56 // is compatible with the grpc package it is being compiled against. 57 const _ = grpc.SupportPackageIsVersion4 58 59 // LocalWorkerServiceClient is the client API for LocalWorkerService service. 60 // 61 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 62 type LocalWorkerServiceClient interface { 63 // Reset the local worker 64 Reset(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) 65 // Set a requested loc state 66 SetLocRequest(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error) 67 // Set the requested power state 68 SetPowerRequest(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error) 69 // Set a requested output state 70 SetOutputRequest(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error) 71 // Set a requested switch state 72 SetSwitchRequest(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error) 73 // Set a requested device discovery state 74 SetDeviceDiscoveryRequest(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error) 75 } 76 77 type localWorkerServiceClient struct { 78 cc *grpc.ClientConn 79 } 80 81 func NewLocalWorkerServiceClient(cc *grpc.ClientConn) LocalWorkerServiceClient { 82 return &localWorkerServiceClient{cc} 83 } 84 85 func (c *localWorkerServiceClient) Reset(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*Empty, error) { 86 out := new(Empty) 87 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/Reset", in, out, opts...) 88 if err != nil { 89 return nil, err 90 } 91 return out, nil 92 } 93 94 func (c *localWorkerServiceClient) SetLocRequest(ctx context.Context, in *Loc, opts ...grpc.CallOption) (*Empty, error) { 95 out := new(Empty) 96 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/SetLocRequest", in, out, opts...) 97 if err != nil { 98 return nil, err 99 } 100 return out, nil 101 } 102 103 func (c *localWorkerServiceClient) SetPowerRequest(ctx context.Context, in *PowerState, opts ...grpc.CallOption) (*Empty, error) { 104 out := new(Empty) 105 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/SetPowerRequest", in, out, opts...) 106 if err != nil { 107 return nil, err 108 } 109 return out, nil 110 } 111 112 func (c *localWorkerServiceClient) SetOutputRequest(ctx context.Context, in *Output, opts ...grpc.CallOption) (*Empty, error) { 113 out := new(Empty) 114 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/SetOutputRequest", in, out, opts...) 115 if err != nil { 116 return nil, err 117 } 118 return out, nil 119 } 120 121 func (c *localWorkerServiceClient) SetSwitchRequest(ctx context.Context, in *Switch, opts ...grpc.CallOption) (*Empty, error) { 122 out := new(Empty) 123 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/SetSwitchRequest", in, out, opts...) 124 if err != nil { 125 return nil, err 126 } 127 return out, nil 128 } 129 130 func (c *localWorkerServiceClient) SetDeviceDiscoveryRequest(ctx context.Context, in *DeviceDiscovery, opts ...grpc.CallOption) (*Empty, error) { 131 out := new(Empty) 132 err := c.cc.Invoke(ctx, "/binkynet.v1.LocalWorkerService/SetDeviceDiscoveryRequest", in, out, opts...) 133 if err != nil { 134 return nil, err 135 } 136 return out, nil 137 } 138 139 // LocalWorkerServiceServer is the server API for LocalWorkerService service. 140 type LocalWorkerServiceServer interface { 141 // Reset the local worker 142 Reset(context.Context, *Empty) (*Empty, error) 143 // Set a requested loc state 144 SetLocRequest(context.Context, *Loc) (*Empty, error) 145 // Set the requested power state 146 SetPowerRequest(context.Context, *PowerState) (*Empty, error) 147 // Set a requested output state 148 SetOutputRequest(context.Context, *Output) (*Empty, error) 149 // Set a requested switch state 150 SetSwitchRequest(context.Context, *Switch) (*Empty, error) 151 // Set a requested device discovery state 152 SetDeviceDiscoveryRequest(context.Context, *DeviceDiscovery) (*Empty, error) 153 } 154 155 // UnimplementedLocalWorkerServiceServer can be embedded to have forward compatible implementations. 156 type UnimplementedLocalWorkerServiceServer struct { 157 } 158 159 func (*UnimplementedLocalWorkerServiceServer) Reset(ctx context.Context, req *Empty) (*Empty, error) { 160 return nil, status.Errorf(codes.Unimplemented, "method Reset not implemented") 161 } 162 func (*UnimplementedLocalWorkerServiceServer) SetLocRequest(ctx context.Context, req *Loc) (*Empty, error) { 163 return nil, status.Errorf(codes.Unimplemented, "method SetLocRequest not implemented") 164 } 165 func (*UnimplementedLocalWorkerServiceServer) SetPowerRequest(ctx context.Context, req *PowerState) (*Empty, error) { 166 return nil, status.Errorf(codes.Unimplemented, "method SetPowerRequest not implemented") 167 } 168 func (*UnimplementedLocalWorkerServiceServer) SetOutputRequest(ctx context.Context, req *Output) (*Empty, error) { 169 return nil, status.Errorf(codes.Unimplemented, "method SetOutputRequest not implemented") 170 } 171 func (*UnimplementedLocalWorkerServiceServer) SetSwitchRequest(ctx context.Context, req *Switch) (*Empty, error) { 172 return nil, status.Errorf(codes.Unimplemented, "method SetSwitchRequest not implemented") 173 } 174 func (*UnimplementedLocalWorkerServiceServer) SetDeviceDiscoveryRequest(ctx context.Context, req *DeviceDiscovery) (*Empty, error) { 175 return nil, status.Errorf(codes.Unimplemented, "method SetDeviceDiscoveryRequest not implemented") 176 } 177 178 func RegisterLocalWorkerServiceServer(s *grpc.Server, srv LocalWorkerServiceServer) { 179 s.RegisterService(&_LocalWorkerService_serviceDesc, srv) 180 } 181 182 func _LocalWorkerService_Reset_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 183 in := new(Empty) 184 if err := dec(in); err != nil { 185 return nil, err 186 } 187 if interceptor == nil { 188 return srv.(LocalWorkerServiceServer).Reset(ctx, in) 189 } 190 info := &grpc.UnaryServerInfo{ 191 Server: srv, 192 FullMethod: "/binkynet.v1.LocalWorkerService/Reset", 193 } 194 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 195 return srv.(LocalWorkerServiceServer).Reset(ctx, req.(*Empty)) 196 } 197 return interceptor(ctx, in, info, handler) 198 } 199 200 func _LocalWorkerService_SetLocRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 201 in := new(Loc) 202 if err := dec(in); err != nil { 203 return nil, err 204 } 205 if interceptor == nil { 206 return srv.(LocalWorkerServiceServer).SetLocRequest(ctx, in) 207 } 208 info := &grpc.UnaryServerInfo{ 209 Server: srv, 210 FullMethod: "/binkynet.v1.LocalWorkerService/SetLocRequest", 211 } 212 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 213 return srv.(LocalWorkerServiceServer).SetLocRequest(ctx, req.(*Loc)) 214 } 215 return interceptor(ctx, in, info, handler) 216 } 217 218 func _LocalWorkerService_SetPowerRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 219 in := new(PowerState) 220 if err := dec(in); err != nil { 221 return nil, err 222 } 223 if interceptor == nil { 224 return srv.(LocalWorkerServiceServer).SetPowerRequest(ctx, in) 225 } 226 info := &grpc.UnaryServerInfo{ 227 Server: srv, 228 FullMethod: "/binkynet.v1.LocalWorkerService/SetPowerRequest", 229 } 230 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 231 return srv.(LocalWorkerServiceServer).SetPowerRequest(ctx, req.(*PowerState)) 232 } 233 return interceptor(ctx, in, info, handler) 234 } 235 236 func _LocalWorkerService_SetOutputRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 237 in := new(Output) 238 if err := dec(in); err != nil { 239 return nil, err 240 } 241 if interceptor == nil { 242 return srv.(LocalWorkerServiceServer).SetOutputRequest(ctx, in) 243 } 244 info := &grpc.UnaryServerInfo{ 245 Server: srv, 246 FullMethod: "/binkynet.v1.LocalWorkerService/SetOutputRequest", 247 } 248 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 249 return srv.(LocalWorkerServiceServer).SetOutputRequest(ctx, req.(*Output)) 250 } 251 return interceptor(ctx, in, info, handler) 252 } 253 254 func _LocalWorkerService_SetSwitchRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 255 in := new(Switch) 256 if err := dec(in); err != nil { 257 return nil, err 258 } 259 if interceptor == nil { 260 return srv.(LocalWorkerServiceServer).SetSwitchRequest(ctx, in) 261 } 262 info := &grpc.UnaryServerInfo{ 263 Server: srv, 264 FullMethod: "/binkynet.v1.LocalWorkerService/SetSwitchRequest", 265 } 266 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 267 return srv.(LocalWorkerServiceServer).SetSwitchRequest(ctx, req.(*Switch)) 268 } 269 return interceptor(ctx, in, info, handler) 270 } 271 272 func _LocalWorkerService_SetDeviceDiscoveryRequest_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 273 in := new(DeviceDiscovery) 274 if err := dec(in); err != nil { 275 return nil, err 276 } 277 if interceptor == nil { 278 return srv.(LocalWorkerServiceServer).SetDeviceDiscoveryRequest(ctx, in) 279 } 280 info := &grpc.UnaryServerInfo{ 281 Server: srv, 282 FullMethod: "/binkynet.v1.LocalWorkerService/SetDeviceDiscoveryRequest", 283 } 284 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 285 return srv.(LocalWorkerServiceServer).SetDeviceDiscoveryRequest(ctx, req.(*DeviceDiscovery)) 286 } 287 return interceptor(ctx, in, info, handler) 288 } 289 290 var _LocalWorkerService_serviceDesc = grpc.ServiceDesc{ 291 ServiceName: "binkynet.v1.LocalWorkerService", 292 HandlerType: (*LocalWorkerServiceServer)(nil), 293 Methods: []grpc.MethodDesc{ 294 { 295 MethodName: "Reset", 296 Handler: _LocalWorkerService_Reset_Handler, 297 }, 298 { 299 MethodName: "SetLocRequest", 300 Handler: _LocalWorkerService_SetLocRequest_Handler, 301 }, 302 { 303 MethodName: "SetPowerRequest", 304 Handler: _LocalWorkerService_SetPowerRequest_Handler, 305 }, 306 { 307 MethodName: "SetOutputRequest", 308 Handler: _LocalWorkerService_SetOutputRequest_Handler, 309 }, 310 { 311 MethodName: "SetSwitchRequest", 312 Handler: _LocalWorkerService_SetSwitchRequest_Handler, 313 }, 314 { 315 MethodName: "SetDeviceDiscoveryRequest", 316 Handler: _LocalWorkerService_SetDeviceDiscoveryRequest_Handler, 317 }, 318 }, 319 Streams: []grpc.StreamDesc{}, 320 Metadata: "localworker.proto", 321 }