123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.5.1
- // - protoc v6.31.0
- // source: dr_study_idl.proto
- package dr_study_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.study.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.study.Basic",
- HandlerType: (*BasicServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "SoftwareInfo",
- Handler: _Basic_SoftwareInfo_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "dr_study_idl.proto",
- }
- const (
- Study_CreateStudy_FullMethodName = "/dr.study.Study/CreateStudy"
- )
- // StudyClient is the client API for Study 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 StudyClient interface {
- CreateStudy(ctx context.Context, in *DicomStudy, opts ...grpc.CallOption) (*DicomStudy, error)
- }
- type studyClient struct {
- cc grpc.ClientConnInterface
- }
- func NewStudyClient(cc grpc.ClientConnInterface) StudyClient {
- return &studyClient{cc}
- }
- func (c *studyClient) CreateStudy(ctx context.Context, in *DicomStudy, opts ...grpc.CallOption) (*DicomStudy, error) {
- cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...)
- out := new(DicomStudy)
- err := c.cc.Invoke(ctx, Study_CreateStudy_FullMethodName, in, out, cOpts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // StudyServer is the server API for Study service.
- // All implementations must embed UnimplementedStudyServer
- // for forward compatibility.
- type StudyServer interface {
- CreateStudy(context.Context, *DicomStudy) (*DicomStudy, error)
- mustEmbedUnimplementedStudyServer()
- }
- // UnimplementedStudyServer 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 UnimplementedStudyServer struct{}
- func (UnimplementedStudyServer) CreateStudy(context.Context, *DicomStudy) (*DicomStudy, error) {
- return nil, status.Errorf(codes.Unimplemented, "method CreateStudy not implemented")
- }
- func (UnimplementedStudyServer) mustEmbedUnimplementedStudyServer() {}
- func (UnimplementedStudyServer) testEmbeddedByValue() {}
- // UnsafeStudyServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to StudyServer will
- // result in compilation errors.
- type UnsafeStudyServer interface {
- mustEmbedUnimplementedStudyServer()
- }
- func RegisterStudyServer(s grpc.ServiceRegistrar, srv StudyServer) {
- // If the following call pancis, it indicates UnimplementedStudyServer 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(&Study_ServiceDesc, srv)
- }
- func _Study_CreateStudy_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DicomStudy)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(StudyServer).CreateStudy(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: Study_CreateStudy_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(StudyServer).CreateStudy(ctx, req.(*DicomStudy))
- }
- return interceptor(ctx, in, info, handler)
- }
- // Study_ServiceDesc is the grpc.ServiceDesc for Study service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var Study_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "dr.study.Study",
- HandlerType: (*StudyServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "CreateStudy",
- Handler: _Study_CreateStudy_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "dr_study_idl.proto",
- }
|