github.com/letsencrypt/boulder@v0.20251208.0/publisher/proto/publisher_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.5.1 4 // - protoc v3.20.1 5 // source: publisher.proto 6 7 package proto 8 9 import ( 10 context "context" 11 grpc "google.golang.org/grpc" 12 codes "google.golang.org/grpc/codes" 13 status "google.golang.org/grpc/status" 14 ) 15 16 // This is a compile-time assertion to ensure that this generated file 17 // is compatible with the grpc package it is being compiled against. 18 // Requires gRPC-Go v1.64.0 or later. 19 const _ = grpc.SupportPackageIsVersion9 20 21 const ( 22 Publisher_SubmitToSingleCTWithResult_FullMethodName = "/Publisher/SubmitToSingleCTWithResult" 23 ) 24 25 // PublisherClient is the client API for Publisher service. 26 // 27 // 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. 28 type PublisherClient interface { 29 SubmitToSingleCTWithResult(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) 30 } 31 32 type publisherClient struct { 33 cc grpc.ClientConnInterface 34 } 35 36 func NewPublisherClient(cc grpc.ClientConnInterface) PublisherClient { 37 return &publisherClient{cc} 38 } 39 40 func (c *publisherClient) SubmitToSingleCTWithResult(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Result, error) { 41 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 42 out := new(Result) 43 err := c.cc.Invoke(ctx, Publisher_SubmitToSingleCTWithResult_FullMethodName, in, out, cOpts...) 44 if err != nil { 45 return nil, err 46 } 47 return out, nil 48 } 49 50 // PublisherServer is the server API for Publisher service. 51 // All implementations must embed UnimplementedPublisherServer 52 // for forward compatibility. 53 type PublisherServer interface { 54 SubmitToSingleCTWithResult(context.Context, *Request) (*Result, error) 55 mustEmbedUnimplementedPublisherServer() 56 } 57 58 // UnimplementedPublisherServer must be embedded to have 59 // forward compatible implementations. 60 // 61 // NOTE: this should be embedded by value instead of pointer to avoid a nil 62 // pointer dereference when methods are called. 63 type UnimplementedPublisherServer struct{} 64 65 func (UnimplementedPublisherServer) SubmitToSingleCTWithResult(context.Context, *Request) (*Result, error) { 66 return nil, status.Errorf(codes.Unimplemented, "method SubmitToSingleCTWithResult not implemented") 67 } 68 func (UnimplementedPublisherServer) mustEmbedUnimplementedPublisherServer() {} 69 func (UnimplementedPublisherServer) testEmbeddedByValue() {} 70 71 // UnsafePublisherServer may be embedded to opt out of forward compatibility for this service. 72 // Use of this interface is not recommended, as added methods to PublisherServer will 73 // result in compilation errors. 74 type UnsafePublisherServer interface { 75 mustEmbedUnimplementedPublisherServer() 76 } 77 78 func RegisterPublisherServer(s grpc.ServiceRegistrar, srv PublisherServer) { 79 // If the following call pancis, it indicates UnimplementedPublisherServer was 80 // embedded by pointer and is nil. This will cause panics if an 81 // unimplemented method is ever invoked, so we test this at initialization 82 // time to prevent it from happening at runtime later due to I/O. 83 if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { 84 t.testEmbeddedByValue() 85 } 86 s.RegisterService(&Publisher_ServiceDesc, srv) 87 } 88 89 func _Publisher_SubmitToSingleCTWithResult_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 90 in := new(Request) 91 if err := dec(in); err != nil { 92 return nil, err 93 } 94 if interceptor == nil { 95 return srv.(PublisherServer).SubmitToSingleCTWithResult(ctx, in) 96 } 97 info := &grpc.UnaryServerInfo{ 98 Server: srv, 99 FullMethod: Publisher_SubmitToSingleCTWithResult_FullMethodName, 100 } 101 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 102 return srv.(PublisherServer).SubmitToSingleCTWithResult(ctx, req.(*Request)) 103 } 104 return interceptor(ctx, in, info, handler) 105 } 106 107 // Publisher_ServiceDesc is the grpc.ServiceDesc for Publisher service. 108 // It's only intended for direct use with grpc.RegisterService, 109 // and not to be introspected or modified (even as a copy) 110 var Publisher_ServiceDesc = grpc.ServiceDesc{ 111 ServiceName: "Publisher", 112 HandlerType: (*PublisherServer)(nil), 113 Methods: []grpc.MethodDesc{ 114 { 115 MethodName: "SubmitToSingleCTWithResult", 116 Handler: _Publisher_SubmitToSingleCTWithResult_Handler, 117 }, 118 }, 119 Streams: []grpc.StreamDesc{}, 120 Metadata: "publisher.proto", 121 }