// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.2 // - protoc (unknown) // source: state/v1/mapping.proto package statev1 import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( MappingService_InsertMapping_FullMethodName = "/state.v1.MappingService/InsertMapping" MappingService_GetMapping_FullMethodName = "/state.v1.MappingService/GetMapping" MappingService_ListMappings_FullMethodName = "/state.v1.MappingService/ListMappings" MappingService_UpdateMapping_FullMethodName = "/state.v1.MappingService/UpdateMapping" MappingService_DeleteMapping_FullMethodName = "/state.v1.MappingService/DeleteMapping" MappingService_RecordMappingMatch_FullMethodName = "/state.v1.MappingService/RecordMappingMatch" ) // MappingServiceClient is the client API for MappingService service. // // 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. type MappingServiceClient interface { InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) // RecordMappingMatch counts one event a mapping resolved; the same // (mapping, capture) twice counts once. RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) } type mappingServiceClient struct { cc grpc.ClientConnInterface } func NewMappingServiceClient(cc grpc.ClientConnInterface) MappingServiceClient { return &mappingServiceClient{cc} } func (c *mappingServiceClient) InsertMapping(ctx context.Context, in *InsertMappingRequest, opts ...grpc.CallOption) (*InsertMappingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(InsertMappingResponse) err := c.cc.Invoke(ctx, MappingService_InsertMapping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *mappingServiceClient) GetMapping(ctx context.Context, in *GetMappingRequest, opts ...grpc.CallOption) (*GetMappingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GetMappingResponse) err := c.cc.Invoke(ctx, MappingService_GetMapping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *mappingServiceClient) ListMappings(ctx context.Context, in *ListMappingsRequest, opts ...grpc.CallOption) (*ListMappingsResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ListMappingsResponse) err := c.cc.Invoke(ctx, MappingService_ListMappings_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *mappingServiceClient) UpdateMapping(ctx context.Context, in *UpdateMappingRequest, opts ...grpc.CallOption) (*UpdateMappingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UpdateMappingResponse) err := c.cc.Invoke(ctx, MappingService_UpdateMapping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *mappingServiceClient) DeleteMapping(ctx context.Context, in *DeleteMappingRequest, opts ...grpc.CallOption) (*DeleteMappingResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(DeleteMappingResponse) err := c.cc.Invoke(ctx, MappingService_DeleteMapping_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *mappingServiceClient) RecordMappingMatch(ctx context.Context, in *RecordMappingMatchRequest, opts ...grpc.CallOption) (*RecordMappingMatchResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(RecordMappingMatchResponse) err := c.cc.Invoke(ctx, MappingService_RecordMappingMatch_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // MappingServiceServer is the server API for MappingService service. // All implementations must embed UnimplementedMappingServiceServer // for forward compatibility. type MappingServiceServer interface { InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) // RecordMappingMatch counts one event a mapping resolved; the same // (mapping, capture) twice counts once. RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) mustEmbedUnimplementedMappingServiceServer() } // UnimplementedMappingServiceServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedMappingServiceServer struct{} func (UnimplementedMappingServiceServer) InsertMapping(context.Context, *InsertMappingRequest) (*InsertMappingResponse, error) { return nil, status.Error(codes.Unimplemented, "method InsertMapping not implemented") } func (UnimplementedMappingServiceServer) GetMapping(context.Context, *GetMappingRequest) (*GetMappingResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetMapping not implemented") } func (UnimplementedMappingServiceServer) ListMappings(context.Context, *ListMappingsRequest) (*ListMappingsResponse, error) { return nil, status.Error(codes.Unimplemented, "method ListMappings not implemented") } func (UnimplementedMappingServiceServer) UpdateMapping(context.Context, *UpdateMappingRequest) (*UpdateMappingResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateMapping not implemented") } func (UnimplementedMappingServiceServer) DeleteMapping(context.Context, *DeleteMappingRequest) (*DeleteMappingResponse, error) { return nil, status.Error(codes.Unimplemented, "method DeleteMapping not implemented") } func (UnimplementedMappingServiceServer) RecordMappingMatch(context.Context, *RecordMappingMatchRequest) (*RecordMappingMatchResponse, error) { return nil, status.Error(codes.Unimplemented, "method RecordMappingMatch not implemented") } func (UnimplementedMappingServiceServer) mustEmbedUnimplementedMappingServiceServer() {} func (UnimplementedMappingServiceServer) testEmbeddedByValue() {} // UnsafeMappingServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to MappingServiceServer will // result in compilation errors. type UnsafeMappingServiceServer interface { mustEmbedUnimplementedMappingServiceServer() } func RegisterMappingServiceServer(s grpc.ServiceRegistrar, srv MappingServiceServer) { // If the following call panics, it indicates UnimplementedMappingServiceServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&MappingService_ServiceDesc, srv) } func _MappingService_InsertMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(InsertMappingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).InsertMapping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_InsertMapping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).InsertMapping(ctx, req.(*InsertMappingRequest)) } return interceptor(ctx, in, info, handler) } func _MappingService_GetMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GetMappingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).GetMapping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_GetMapping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).GetMapping(ctx, req.(*GetMappingRequest)) } return interceptor(ctx, in, info, handler) } func _MappingService_ListMappings_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ListMappingsRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).ListMappings(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_ListMappings_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).ListMappings(ctx, req.(*ListMappingsRequest)) } return interceptor(ctx, in, info, handler) } func _MappingService_UpdateMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateMappingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).UpdateMapping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_UpdateMapping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).UpdateMapping(ctx, req.(*UpdateMappingRequest)) } return interceptor(ctx, in, info, handler) } func _MappingService_DeleteMapping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(DeleteMappingRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).DeleteMapping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_DeleteMapping_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).DeleteMapping(ctx, req.(*DeleteMappingRequest)) } return interceptor(ctx, in, info, handler) } func _MappingService_RecordMappingMatch_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(RecordMappingMatchRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(MappingServiceServer).RecordMappingMatch(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: MappingService_RecordMappingMatch_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MappingServiceServer).RecordMappingMatch(ctx, req.(*RecordMappingMatchRequest)) } return interceptor(ctx, in, info, handler) } // MappingService_ServiceDesc is the grpc.ServiceDesc for MappingService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var MappingService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "state.v1.MappingService", HandlerType: (*MappingServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "InsertMapping", Handler: _MappingService_InsertMapping_Handler, }, { MethodName: "GetMapping", Handler: _MappingService_GetMapping_Handler, }, { MethodName: "ListMappings", Handler: _MappingService_ListMappings_Handler, }, { MethodName: "UpdateMapping", Handler: _MappingService_UpdateMapping_Handler, }, { MethodName: "DeleteMapping", Handler: _MappingService_DeleteMapping_Handler, }, { MethodName: "RecordMappingMatch", Handler: _MappingService_RecordMappingMatch_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "state/v1/mapping.proto", }