github.com/letsencrypt/boulder@v0.20251208.0/va/proto/va_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: va.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 VA_DoDCV_FullMethodName = "/va.VA/DoDCV" 23 ) 24 25 // VAClient is the client API for VA 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 VAClient interface { 29 DoDCV(ctx context.Context, in *PerformValidationRequest, opts ...grpc.CallOption) (*ValidationResult, error) 30 } 31 32 type vAClient struct { 33 cc grpc.ClientConnInterface 34 } 35 36 func NewVAClient(cc grpc.ClientConnInterface) VAClient { 37 return &vAClient{cc} 38 } 39 40 func (c *vAClient) DoDCV(ctx context.Context, in *PerformValidationRequest, opts ...grpc.CallOption) (*ValidationResult, error) { 41 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 42 out := new(ValidationResult) 43 err := c.cc.Invoke(ctx, VA_DoDCV_FullMethodName, in, out, cOpts...) 44 if err != nil { 45 return nil, err 46 } 47 return out, nil 48 } 49 50 // VAServer is the server API for VA service. 51 // All implementations must embed UnimplementedVAServer 52 // for forward compatibility. 53 type VAServer interface { 54 DoDCV(context.Context, *PerformValidationRequest) (*ValidationResult, error) 55 mustEmbedUnimplementedVAServer() 56 } 57 58 // UnimplementedVAServer 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 UnimplementedVAServer struct{} 64 65 func (UnimplementedVAServer) DoDCV(context.Context, *PerformValidationRequest) (*ValidationResult, error) { 66 return nil, status.Errorf(codes.Unimplemented, "method DoDCV not implemented") 67 } 68 func (UnimplementedVAServer) mustEmbedUnimplementedVAServer() {} 69 func (UnimplementedVAServer) testEmbeddedByValue() {} 70 71 // UnsafeVAServer may be embedded to opt out of forward compatibility for this service. 72 // Use of this interface is not recommended, as added methods to VAServer will 73 // result in compilation errors. 74 type UnsafeVAServer interface { 75 mustEmbedUnimplementedVAServer() 76 } 77 78 func RegisterVAServer(s grpc.ServiceRegistrar, srv VAServer) { 79 // If the following call pancis, it indicates UnimplementedVAServer 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(&VA_ServiceDesc, srv) 87 } 88 89 func _VA_DoDCV_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 90 in := new(PerformValidationRequest) 91 if err := dec(in); err != nil { 92 return nil, err 93 } 94 if interceptor == nil { 95 return srv.(VAServer).DoDCV(ctx, in) 96 } 97 info := &grpc.UnaryServerInfo{ 98 Server: srv, 99 FullMethod: VA_DoDCV_FullMethodName, 100 } 101 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 102 return srv.(VAServer).DoDCV(ctx, req.(*PerformValidationRequest)) 103 } 104 return interceptor(ctx, in, info, handler) 105 } 106 107 // VA_ServiceDesc is the grpc.ServiceDesc for VA 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 VA_ServiceDesc = grpc.ServiceDesc{ 111 ServiceName: "va.VA", 112 HandlerType: (*VAServer)(nil), 113 Methods: []grpc.MethodDesc{ 114 { 115 MethodName: "DoDCV", 116 Handler: _VA_DoDCV_Handler, 117 }, 118 }, 119 Streams: []grpc.StreamDesc{}, 120 Metadata: "va.proto", 121 } 122 123 const ( 124 CAA_DoCAA_FullMethodName = "/va.CAA/DoCAA" 125 ) 126 127 // CAAClient is the client API for CAA service. 128 // 129 // 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. 130 type CAAClient interface { 131 DoCAA(ctx context.Context, in *IsCAAValidRequest, opts ...grpc.CallOption) (*IsCAAValidResponse, error) 132 } 133 134 type cAAClient struct { 135 cc grpc.ClientConnInterface 136 } 137 138 func NewCAAClient(cc grpc.ClientConnInterface) CAAClient { 139 return &cAAClient{cc} 140 } 141 142 func (c *cAAClient) DoCAA(ctx context.Context, in *IsCAAValidRequest, opts ...grpc.CallOption) (*IsCAAValidResponse, error) { 143 cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) 144 out := new(IsCAAValidResponse) 145 err := c.cc.Invoke(ctx, CAA_DoCAA_FullMethodName, in, out, cOpts...) 146 if err != nil { 147 return nil, err 148 } 149 return out, nil 150 } 151 152 // CAAServer is the server API for CAA service. 153 // All implementations must embed UnimplementedCAAServer 154 // for forward compatibility. 155 type CAAServer interface { 156 DoCAA(context.Context, *IsCAAValidRequest) (*IsCAAValidResponse, error) 157 mustEmbedUnimplementedCAAServer() 158 } 159 160 // UnimplementedCAAServer must be embedded to have 161 // forward compatible implementations. 162 // 163 // NOTE: this should be embedded by value instead of pointer to avoid a nil 164 // pointer dereference when methods are called. 165 type UnimplementedCAAServer struct{} 166 167 func (UnimplementedCAAServer) DoCAA(context.Context, *IsCAAValidRequest) (*IsCAAValidResponse, error) { 168 return nil, status.Errorf(codes.Unimplemented, "method DoCAA not implemented") 169 } 170 func (UnimplementedCAAServer) mustEmbedUnimplementedCAAServer() {} 171 func (UnimplementedCAAServer) testEmbeddedByValue() {} 172 173 // UnsafeCAAServer may be embedded to opt out of forward compatibility for this service. 174 // Use of this interface is not recommended, as added methods to CAAServer will 175 // result in compilation errors. 176 type UnsafeCAAServer interface { 177 mustEmbedUnimplementedCAAServer() 178 } 179 180 func RegisterCAAServer(s grpc.ServiceRegistrar, srv CAAServer) { 181 // If the following call pancis, it indicates UnimplementedCAAServer was 182 // embedded by pointer and is nil. This will cause panics if an 183 // unimplemented method is ever invoked, so we test this at initialization 184 // time to prevent it from happening at runtime later due to I/O. 185 if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { 186 t.testEmbeddedByValue() 187 } 188 s.RegisterService(&CAA_ServiceDesc, srv) 189 } 190 191 func _CAA_DoCAA_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 192 in := new(IsCAAValidRequest) 193 if err := dec(in); err != nil { 194 return nil, err 195 } 196 if interceptor == nil { 197 return srv.(CAAServer).DoCAA(ctx, in) 198 } 199 info := &grpc.UnaryServerInfo{ 200 Server: srv, 201 FullMethod: CAA_DoCAA_FullMethodName, 202 } 203 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 204 return srv.(CAAServer).DoCAA(ctx, req.(*IsCAAValidRequest)) 205 } 206 return interceptor(ctx, in, info, handler) 207 } 208 209 // CAA_ServiceDesc is the grpc.ServiceDesc for CAA service. 210 // It's only intended for direct use with grpc.RegisterService, 211 // and not to be introspected or modified (even as a copy) 212 var CAA_ServiceDesc = grpc.ServiceDesc{ 213 ServiceName: "va.CAA", 214 HandlerType: (*CAAServer)(nil), 215 Methods: []grpc.MethodDesc{ 216 { 217 MethodName: "DoCAA", 218 Handler: _CAA_DoCAA_Handler, 219 }, 220 }, 221 Streams: []grpc.StreamDesc{}, 222 Metadata: "va.proto", 223 }