github.com/authzed/spicedb@v1.32.1-0.20240520085336-ebda56537386/pkg/proto/dispatch/v1/dispatch_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc (unknown) 5 // source: dispatch/v1/dispatch.proto 6 7 package dispatchv1 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 const ( 22 DispatchService_DispatchCheck_FullMethodName = "/dispatch.v1.DispatchService/DispatchCheck" 23 DispatchService_DispatchExpand_FullMethodName = "/dispatch.v1.DispatchService/DispatchExpand" 24 DispatchService_DispatchReachableResources_FullMethodName = "/dispatch.v1.DispatchService/DispatchReachableResources" 25 DispatchService_DispatchLookupResources_FullMethodName = "/dispatch.v1.DispatchService/DispatchLookupResources" 26 DispatchService_DispatchLookupSubjects_FullMethodName = "/dispatch.v1.DispatchService/DispatchLookupSubjects" 27 ) 28 29 // DispatchServiceClient is the client API for DispatchService service. 30 // 31 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. 32 type DispatchServiceClient interface { 33 DispatchCheck(ctx context.Context, in *DispatchCheckRequest, opts ...grpc.CallOption) (*DispatchCheckResponse, error) 34 DispatchExpand(ctx context.Context, in *DispatchExpandRequest, opts ...grpc.CallOption) (*DispatchExpandResponse, error) 35 DispatchReachableResources(ctx context.Context, in *DispatchReachableResourcesRequest, opts ...grpc.CallOption) (DispatchService_DispatchReachableResourcesClient, error) 36 DispatchLookupResources(ctx context.Context, in *DispatchLookupResourcesRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupResourcesClient, error) 37 DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupSubjectsClient, error) 38 } 39 40 type dispatchServiceClient struct { 41 cc grpc.ClientConnInterface 42 } 43 44 func NewDispatchServiceClient(cc grpc.ClientConnInterface) DispatchServiceClient { 45 return &dispatchServiceClient{cc} 46 } 47 48 func (c *dispatchServiceClient) DispatchCheck(ctx context.Context, in *DispatchCheckRequest, opts ...grpc.CallOption) (*DispatchCheckResponse, error) { 49 out := new(DispatchCheckResponse) 50 err := c.cc.Invoke(ctx, DispatchService_DispatchCheck_FullMethodName, in, out, opts...) 51 if err != nil { 52 return nil, err 53 } 54 return out, nil 55 } 56 57 func (c *dispatchServiceClient) DispatchExpand(ctx context.Context, in *DispatchExpandRequest, opts ...grpc.CallOption) (*DispatchExpandResponse, error) { 58 out := new(DispatchExpandResponse) 59 err := c.cc.Invoke(ctx, DispatchService_DispatchExpand_FullMethodName, in, out, opts...) 60 if err != nil { 61 return nil, err 62 } 63 return out, nil 64 } 65 66 func (c *dispatchServiceClient) DispatchReachableResources(ctx context.Context, in *DispatchReachableResourcesRequest, opts ...grpc.CallOption) (DispatchService_DispatchReachableResourcesClient, error) { 67 stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[0], DispatchService_DispatchReachableResources_FullMethodName, opts...) 68 if err != nil { 69 return nil, err 70 } 71 x := &dispatchServiceDispatchReachableResourcesClient{stream} 72 if err := x.ClientStream.SendMsg(in); err != nil { 73 return nil, err 74 } 75 if err := x.ClientStream.CloseSend(); err != nil { 76 return nil, err 77 } 78 return x, nil 79 } 80 81 type DispatchService_DispatchReachableResourcesClient interface { 82 Recv() (*DispatchReachableResourcesResponse, error) 83 grpc.ClientStream 84 } 85 86 type dispatchServiceDispatchReachableResourcesClient struct { 87 grpc.ClientStream 88 } 89 90 func (x *dispatchServiceDispatchReachableResourcesClient) Recv() (*DispatchReachableResourcesResponse, error) { 91 m := new(DispatchReachableResourcesResponse) 92 if err := x.ClientStream.RecvMsg(m); err != nil { 93 return nil, err 94 } 95 return m, nil 96 } 97 98 func (c *dispatchServiceClient) DispatchLookupResources(ctx context.Context, in *DispatchLookupResourcesRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupResourcesClient, error) { 99 stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[1], DispatchService_DispatchLookupResources_FullMethodName, opts...) 100 if err != nil { 101 return nil, err 102 } 103 x := &dispatchServiceDispatchLookupResourcesClient{stream} 104 if err := x.ClientStream.SendMsg(in); err != nil { 105 return nil, err 106 } 107 if err := x.ClientStream.CloseSend(); err != nil { 108 return nil, err 109 } 110 return x, nil 111 } 112 113 type DispatchService_DispatchLookupResourcesClient interface { 114 Recv() (*DispatchLookupResourcesResponse, error) 115 grpc.ClientStream 116 } 117 118 type dispatchServiceDispatchLookupResourcesClient struct { 119 grpc.ClientStream 120 } 121 122 func (x *dispatchServiceDispatchLookupResourcesClient) Recv() (*DispatchLookupResourcesResponse, error) { 123 m := new(DispatchLookupResourcesResponse) 124 if err := x.ClientStream.RecvMsg(m); err != nil { 125 return nil, err 126 } 127 return m, nil 128 } 129 130 func (c *dispatchServiceClient) DispatchLookupSubjects(ctx context.Context, in *DispatchLookupSubjectsRequest, opts ...grpc.CallOption) (DispatchService_DispatchLookupSubjectsClient, error) { 131 stream, err := c.cc.NewStream(ctx, &DispatchService_ServiceDesc.Streams[2], DispatchService_DispatchLookupSubjects_FullMethodName, opts...) 132 if err != nil { 133 return nil, err 134 } 135 x := &dispatchServiceDispatchLookupSubjectsClient{stream} 136 if err := x.ClientStream.SendMsg(in); err != nil { 137 return nil, err 138 } 139 if err := x.ClientStream.CloseSend(); err != nil { 140 return nil, err 141 } 142 return x, nil 143 } 144 145 type DispatchService_DispatchLookupSubjectsClient interface { 146 Recv() (*DispatchLookupSubjectsResponse, error) 147 grpc.ClientStream 148 } 149 150 type dispatchServiceDispatchLookupSubjectsClient struct { 151 grpc.ClientStream 152 } 153 154 func (x *dispatchServiceDispatchLookupSubjectsClient) Recv() (*DispatchLookupSubjectsResponse, error) { 155 m := new(DispatchLookupSubjectsResponse) 156 if err := x.ClientStream.RecvMsg(m); err != nil { 157 return nil, err 158 } 159 return m, nil 160 } 161 162 // DispatchServiceServer is the server API for DispatchService service. 163 // All implementations must embed UnimplementedDispatchServiceServer 164 // for forward compatibility 165 type DispatchServiceServer interface { 166 DispatchCheck(context.Context, *DispatchCheckRequest) (*DispatchCheckResponse, error) 167 DispatchExpand(context.Context, *DispatchExpandRequest) (*DispatchExpandResponse, error) 168 DispatchReachableResources(*DispatchReachableResourcesRequest, DispatchService_DispatchReachableResourcesServer) error 169 DispatchLookupResources(*DispatchLookupResourcesRequest, DispatchService_DispatchLookupResourcesServer) error 170 DispatchLookupSubjects(*DispatchLookupSubjectsRequest, DispatchService_DispatchLookupSubjectsServer) error 171 mustEmbedUnimplementedDispatchServiceServer() 172 } 173 174 // UnimplementedDispatchServiceServer must be embedded to have forward compatible implementations. 175 type UnimplementedDispatchServiceServer struct { 176 } 177 178 func (UnimplementedDispatchServiceServer) DispatchCheck(context.Context, *DispatchCheckRequest) (*DispatchCheckResponse, error) { 179 return nil, status.Errorf(codes.Unimplemented, "method DispatchCheck not implemented") 180 } 181 func (UnimplementedDispatchServiceServer) DispatchExpand(context.Context, *DispatchExpandRequest) (*DispatchExpandResponse, error) { 182 return nil, status.Errorf(codes.Unimplemented, "method DispatchExpand not implemented") 183 } 184 func (UnimplementedDispatchServiceServer) DispatchReachableResources(*DispatchReachableResourcesRequest, DispatchService_DispatchReachableResourcesServer) error { 185 return status.Errorf(codes.Unimplemented, "method DispatchReachableResources not implemented") 186 } 187 func (UnimplementedDispatchServiceServer) DispatchLookupResources(*DispatchLookupResourcesRequest, DispatchService_DispatchLookupResourcesServer) error { 188 return status.Errorf(codes.Unimplemented, "method DispatchLookupResources not implemented") 189 } 190 func (UnimplementedDispatchServiceServer) DispatchLookupSubjects(*DispatchLookupSubjectsRequest, DispatchService_DispatchLookupSubjectsServer) error { 191 return status.Errorf(codes.Unimplemented, "method DispatchLookupSubjects not implemented") 192 } 193 func (UnimplementedDispatchServiceServer) mustEmbedUnimplementedDispatchServiceServer() {} 194 195 // UnsafeDispatchServiceServer may be embedded to opt out of forward compatibility for this service. 196 // Use of this interface is not recommended, as added methods to DispatchServiceServer will 197 // result in compilation errors. 198 type UnsafeDispatchServiceServer interface { 199 mustEmbedUnimplementedDispatchServiceServer() 200 } 201 202 func RegisterDispatchServiceServer(s grpc.ServiceRegistrar, srv DispatchServiceServer) { 203 s.RegisterService(&DispatchService_ServiceDesc, srv) 204 } 205 206 func _DispatchService_DispatchCheck_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 207 in := new(DispatchCheckRequest) 208 if err := dec(in); err != nil { 209 return nil, err 210 } 211 if interceptor == nil { 212 return srv.(DispatchServiceServer).DispatchCheck(ctx, in) 213 } 214 info := &grpc.UnaryServerInfo{ 215 Server: srv, 216 FullMethod: DispatchService_DispatchCheck_FullMethodName, 217 } 218 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 219 return srv.(DispatchServiceServer).DispatchCheck(ctx, req.(*DispatchCheckRequest)) 220 } 221 return interceptor(ctx, in, info, handler) 222 } 223 224 func _DispatchService_DispatchExpand_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 225 in := new(DispatchExpandRequest) 226 if err := dec(in); err != nil { 227 return nil, err 228 } 229 if interceptor == nil { 230 return srv.(DispatchServiceServer).DispatchExpand(ctx, in) 231 } 232 info := &grpc.UnaryServerInfo{ 233 Server: srv, 234 FullMethod: DispatchService_DispatchExpand_FullMethodName, 235 } 236 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 237 return srv.(DispatchServiceServer).DispatchExpand(ctx, req.(*DispatchExpandRequest)) 238 } 239 return interceptor(ctx, in, info, handler) 240 } 241 242 func _DispatchService_DispatchReachableResources_Handler(srv interface{}, stream grpc.ServerStream) error { 243 m := new(DispatchReachableResourcesRequest) 244 if err := stream.RecvMsg(m); err != nil { 245 return err 246 } 247 return srv.(DispatchServiceServer).DispatchReachableResources(m, &dispatchServiceDispatchReachableResourcesServer{stream}) 248 } 249 250 type DispatchService_DispatchReachableResourcesServer interface { 251 Send(*DispatchReachableResourcesResponse) error 252 grpc.ServerStream 253 } 254 255 type dispatchServiceDispatchReachableResourcesServer struct { 256 grpc.ServerStream 257 } 258 259 func (x *dispatchServiceDispatchReachableResourcesServer) Send(m *DispatchReachableResourcesResponse) error { 260 return x.ServerStream.SendMsg(m) 261 } 262 263 func _DispatchService_DispatchLookupResources_Handler(srv interface{}, stream grpc.ServerStream) error { 264 m := new(DispatchLookupResourcesRequest) 265 if err := stream.RecvMsg(m); err != nil { 266 return err 267 } 268 return srv.(DispatchServiceServer).DispatchLookupResources(m, &dispatchServiceDispatchLookupResourcesServer{stream}) 269 } 270 271 type DispatchService_DispatchLookupResourcesServer interface { 272 Send(*DispatchLookupResourcesResponse) error 273 grpc.ServerStream 274 } 275 276 type dispatchServiceDispatchLookupResourcesServer struct { 277 grpc.ServerStream 278 } 279 280 func (x *dispatchServiceDispatchLookupResourcesServer) Send(m *DispatchLookupResourcesResponse) error { 281 return x.ServerStream.SendMsg(m) 282 } 283 284 func _DispatchService_DispatchLookupSubjects_Handler(srv interface{}, stream grpc.ServerStream) error { 285 m := new(DispatchLookupSubjectsRequest) 286 if err := stream.RecvMsg(m); err != nil { 287 return err 288 } 289 return srv.(DispatchServiceServer).DispatchLookupSubjects(m, &dispatchServiceDispatchLookupSubjectsServer{stream}) 290 } 291 292 type DispatchService_DispatchLookupSubjectsServer interface { 293 Send(*DispatchLookupSubjectsResponse) error 294 grpc.ServerStream 295 } 296 297 type dispatchServiceDispatchLookupSubjectsServer struct { 298 grpc.ServerStream 299 } 300 301 func (x *dispatchServiceDispatchLookupSubjectsServer) Send(m *DispatchLookupSubjectsResponse) error { 302 return x.ServerStream.SendMsg(m) 303 } 304 305 // DispatchService_ServiceDesc is the grpc.ServiceDesc for DispatchService service. 306 // It's only intended for direct use with grpc.RegisterService, 307 // and not to be introspected or modified (even as a copy) 308 var DispatchService_ServiceDesc = grpc.ServiceDesc{ 309 ServiceName: "dispatch.v1.DispatchService", 310 HandlerType: (*DispatchServiceServer)(nil), 311 Methods: []grpc.MethodDesc{ 312 { 313 MethodName: "DispatchCheck", 314 Handler: _DispatchService_DispatchCheck_Handler, 315 }, 316 { 317 MethodName: "DispatchExpand", 318 Handler: _DispatchService_DispatchExpand_Handler, 319 }, 320 }, 321 Streams: []grpc.StreamDesc{ 322 { 323 StreamName: "DispatchReachableResources", 324 Handler: _DispatchService_DispatchReachableResources_Handler, 325 ServerStreams: true, 326 }, 327 { 328 StreamName: "DispatchLookupResources", 329 Handler: _DispatchService_DispatchLookupResources_Handler, 330 ServerStreams: true, 331 }, 332 { 333 StreamName: "DispatchLookupSubjects", 334 Handler: _DispatchService_DispatchLookupSubjects_Handler, 335 ServerStreams: true, 336 }, 337 }, 338 Metadata: "dispatch/v1/dispatch.proto", 339 }