// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.5.1 // - protoc v6.31.0 // source: dr_protocol_idl.proto package dr_protocol_pb 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 ( Basic_SoftwareInfo_FullMethodName = "/dr.protocol.Basic/SoftwareInfo" ) // BasicClient is the client API for Basic 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 BasicClient interface { SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error) } type basicClient struct { cc grpc.ClientConnInterface } func NewBasicClient(cc grpc.ClientConnInterface) BasicClient { return &basicClient{cc} } func (c *basicClient) SoftwareInfo(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*SoftwareInfoReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(SoftwareInfoReply) err := c.cc.Invoke(ctx, Basic_SoftwareInfo_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // BasicServer is the server API for Basic service. // All implementations must embed UnimplementedBasicServer // for forward compatibility. type BasicServer interface { SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) mustEmbedUnimplementedBasicServer() } // UnimplementedBasicServer 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 UnimplementedBasicServer struct{} func (UnimplementedBasicServer) SoftwareInfo(context.Context, *EmptyRequest) (*SoftwareInfoReply, error) { return nil, status.Errorf(codes.Unimplemented, "method SoftwareInfo not implemented") } func (UnimplementedBasicServer) mustEmbedUnimplementedBasicServer() {} func (UnimplementedBasicServer) testEmbeddedByValue() {} // UnsafeBasicServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to BasicServer will // result in compilation errors. type UnsafeBasicServer interface { mustEmbedUnimplementedBasicServer() } func RegisterBasicServer(s grpc.ServiceRegistrar, srv BasicServer) { // If the following call pancis, it indicates UnimplementedBasicServer 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(&Basic_ServiceDesc, srv) } func _Basic_SoftwareInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(BasicServer).SoftwareInfo(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Basic_SoftwareInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(BasicServer).SoftwareInfo(ctx, req.(*EmptyRequest)) } return interceptor(ctx, in, info, handler) } // Basic_ServiceDesc is the grpc.ServiceDesc for Basic service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Basic_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dr.protocol.Basic", HandlerType: (*BasicServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "SoftwareInfo", Handler: _Basic_SoftwareInfo_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dr_protocol_idl.proto", } const ( Protocol_GetPatientType_FullMethodName = "/dr.protocol.Protocol/GetPatientType" Protocol_GetBodyPart_FullMethodName = "/dr.protocol.Protocol/GetBodyPart" Protocol_GetProcedure_FullMethodName = "/dr.protocol.Protocol/GetProcedure" Protocol_GetView_FullMethodName = "/dr.protocol.Protocol/GetView" ) // ProtocolClient is the client API for Protocol 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 ProtocolClient interface { GetPatientType(ctx context.Context, in *PatientTypeRequest, opts ...grpc.CallOption) (*PatientTypeReply, error) GetBodyPart(ctx context.Context, in *BodyPartRequest, opts ...grpc.CallOption) (*BodyPartReply, error) GetProcedure(ctx context.Context, in *ProcedureRequest, opts ...grpc.CallOption) (*ProcedureReply, error) GetView(ctx context.Context, in *ViewRequest, opts ...grpc.CallOption) (*ViewReply, error) } type protocolClient struct { cc grpc.ClientConnInterface } func NewProtocolClient(cc grpc.ClientConnInterface) ProtocolClient { return &protocolClient{cc} } func (c *protocolClient) GetPatientType(ctx context.Context, in *PatientTypeRequest, opts ...grpc.CallOption) (*PatientTypeReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(PatientTypeReply) err := c.cc.Invoke(ctx, Protocol_GetPatientType_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *protocolClient) GetBodyPart(ctx context.Context, in *BodyPartRequest, opts ...grpc.CallOption) (*BodyPartReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(BodyPartReply) err := c.cc.Invoke(ctx, Protocol_GetBodyPart_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *protocolClient) GetProcedure(ctx context.Context, in *ProcedureRequest, opts ...grpc.CallOption) (*ProcedureReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ProcedureReply) err := c.cc.Invoke(ctx, Protocol_GetProcedure_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *protocolClient) GetView(ctx context.Context, in *ViewRequest, opts ...grpc.CallOption) (*ViewReply, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(ViewReply) err := c.cc.Invoke(ctx, Protocol_GetView_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // ProtocolServer is the server API for Protocol service. // All implementations must embed UnimplementedProtocolServer // for forward compatibility. type ProtocolServer interface { GetPatientType(context.Context, *PatientTypeRequest) (*PatientTypeReply, error) GetBodyPart(context.Context, *BodyPartRequest) (*BodyPartReply, error) GetProcedure(context.Context, *ProcedureRequest) (*ProcedureReply, error) GetView(context.Context, *ViewRequest) (*ViewReply, error) mustEmbedUnimplementedProtocolServer() } // UnimplementedProtocolServer 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 UnimplementedProtocolServer struct{} func (UnimplementedProtocolServer) GetPatientType(context.Context, *PatientTypeRequest) (*PatientTypeReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetPatientType not implemented") } func (UnimplementedProtocolServer) GetBodyPart(context.Context, *BodyPartRequest) (*BodyPartReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetBodyPart not implemented") } func (UnimplementedProtocolServer) GetProcedure(context.Context, *ProcedureRequest) (*ProcedureReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetProcedure not implemented") } func (UnimplementedProtocolServer) GetView(context.Context, *ViewRequest) (*ViewReply, error) { return nil, status.Errorf(codes.Unimplemented, "method GetView not implemented") } func (UnimplementedProtocolServer) mustEmbedUnimplementedProtocolServer() {} func (UnimplementedProtocolServer) testEmbeddedByValue() {} // UnsafeProtocolServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ProtocolServer will // result in compilation errors. type UnsafeProtocolServer interface { mustEmbedUnimplementedProtocolServer() } func RegisterProtocolServer(s grpc.ServiceRegistrar, srv ProtocolServer) { // If the following call pancis, it indicates UnimplementedProtocolServer 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(&Protocol_ServiceDesc, srv) } func _Protocol_GetPatientType_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(PatientTypeRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProtocolServer).GetPatientType(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Protocol_GetPatientType_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProtocolServer).GetPatientType(ctx, req.(*PatientTypeRequest)) } return interceptor(ctx, in, info, handler) } func _Protocol_GetBodyPart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(BodyPartRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProtocolServer).GetBodyPart(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Protocol_GetBodyPart_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProtocolServer).GetBodyPart(ctx, req.(*BodyPartRequest)) } return interceptor(ctx, in, info, handler) } func _Protocol_GetProcedure_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ProcedureRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProtocolServer).GetProcedure(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Protocol_GetProcedure_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProtocolServer).GetProcedure(ctx, req.(*ProcedureRequest)) } return interceptor(ctx, in, info, handler) } func _Protocol_GetView_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ViewRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(ProtocolServer).GetView(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: Protocol_GetView_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ProtocolServer).GetView(ctx, req.(*ViewRequest)) } return interceptor(ctx, in, info, handler) } // Protocol_ServiceDesc is the grpc.ServiceDesc for Protocol service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var Protocol_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dr.protocol.Protocol", HandlerType: (*ProtocolServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetPatientType", Handler: _Protocol_GetPatientType_Handler, }, { MethodName: "GetBodyPart", Handler: _Protocol_GetBodyPart_Handler, }, { MethodName: "GetProcedure", Handler: _Protocol_GetProcedure_Handler, }, { MethodName: "GetView", Handler: _Protocol_GetView_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "dr_protocol_idl.proto", }