sigs.k8s.io/prow@v0.0.0-20240503223140-c5e374dc7eb1/pkg/gangway/gangway_grpc.pb.go (about) 1 // Code generated by protoc-gen-go-grpc. DO NOT EDIT. 2 // versions: 3 // - protoc-gen-go-grpc v1.3.0 4 // - protoc v4.25.2 5 // source: gangway.proto 6 7 package gangway 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.32.0 or later. 19 const _ = grpc.SupportPackageIsVersion7 20 21 const ( 22 Prow_CreateJobExecution_FullMethodName = "/Prow/CreateJobExecution" 23 Prow_GetJobExecution_FullMethodName = "/Prow/GetJobExecution" 24 Prow_ListJobExecutions_FullMethodName = "/Prow/ListJobExecutions" 25 ) 26 27 // ProwClient is the client API for Prow service. 28 // 29 // 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. 30 type ProwClient interface { 31 // FIXME: In the future we can just return a unique token (only), in the same 32 // way that GCB returns immediately with the globally-unique BuildId. That is, 33 // in the future the response will be a union of either the full JobExecution 34 // message or a single JobExecutionToken (string). See 35 // https://docs.google.com/document/d/1v77jp1Nb5C2C2-PdV02SGViO9CyZ9SvNxCPOHyIUQeo/edit#bookmark=id.q68srxklvpt4. 36 CreateJobExecution(ctx context.Context, in *CreateJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error) 37 GetJobExecution(ctx context.Context, in *GetJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error) 38 ListJobExecutions(ctx context.Context, in *ListJobExecutionsRequest, opts ...grpc.CallOption) (*JobExecutions, error) 39 } 40 41 type prowClient struct { 42 cc grpc.ClientConnInterface 43 } 44 45 func NewProwClient(cc grpc.ClientConnInterface) ProwClient { 46 return &prowClient{cc} 47 } 48 49 func (c *prowClient) CreateJobExecution(ctx context.Context, in *CreateJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error) { 50 out := new(JobExecution) 51 err := c.cc.Invoke(ctx, Prow_CreateJobExecution_FullMethodName, in, out, opts...) 52 if err != nil { 53 return nil, err 54 } 55 return out, nil 56 } 57 58 func (c *prowClient) GetJobExecution(ctx context.Context, in *GetJobExecutionRequest, opts ...grpc.CallOption) (*JobExecution, error) { 59 out := new(JobExecution) 60 err := c.cc.Invoke(ctx, Prow_GetJobExecution_FullMethodName, in, out, opts...) 61 if err != nil { 62 return nil, err 63 } 64 return out, nil 65 } 66 67 func (c *prowClient) ListJobExecutions(ctx context.Context, in *ListJobExecutionsRequest, opts ...grpc.CallOption) (*JobExecutions, error) { 68 out := new(JobExecutions) 69 err := c.cc.Invoke(ctx, Prow_ListJobExecutions_FullMethodName, in, out, opts...) 70 if err != nil { 71 return nil, err 72 } 73 return out, nil 74 } 75 76 // ProwServer is the server API for Prow service. 77 // All implementations must embed UnimplementedProwServer 78 // for forward compatibility 79 type ProwServer interface { 80 // FIXME: In the future we can just return a unique token (only), in the same 81 // way that GCB returns immediately with the globally-unique BuildId. That is, 82 // in the future the response will be a union of either the full JobExecution 83 // message or a single JobExecutionToken (string). See 84 // https://docs.google.com/document/d/1v77jp1Nb5C2C2-PdV02SGViO9CyZ9SvNxCPOHyIUQeo/edit#bookmark=id.q68srxklvpt4. 85 CreateJobExecution(context.Context, *CreateJobExecutionRequest) (*JobExecution, error) 86 GetJobExecution(context.Context, *GetJobExecutionRequest) (*JobExecution, error) 87 ListJobExecutions(context.Context, *ListJobExecutionsRequest) (*JobExecutions, error) 88 mustEmbedUnimplementedProwServer() 89 } 90 91 // UnimplementedProwServer must be embedded to have forward compatible implementations. 92 type UnimplementedProwServer struct { 93 } 94 95 func (UnimplementedProwServer) CreateJobExecution(context.Context, *CreateJobExecutionRequest) (*JobExecution, error) { 96 return nil, status.Errorf(codes.Unimplemented, "method CreateJobExecution not implemented") 97 } 98 func (UnimplementedProwServer) GetJobExecution(context.Context, *GetJobExecutionRequest) (*JobExecution, error) { 99 return nil, status.Errorf(codes.Unimplemented, "method GetJobExecution not implemented") 100 } 101 func (UnimplementedProwServer) ListJobExecutions(context.Context, *ListJobExecutionsRequest) (*JobExecutions, error) { 102 return nil, status.Errorf(codes.Unimplemented, "method ListJobExecutions not implemented") 103 } 104 func (UnimplementedProwServer) mustEmbedUnimplementedProwServer() {} 105 106 // UnsafeProwServer may be embedded to opt out of forward compatibility for this service. 107 // Use of this interface is not recommended, as added methods to ProwServer will 108 // result in compilation errors. 109 type UnsafeProwServer interface { 110 mustEmbedUnimplementedProwServer() 111 } 112 113 func RegisterProwServer(s grpc.ServiceRegistrar, srv ProwServer) { 114 s.RegisterService(&Prow_ServiceDesc, srv) 115 } 116 117 func _Prow_CreateJobExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 118 in := new(CreateJobExecutionRequest) 119 if err := dec(in); err != nil { 120 return nil, err 121 } 122 if interceptor == nil { 123 return srv.(ProwServer).CreateJobExecution(ctx, in) 124 } 125 info := &grpc.UnaryServerInfo{ 126 Server: srv, 127 FullMethod: Prow_CreateJobExecution_FullMethodName, 128 } 129 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 130 return srv.(ProwServer).CreateJobExecution(ctx, req.(*CreateJobExecutionRequest)) 131 } 132 return interceptor(ctx, in, info, handler) 133 } 134 135 func _Prow_GetJobExecution_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 136 in := new(GetJobExecutionRequest) 137 if err := dec(in); err != nil { 138 return nil, err 139 } 140 if interceptor == nil { 141 return srv.(ProwServer).GetJobExecution(ctx, in) 142 } 143 info := &grpc.UnaryServerInfo{ 144 Server: srv, 145 FullMethod: Prow_GetJobExecution_FullMethodName, 146 } 147 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 148 return srv.(ProwServer).GetJobExecution(ctx, req.(*GetJobExecutionRequest)) 149 } 150 return interceptor(ctx, in, info, handler) 151 } 152 153 func _Prow_ListJobExecutions_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 154 in := new(ListJobExecutionsRequest) 155 if err := dec(in); err != nil { 156 return nil, err 157 } 158 if interceptor == nil { 159 return srv.(ProwServer).ListJobExecutions(ctx, in) 160 } 161 info := &grpc.UnaryServerInfo{ 162 Server: srv, 163 FullMethod: Prow_ListJobExecutions_FullMethodName, 164 } 165 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 166 return srv.(ProwServer).ListJobExecutions(ctx, req.(*ListJobExecutionsRequest)) 167 } 168 return interceptor(ctx, in, info, handler) 169 } 170 171 // Prow_ServiceDesc is the grpc.ServiceDesc for Prow service. 172 // It's only intended for direct use with grpc.RegisterService, 173 // and not to be introspected or modified (even as a copy) 174 var Prow_ServiceDesc = grpc.ServiceDesc{ 175 ServiceName: "Prow", 176 HandlerType: (*ProwServer)(nil), 177 Methods: []grpc.MethodDesc{ 178 { 179 MethodName: "CreateJobExecution", 180 Handler: _Prow_CreateJobExecution_Handler, 181 }, 182 { 183 MethodName: "GetJobExecution", 184 Handler: _Prow_GetJobExecution_Handler, 185 }, 186 { 187 MethodName: "ListJobExecutions", 188 Handler: _Prow_ListJobExecutions_Handler, 189 }, 190 }, 191 Streams: []grpc.StreamDesc{}, 192 Metadata: "gangway.proto", 193 }