dubbo.apache.org/dubbo-go/v3@v3.1.1/xds/credentials/certprovider/remote/v1alpha1/ca_grpc.pb.go (about)

     1  /*
     2   * Licensed to the Apache Software Foundation (ASF) under one or more
     3   * contributor license agreements.  See the NOTICE file distributed with
     4   * this work for additional information regarding copyright ownership.
     5   * The ASF licenses this file to You under the Apache License, Version 2.0
     6   * (the "License"); you may not use this file except in compliance with
     7   * the License.  You may obtain a copy of the License at
     8   *
     9   *     http://www.apache.org/licenses/LICENSE-2.0
    10   *
    11   * Unless required by applicable law or agreed to in writing, software
    12   * distributed under the License is distributed on an "AS IS" BASIS,
    13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14   * See the License for the specific language governing permissions and
    15   * limitations under the License.
    16   */
    17  
    18  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
    19  // versions:
    20  // - protoc-gen-go-grpc v1.2.0
    21  // - protoc             (unknown)
    22  // source: security/v1alpha1/ca.proto
    23  
    24  package v1alpha1
    25  
    26  import (
    27  	context "context"
    28  )
    29  
    30  import (
    31  	grpc "google.golang.org/grpc"
    32  	codes "google.golang.org/grpc/codes"
    33  	status "google.golang.org/grpc/status"
    34  )
    35  
    36  // This is a compile-time assertion to ensure that this generated file
    37  // is compatible with the grpc package it is being compiled against.
    38  // Requires gRPC-Go v1.32.0 or later.
    39  const _ = grpc.SupportPackageIsVersion7
    40  
    41  // IstioCertificateServiceClient is the client API for IstioCertificateService service.
    42  //
    43  // 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.
    44  type IstioCertificateServiceClient interface {
    45  	// Using provided CSR, returns a signed certificate.
    46  	CreateCertificate(ctx context.Context, in *IstioCertificateRequest, opts ...grpc.CallOption) (*IstioCertificateResponse, error)
    47  }
    48  
    49  type istioCertificateServiceClient struct {
    50  	cc grpc.ClientConnInterface
    51  }
    52  
    53  func NewIstioCertificateServiceClient(cc grpc.ClientConnInterface) IstioCertificateServiceClient {
    54  	return &istioCertificateServiceClient{cc}
    55  }
    56  
    57  func (c *istioCertificateServiceClient) CreateCertificate(ctx context.Context, in *IstioCertificateRequest, opts ...grpc.CallOption) (*IstioCertificateResponse, error) {
    58  	out := new(IstioCertificateResponse)
    59  	err := c.cc.Invoke(ctx, "/istio.v1.auth.IstioCertificateService/CreateCertificate", in, out, opts...)
    60  	if err != nil {
    61  		return nil, err
    62  	}
    63  	return out, nil
    64  }
    65  
    66  // IstioCertificateServiceServer is the server API for IstioCertificateService service.
    67  // All implementations must embed UnimplementedIstioCertificateServiceServer
    68  // for forward compatibility
    69  type IstioCertificateServiceServer interface {
    70  	// Using provided CSR, returns a signed certificate.
    71  	CreateCertificate(context.Context, *IstioCertificateRequest) (*IstioCertificateResponse, error)
    72  	mustEmbedUnimplementedIstioCertificateServiceServer()
    73  }
    74  
    75  // UnimplementedIstioCertificateServiceServer must be embedded to have forward compatible implementations.
    76  type UnimplementedIstioCertificateServiceServer struct {
    77  }
    78  
    79  func (UnimplementedIstioCertificateServiceServer) CreateCertificate(context.Context, *IstioCertificateRequest) (*IstioCertificateResponse, error) {
    80  	return nil, status.Errorf(codes.Unimplemented, "method CreateCertificate not implemented")
    81  }
    82  func (UnimplementedIstioCertificateServiceServer) mustEmbedUnimplementedIstioCertificateServiceServer() {
    83  }
    84  
    85  // UnsafeIstioCertificateServiceServer may be embedded to opt out of forward compatibility for this service.
    86  // Use of this interface is not recommended, as added methods to IstioCertificateServiceServer will
    87  // result in compilation errors.
    88  type UnsafeIstioCertificateServiceServer interface {
    89  	mustEmbedUnimplementedIstioCertificateServiceServer()
    90  }
    91  
    92  func RegisterIstioCertificateServiceServer(s grpc.ServiceRegistrar, srv IstioCertificateServiceServer) {
    93  	s.RegisterService(&IstioCertificateService_ServiceDesc, srv)
    94  }
    95  
    96  func _IstioCertificateService_CreateCertificate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
    97  	in := new(IstioCertificateRequest)
    98  	if err := dec(in); err != nil {
    99  		return nil, err
   100  	}
   101  	if interceptor == nil {
   102  		return srv.(IstioCertificateServiceServer).CreateCertificate(ctx, in)
   103  	}
   104  	info := &grpc.UnaryServerInfo{
   105  		Server:     srv,
   106  		FullMethod: "/istio.v1.auth.IstioCertificateService/CreateCertificate",
   107  	}
   108  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   109  		return srv.(IstioCertificateServiceServer).CreateCertificate(ctx, req.(*IstioCertificateRequest))
   110  	}
   111  	return interceptor(ctx, in, info, handler)
   112  }
   113  
   114  // IstioCertificateService_ServiceDesc is the grpc.ServiceDesc for IstioCertificateService service.
   115  // It's only intended for direct use with grpc.RegisterService,
   116  // and not to be introspected or modified (even as a copy)
   117  var IstioCertificateService_ServiceDesc = grpc.ServiceDesc{
   118  	ServiceName: "istio.v1.auth.IstioCertificateService",
   119  	HandlerType: (*IstioCertificateServiceServer)(nil),
   120  	Methods: []grpc.MethodDesc{
   121  		{
   122  			MethodName: "CreateCertificate",
   123  			Handler:    _IstioCertificateService_CreateCertificate_Handler,
   124  		},
   125  	},
   126  	Streams:  []grpc.StreamDesc{},
   127  	Metadata: "security/v1alpha1/ca.proto",
   128  }