go.mondoo.com/cnquery@v0.0.0-20231005093811-59568235f6ea/shared/proto/cnquery_grpc.pb.go (about)

     1  // Copyright (c) Mondoo, Inc.
     2  // SPDX-License-Identifier: BUSL-1.1
     3  
     4  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     5  // versions:
     6  // - protoc-gen-go-grpc v1.3.0
     7  // - protoc             v4.24.3
     8  // source: cnquery.proto
     9  
    10  package proto
    11  
    12  import (
    13  	context "context"
    14  	grpc "google.golang.org/grpc"
    15  	codes "google.golang.org/grpc/codes"
    16  	status "google.golang.org/grpc/status"
    17  )
    18  
    19  // This is a compile-time assertion to ensure that this generated file
    20  // is compatible with the grpc package it is being compiled against.
    21  // Requires gRPC-Go v1.32.0 or later.
    22  const _ = grpc.SupportPackageIsVersion7
    23  
    24  const (
    25  	CNQuery_RunQuery_FullMethodName = "/proto.CNQuery/RunQuery"
    26  )
    27  
    28  // CNQueryClient is the client API for CNQuery service.
    29  //
    30  // 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.
    31  type CNQueryClient interface {
    32  	RunQuery(ctx context.Context, in *RunQueryConfig, opts ...grpc.CallOption) (*Empty, error)
    33  }
    34  
    35  type cNQueryClient struct {
    36  	cc grpc.ClientConnInterface
    37  }
    38  
    39  func NewCNQueryClient(cc grpc.ClientConnInterface) CNQueryClient {
    40  	return &cNQueryClient{cc}
    41  }
    42  
    43  func (c *cNQueryClient) RunQuery(ctx context.Context, in *RunQueryConfig, opts ...grpc.CallOption) (*Empty, error) {
    44  	out := new(Empty)
    45  	err := c.cc.Invoke(ctx, CNQuery_RunQuery_FullMethodName, in, out, opts...)
    46  	if err != nil {
    47  		return nil, err
    48  	}
    49  	return out, nil
    50  }
    51  
    52  // CNQueryServer is the server API for CNQuery service.
    53  // All implementations must embed UnimplementedCNQueryServer
    54  // for forward compatibility
    55  type CNQueryServer interface {
    56  	RunQuery(context.Context, *RunQueryConfig) (*Empty, error)
    57  	mustEmbedUnimplementedCNQueryServer()
    58  }
    59  
    60  // UnimplementedCNQueryServer must be embedded to have forward compatible implementations.
    61  type UnimplementedCNQueryServer struct {
    62  }
    63  
    64  func (UnimplementedCNQueryServer) RunQuery(context.Context, *RunQueryConfig) (*Empty, error) {
    65  	return nil, status.Errorf(codes.Unimplemented, "method RunQuery not implemented")
    66  }
    67  func (UnimplementedCNQueryServer) mustEmbedUnimplementedCNQueryServer() {}
    68  
    69  // UnsafeCNQueryServer may be embedded to opt out of forward compatibility for this service.
    70  // Use of this interface is not recommended, as added methods to CNQueryServer will
    71  // result in compilation errors.
    72  type UnsafeCNQueryServer interface {
    73  	mustEmbedUnimplementedCNQueryServer()
    74  }
    75  
    76  func RegisterCNQueryServer(s grpc.ServiceRegistrar, srv CNQueryServer) {
    77  	s.RegisterService(&CNQuery_ServiceDesc, srv)
    78  }
    79  
    80  func _CNQuery_RunQuery_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    81  	in := new(RunQueryConfig)
    82  	if err := dec(in); err != nil {
    83  		return nil, err
    84  	}
    85  	if interceptor == nil {
    86  		return srv.(CNQueryServer).RunQuery(ctx, in)
    87  	}
    88  	info := &grpc.UnaryServerInfo{
    89  		Server:     srv,
    90  		FullMethod: CNQuery_RunQuery_FullMethodName,
    91  	}
    92  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
    93  		return srv.(CNQueryServer).RunQuery(ctx, req.(*RunQueryConfig))
    94  	}
    95  	return interceptor(ctx, in, info, handler)
    96  }
    97  
    98  // CNQuery_ServiceDesc is the grpc.ServiceDesc for CNQuery service.
    99  // It's only intended for direct use with grpc.RegisterService,
   100  // and not to be introspected or modified (even as a copy)
   101  var CNQuery_ServiceDesc = grpc.ServiceDesc{
   102  	ServiceName: "proto.CNQuery",
   103  	HandlerType: (*CNQueryServer)(nil),
   104  	Methods: []grpc.MethodDesc{
   105  		{
   106  			MethodName: "RunQuery",
   107  			Handler:    _CNQuery_RunQuery_Handler,
   108  		},
   109  	},
   110  	Streams:  []grpc.StreamDesc{},
   111  	Metadata: "cnquery.proto",
   112  }
   113  
   114  const (
   115  	OutputHelper_Write_FullMethodName = "/proto.OutputHelper/Write"
   116  )
   117  
   118  // OutputHelperClient is the client API for OutputHelper service.
   119  //
   120  // 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.
   121  type OutputHelperClient interface {
   122  	Write(ctx context.Context, in *String, opts ...grpc.CallOption) (*Empty, error)
   123  }
   124  
   125  type outputHelperClient struct {
   126  	cc grpc.ClientConnInterface
   127  }
   128  
   129  func NewOutputHelperClient(cc grpc.ClientConnInterface) OutputHelperClient {
   130  	return &outputHelperClient{cc}
   131  }
   132  
   133  func (c *outputHelperClient) Write(ctx context.Context, in *String, opts ...grpc.CallOption) (*Empty, error) {
   134  	out := new(Empty)
   135  	err := c.cc.Invoke(ctx, OutputHelper_Write_FullMethodName, in, out, opts...)
   136  	if err != nil {
   137  		return nil, err
   138  	}
   139  	return out, nil
   140  }
   141  
   142  // OutputHelperServer is the server API for OutputHelper service.
   143  // All implementations must embed UnimplementedOutputHelperServer
   144  // for forward compatibility
   145  type OutputHelperServer interface {
   146  	Write(context.Context, *String) (*Empty, error)
   147  	mustEmbedUnimplementedOutputHelperServer()
   148  }
   149  
   150  // UnimplementedOutputHelperServer must be embedded to have forward compatible implementations.
   151  type UnimplementedOutputHelperServer struct {
   152  }
   153  
   154  func (UnimplementedOutputHelperServer) Write(context.Context, *String) (*Empty, error) {
   155  	return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
   156  }
   157  func (UnimplementedOutputHelperServer) mustEmbedUnimplementedOutputHelperServer() {}
   158  
   159  // UnsafeOutputHelperServer may be embedded to opt out of forward compatibility for this service.
   160  // Use of this interface is not recommended, as added methods to OutputHelperServer will
   161  // result in compilation errors.
   162  type UnsafeOutputHelperServer interface {
   163  	mustEmbedUnimplementedOutputHelperServer()
   164  }
   165  
   166  func RegisterOutputHelperServer(s grpc.ServiceRegistrar, srv OutputHelperServer) {
   167  	s.RegisterService(&OutputHelper_ServiceDesc, srv)
   168  }
   169  
   170  func _OutputHelper_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   171  	in := new(String)
   172  	if err := dec(in); err != nil {
   173  		return nil, err
   174  	}
   175  	if interceptor == nil {
   176  		return srv.(OutputHelperServer).Write(ctx, in)
   177  	}
   178  	info := &grpc.UnaryServerInfo{
   179  		Server:     srv,
   180  		FullMethod: OutputHelper_Write_FullMethodName,
   181  	}
   182  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   183  		return srv.(OutputHelperServer).Write(ctx, req.(*String))
   184  	}
   185  	return interceptor(ctx, in, info, handler)
   186  }
   187  
   188  // OutputHelper_ServiceDesc is the grpc.ServiceDesc for OutputHelper service.
   189  // It's only intended for direct use with grpc.RegisterService,
   190  // and not to be introspected or modified (even as a copy)
   191  var OutputHelper_ServiceDesc = grpc.ServiceDesc{
   192  	ServiceName: "proto.OutputHelper",
   193  	HandlerType: (*OutputHelperServer)(nil),
   194  	Methods: []grpc.MethodDesc{
   195  		{
   196  			MethodName: "Write",
   197  			Handler:    _OutputHelper_Write_Handler,
   198  		},
   199  	},
   200  	Streams:  []grpc.StreamDesc{},
   201  	Metadata: "cnquery.proto",
   202  }