mirror of https://github.com/harness/drone.git
141 lines
4.6 KiB
Go
141 lines
4.6 KiB
Go
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
|
// versions:
|
|
// - protoc-gen-go-grpc v1.2.0
|
|
// - protoc v3.21.11
|
|
// source: operations.proto
|
|
|
|
package rpc
|
|
|
|
import (
|
|
context "context"
|
|
|
|
grpc "google.golang.org/grpc"
|
|
codes "google.golang.org/grpc/codes"
|
|
status "google.golang.org/grpc/status"
|
|
)
|
|
|
|
// This is a compile-time assertion to ensure that this generated file
|
|
// is compatible with the grpc package it is being compiled against.
|
|
// Requires gRPC-Go v1.32.0 or later.
|
|
const _ = grpc.SupportPackageIsVersion7
|
|
|
|
// CommitFilesServiceClient is the client API for CommitFilesService service.
|
|
//
|
|
// 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.
|
|
type CommitFilesServiceClient interface {
|
|
CommitFiles(ctx context.Context, opts ...grpc.CallOption) (CommitFilesService_CommitFilesClient, error)
|
|
}
|
|
|
|
type commitFilesServiceClient struct {
|
|
cc grpc.ClientConnInterface
|
|
}
|
|
|
|
func NewCommitFilesServiceClient(cc grpc.ClientConnInterface) CommitFilesServiceClient {
|
|
return &commitFilesServiceClient{cc}
|
|
}
|
|
|
|
func (c *commitFilesServiceClient) CommitFiles(ctx context.Context, opts ...grpc.CallOption) (CommitFilesService_CommitFilesClient, error) {
|
|
stream, err := c.cc.NewStream(ctx, &CommitFilesService_ServiceDesc.Streams[0], "/rpc.CommitFilesService/CommitFiles", opts...)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
x := &commitFilesServiceCommitFilesClient{stream}
|
|
return x, nil
|
|
}
|
|
|
|
type CommitFilesService_CommitFilesClient interface {
|
|
Send(*CommitFilesRequest) error
|
|
CloseAndRecv() (*CommitFilesResponse, error)
|
|
grpc.ClientStream
|
|
}
|
|
|
|
type commitFilesServiceCommitFilesClient struct {
|
|
grpc.ClientStream
|
|
}
|
|
|
|
func (x *commitFilesServiceCommitFilesClient) Send(m *CommitFilesRequest) error {
|
|
return x.ClientStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *commitFilesServiceCommitFilesClient) CloseAndRecv() (*CommitFilesResponse, error) {
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
return nil, err
|
|
}
|
|
m := new(CommitFilesResponse)
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// CommitFilesServiceServer is the server API for CommitFilesService service.
|
|
// All implementations must embed UnimplementedCommitFilesServiceServer
|
|
// for forward compatibility
|
|
type CommitFilesServiceServer interface {
|
|
CommitFiles(CommitFilesService_CommitFilesServer) error
|
|
mustEmbedUnimplementedCommitFilesServiceServer()
|
|
}
|
|
|
|
// UnimplementedCommitFilesServiceServer must be embedded to have forward compatible implementations.
|
|
type UnimplementedCommitFilesServiceServer struct {
|
|
}
|
|
|
|
func (UnimplementedCommitFilesServiceServer) CommitFiles(CommitFilesService_CommitFilesServer) error {
|
|
return status.Errorf(codes.Unimplemented, "method CommitFiles not implemented")
|
|
}
|
|
func (UnimplementedCommitFilesServiceServer) mustEmbedUnimplementedCommitFilesServiceServer() {}
|
|
|
|
// UnsafeCommitFilesServiceServer may be embedded to opt out of forward compatibility for this service.
|
|
// Use of this interface is not recommended, as added methods to CommitFilesServiceServer will
|
|
// result in compilation errors.
|
|
type UnsafeCommitFilesServiceServer interface {
|
|
mustEmbedUnimplementedCommitFilesServiceServer()
|
|
}
|
|
|
|
func RegisterCommitFilesServiceServer(s grpc.ServiceRegistrar, srv CommitFilesServiceServer) {
|
|
s.RegisterService(&CommitFilesService_ServiceDesc, srv)
|
|
}
|
|
|
|
func _CommitFilesService_CommitFiles_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
return srv.(CommitFilesServiceServer).CommitFiles(&commitFilesServiceCommitFilesServer{stream})
|
|
}
|
|
|
|
type CommitFilesService_CommitFilesServer interface {
|
|
SendAndClose(*CommitFilesResponse) error
|
|
Recv() (*CommitFilesRequest, error)
|
|
grpc.ServerStream
|
|
}
|
|
|
|
type commitFilesServiceCommitFilesServer struct {
|
|
grpc.ServerStream
|
|
}
|
|
|
|
func (x *commitFilesServiceCommitFilesServer) SendAndClose(m *CommitFilesResponse) error {
|
|
return x.ServerStream.SendMsg(m)
|
|
}
|
|
|
|
func (x *commitFilesServiceCommitFilesServer) Recv() (*CommitFilesRequest, error) {
|
|
m := new(CommitFilesRequest)
|
|
if err := x.ServerStream.RecvMsg(m); err != nil {
|
|
return nil, err
|
|
}
|
|
return m, nil
|
|
}
|
|
|
|
// CommitFilesService_ServiceDesc is the grpc.ServiceDesc for CommitFilesService service.
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// and not to be introspected or modified (even as a copy)
|
|
var CommitFilesService_ServiceDesc = grpc.ServiceDesc{
|
|
ServiceName: "rpc.CommitFilesService",
|
|
HandlerType: (*CommitFilesServiceServer)(nil),
|
|
Methods: []grpc.MethodDesc{},
|
|
Streams: []grpc.StreamDesc{
|
|
{
|
|
StreamName: "CommitFiles",
|
|
Handler: _CommitFilesService_CommitFiles_Handler,
|
|
ClientStreams: true,
|
|
},
|
|
},
|
|
Metadata: "operations.proto",
|
|
}
|