golang.org/x/build@v0.0.0-20240506185731-218518f32b70/internal/gomote/protos/gomote_grpc.pb.go (about)

     1  // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
     2  // versions:
     3  // - protoc-gen-go-grpc v1.2.0
     4  // - protoc             v4.23.4
     5  // source: gomote.proto
     6  
     7  package protos
     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  // GomoteServiceClient is the client API for GomoteService service.
    22  //
    23  // 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.
    24  type GomoteServiceClient interface {
    25  	// Authenticate provides authentication information without any additional action.
    26  	Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error)
    27  	// AddBootstrap adds the bootstrap version of Go to the work directory.
    28  	AddBootstrap(ctx context.Context, in *AddBootstrapRequest, opts ...grpc.CallOption) (*AddBootstrapResponse, error)
    29  	// CreateInstance creates a gomote instance.
    30  	CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (GomoteService_CreateInstanceClient, error)
    31  	// DestroyInstance destroys a gomote instance.
    32  	DestroyInstance(ctx context.Context, in *DestroyInstanceRequest, opts ...grpc.CallOption) (*DestroyInstanceResponse, error)
    33  	// ExecuteCommand executes a command on the gomote instance.
    34  	ExecuteCommand(ctx context.Context, in *ExecuteCommandRequest, opts ...grpc.CallOption) (GomoteService_ExecuteCommandClient, error)
    35  	// InstanceAlive gives the liveness state of a gomote instance.
    36  	InstanceAlive(ctx context.Context, in *InstanceAliveRequest, opts ...grpc.CallOption) (*InstanceAliveResponse, error)
    37  	// ListDirectory lists the contents of a directory on an gomote instance.
    38  	ListDirectory(ctx context.Context, in *ListDirectoryRequest, opts ...grpc.CallOption) (*ListDirectoryResponse, error)
    39  	// ListInstances lists all of the live gomote instances owned by the caller.
    40  	ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error)
    41  	// ListSwarmingBuilders lists all of the swarming builders for the project.
    42  	ListSwarmingBuilders(ctx context.Context, in *ListSwarmingBuildersRequest, opts ...grpc.CallOption) (*ListSwarmingBuildersResponse, error)
    43  	// ReadTGZToURL tars and zips a directory which exists on the gomote instance and returns a URL where it can be
    44  	// downloaded from.
    45  	ReadTGZToURL(ctx context.Context, in *ReadTGZToURLRequest, opts ...grpc.CallOption) (*ReadTGZToURLResponse, error)
    46  	// RemoveFiles removes files or directories from the gomote instance.
    47  	RemoveFiles(ctx context.Context, in *RemoveFilesRequest, opts ...grpc.CallOption) (*RemoveFilesResponse, error)
    48  	// SignSSHKey signs an SSH public key which can be used to SSH into instances owned by the caller.
    49  	SignSSHKey(ctx context.Context, in *SignSSHKeyRequest, opts ...grpc.CallOption) (*SignSSHKeyResponse, error)
    50  	// UploadFile generates a signed URL and associated fields to be used when uploading the object to GCS. Once uploaded
    51  	// the corresponding Write endpoint can be used to send the file to the gomote instance.
    52  	UploadFile(ctx context.Context, in *UploadFileRequest, opts ...grpc.CallOption) (*UploadFileResponse, error)
    53  	// WriteFileFromURL
    54  	WriteFileFromURL(ctx context.Context, in *WriteFileFromURLRequest, opts ...grpc.CallOption) (*WriteFileFromURLResponse, error)
    55  	// WriteTGZFromURL retrieves a tar and zipped file from a URL and expands it onto the file system of a gomote instance.
    56  	WriteTGZFromURL(ctx context.Context, in *WriteTGZFromURLRequest, opts ...grpc.CallOption) (*WriteTGZFromURLResponse, error)
    57  }
    58  
    59  type gomoteServiceClient struct {
    60  	cc grpc.ClientConnInterface
    61  }
    62  
    63  func NewGomoteServiceClient(cc grpc.ClientConnInterface) GomoteServiceClient {
    64  	return &gomoteServiceClient{cc}
    65  }
    66  
    67  func (c *gomoteServiceClient) Authenticate(ctx context.Context, in *AuthenticateRequest, opts ...grpc.CallOption) (*AuthenticateResponse, error) {
    68  	out := new(AuthenticateResponse)
    69  	err := c.cc.Invoke(ctx, "/protos.GomoteService/Authenticate", in, out, opts...)
    70  	if err != nil {
    71  		return nil, err
    72  	}
    73  	return out, nil
    74  }
    75  
    76  func (c *gomoteServiceClient) AddBootstrap(ctx context.Context, in *AddBootstrapRequest, opts ...grpc.CallOption) (*AddBootstrapResponse, error) {
    77  	out := new(AddBootstrapResponse)
    78  	err := c.cc.Invoke(ctx, "/protos.GomoteService/AddBootstrap", in, out, opts...)
    79  	if err != nil {
    80  		return nil, err
    81  	}
    82  	return out, nil
    83  }
    84  
    85  func (c *gomoteServiceClient) CreateInstance(ctx context.Context, in *CreateInstanceRequest, opts ...grpc.CallOption) (GomoteService_CreateInstanceClient, error) {
    86  	stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[0], "/protos.GomoteService/CreateInstance", opts...)
    87  	if err != nil {
    88  		return nil, err
    89  	}
    90  	x := &gomoteServiceCreateInstanceClient{stream}
    91  	if err := x.ClientStream.SendMsg(in); err != nil {
    92  		return nil, err
    93  	}
    94  	if err := x.ClientStream.CloseSend(); err != nil {
    95  		return nil, err
    96  	}
    97  	return x, nil
    98  }
    99  
   100  type GomoteService_CreateInstanceClient interface {
   101  	Recv() (*CreateInstanceResponse, error)
   102  	grpc.ClientStream
   103  }
   104  
   105  type gomoteServiceCreateInstanceClient struct {
   106  	grpc.ClientStream
   107  }
   108  
   109  func (x *gomoteServiceCreateInstanceClient) Recv() (*CreateInstanceResponse, error) {
   110  	m := new(CreateInstanceResponse)
   111  	if err := x.ClientStream.RecvMsg(m); err != nil {
   112  		return nil, err
   113  	}
   114  	return m, nil
   115  }
   116  
   117  func (c *gomoteServiceClient) DestroyInstance(ctx context.Context, in *DestroyInstanceRequest, opts ...grpc.CallOption) (*DestroyInstanceResponse, error) {
   118  	out := new(DestroyInstanceResponse)
   119  	err := c.cc.Invoke(ctx, "/protos.GomoteService/DestroyInstance", in, out, opts...)
   120  	if err != nil {
   121  		return nil, err
   122  	}
   123  	return out, nil
   124  }
   125  
   126  func (c *gomoteServiceClient) ExecuteCommand(ctx context.Context, in *ExecuteCommandRequest, opts ...grpc.CallOption) (GomoteService_ExecuteCommandClient, error) {
   127  	stream, err := c.cc.NewStream(ctx, &GomoteService_ServiceDesc.Streams[1], "/protos.GomoteService/ExecuteCommand", opts...)
   128  	if err != nil {
   129  		return nil, err
   130  	}
   131  	x := &gomoteServiceExecuteCommandClient{stream}
   132  	if err := x.ClientStream.SendMsg(in); err != nil {
   133  		return nil, err
   134  	}
   135  	if err := x.ClientStream.CloseSend(); err != nil {
   136  		return nil, err
   137  	}
   138  	return x, nil
   139  }
   140  
   141  type GomoteService_ExecuteCommandClient interface {
   142  	Recv() (*ExecuteCommandResponse, error)
   143  	grpc.ClientStream
   144  }
   145  
   146  type gomoteServiceExecuteCommandClient struct {
   147  	grpc.ClientStream
   148  }
   149  
   150  func (x *gomoteServiceExecuteCommandClient) Recv() (*ExecuteCommandResponse, error) {
   151  	m := new(ExecuteCommandResponse)
   152  	if err := x.ClientStream.RecvMsg(m); err != nil {
   153  		return nil, err
   154  	}
   155  	return m, nil
   156  }
   157  
   158  func (c *gomoteServiceClient) InstanceAlive(ctx context.Context, in *InstanceAliveRequest, opts ...grpc.CallOption) (*InstanceAliveResponse, error) {
   159  	out := new(InstanceAliveResponse)
   160  	err := c.cc.Invoke(ctx, "/protos.GomoteService/InstanceAlive", in, out, opts...)
   161  	if err != nil {
   162  		return nil, err
   163  	}
   164  	return out, nil
   165  }
   166  
   167  func (c *gomoteServiceClient) ListDirectory(ctx context.Context, in *ListDirectoryRequest, opts ...grpc.CallOption) (*ListDirectoryResponse, error) {
   168  	out := new(ListDirectoryResponse)
   169  	err := c.cc.Invoke(ctx, "/protos.GomoteService/ListDirectory", in, out, opts...)
   170  	if err != nil {
   171  		return nil, err
   172  	}
   173  	return out, nil
   174  }
   175  
   176  func (c *gomoteServiceClient) ListInstances(ctx context.Context, in *ListInstancesRequest, opts ...grpc.CallOption) (*ListInstancesResponse, error) {
   177  	out := new(ListInstancesResponse)
   178  	err := c.cc.Invoke(ctx, "/protos.GomoteService/ListInstances", in, out, opts...)
   179  	if err != nil {
   180  		return nil, err
   181  	}
   182  	return out, nil
   183  }
   184  
   185  func (c *gomoteServiceClient) ListSwarmingBuilders(ctx context.Context, in *ListSwarmingBuildersRequest, opts ...grpc.CallOption) (*ListSwarmingBuildersResponse, error) {
   186  	out := new(ListSwarmingBuildersResponse)
   187  	err := c.cc.Invoke(ctx, "/protos.GomoteService/ListSwarmingBuilders", in, out, opts...)
   188  	if err != nil {
   189  		return nil, err
   190  	}
   191  	return out, nil
   192  }
   193  
   194  func (c *gomoteServiceClient) ReadTGZToURL(ctx context.Context, in *ReadTGZToURLRequest, opts ...grpc.CallOption) (*ReadTGZToURLResponse, error) {
   195  	out := new(ReadTGZToURLResponse)
   196  	err := c.cc.Invoke(ctx, "/protos.GomoteService/ReadTGZToURL", in, out, opts...)
   197  	if err != nil {
   198  		return nil, err
   199  	}
   200  	return out, nil
   201  }
   202  
   203  func (c *gomoteServiceClient) RemoveFiles(ctx context.Context, in *RemoveFilesRequest, opts ...grpc.CallOption) (*RemoveFilesResponse, error) {
   204  	out := new(RemoveFilesResponse)
   205  	err := c.cc.Invoke(ctx, "/protos.GomoteService/RemoveFiles", in, out, opts...)
   206  	if err != nil {
   207  		return nil, err
   208  	}
   209  	return out, nil
   210  }
   211  
   212  func (c *gomoteServiceClient) SignSSHKey(ctx context.Context, in *SignSSHKeyRequest, opts ...grpc.CallOption) (*SignSSHKeyResponse, error) {
   213  	out := new(SignSSHKeyResponse)
   214  	err := c.cc.Invoke(ctx, "/protos.GomoteService/SignSSHKey", in, out, opts...)
   215  	if err != nil {
   216  		return nil, err
   217  	}
   218  	return out, nil
   219  }
   220  
   221  func (c *gomoteServiceClient) UploadFile(ctx context.Context, in *UploadFileRequest, opts ...grpc.CallOption) (*UploadFileResponse, error) {
   222  	out := new(UploadFileResponse)
   223  	err := c.cc.Invoke(ctx, "/protos.GomoteService/UploadFile", in, out, opts...)
   224  	if err != nil {
   225  		return nil, err
   226  	}
   227  	return out, nil
   228  }
   229  
   230  func (c *gomoteServiceClient) WriteFileFromURL(ctx context.Context, in *WriteFileFromURLRequest, opts ...grpc.CallOption) (*WriteFileFromURLResponse, error) {
   231  	out := new(WriteFileFromURLResponse)
   232  	err := c.cc.Invoke(ctx, "/protos.GomoteService/WriteFileFromURL", in, out, opts...)
   233  	if err != nil {
   234  		return nil, err
   235  	}
   236  	return out, nil
   237  }
   238  
   239  func (c *gomoteServiceClient) WriteTGZFromURL(ctx context.Context, in *WriteTGZFromURLRequest, opts ...grpc.CallOption) (*WriteTGZFromURLResponse, error) {
   240  	out := new(WriteTGZFromURLResponse)
   241  	err := c.cc.Invoke(ctx, "/protos.GomoteService/WriteTGZFromURL", in, out, opts...)
   242  	if err != nil {
   243  		return nil, err
   244  	}
   245  	return out, nil
   246  }
   247  
   248  // GomoteServiceServer is the server API for GomoteService service.
   249  // All implementations must embed UnimplementedGomoteServiceServer
   250  // for forward compatibility
   251  type GomoteServiceServer interface {
   252  	// Authenticate provides authentication information without any additional action.
   253  	Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error)
   254  	// AddBootstrap adds the bootstrap version of Go to the work directory.
   255  	AddBootstrap(context.Context, *AddBootstrapRequest) (*AddBootstrapResponse, error)
   256  	// CreateInstance creates a gomote instance.
   257  	CreateInstance(*CreateInstanceRequest, GomoteService_CreateInstanceServer) error
   258  	// DestroyInstance destroys a gomote instance.
   259  	DestroyInstance(context.Context, *DestroyInstanceRequest) (*DestroyInstanceResponse, error)
   260  	// ExecuteCommand executes a command on the gomote instance.
   261  	ExecuteCommand(*ExecuteCommandRequest, GomoteService_ExecuteCommandServer) error
   262  	// InstanceAlive gives the liveness state of a gomote instance.
   263  	InstanceAlive(context.Context, *InstanceAliveRequest) (*InstanceAliveResponse, error)
   264  	// ListDirectory lists the contents of a directory on an gomote instance.
   265  	ListDirectory(context.Context, *ListDirectoryRequest) (*ListDirectoryResponse, error)
   266  	// ListInstances lists all of the live gomote instances owned by the caller.
   267  	ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error)
   268  	// ListSwarmingBuilders lists all of the swarming builders for the project.
   269  	ListSwarmingBuilders(context.Context, *ListSwarmingBuildersRequest) (*ListSwarmingBuildersResponse, error)
   270  	// ReadTGZToURL tars and zips a directory which exists on the gomote instance and returns a URL where it can be
   271  	// downloaded from.
   272  	ReadTGZToURL(context.Context, *ReadTGZToURLRequest) (*ReadTGZToURLResponse, error)
   273  	// RemoveFiles removes files or directories from the gomote instance.
   274  	RemoveFiles(context.Context, *RemoveFilesRequest) (*RemoveFilesResponse, error)
   275  	// SignSSHKey signs an SSH public key which can be used to SSH into instances owned by the caller.
   276  	SignSSHKey(context.Context, *SignSSHKeyRequest) (*SignSSHKeyResponse, error)
   277  	// UploadFile generates a signed URL and associated fields to be used when uploading the object to GCS. Once uploaded
   278  	// the corresponding Write endpoint can be used to send the file to the gomote instance.
   279  	UploadFile(context.Context, *UploadFileRequest) (*UploadFileResponse, error)
   280  	// WriteFileFromURL
   281  	WriteFileFromURL(context.Context, *WriteFileFromURLRequest) (*WriteFileFromURLResponse, error)
   282  	// WriteTGZFromURL retrieves a tar and zipped file from a URL and expands it onto the file system of a gomote instance.
   283  	WriteTGZFromURL(context.Context, *WriteTGZFromURLRequest) (*WriteTGZFromURLResponse, error)
   284  	mustEmbedUnimplementedGomoteServiceServer()
   285  }
   286  
   287  // UnimplementedGomoteServiceServer must be embedded to have forward compatible implementations.
   288  type UnimplementedGomoteServiceServer struct {
   289  }
   290  
   291  func (UnimplementedGomoteServiceServer) Authenticate(context.Context, *AuthenticateRequest) (*AuthenticateResponse, error) {
   292  	return nil, status.Errorf(codes.Unimplemented, "method Authenticate not implemented")
   293  }
   294  func (UnimplementedGomoteServiceServer) AddBootstrap(context.Context, *AddBootstrapRequest) (*AddBootstrapResponse, error) {
   295  	return nil, status.Errorf(codes.Unimplemented, "method AddBootstrap not implemented")
   296  }
   297  func (UnimplementedGomoteServiceServer) CreateInstance(*CreateInstanceRequest, GomoteService_CreateInstanceServer) error {
   298  	return status.Errorf(codes.Unimplemented, "method CreateInstance not implemented")
   299  }
   300  func (UnimplementedGomoteServiceServer) DestroyInstance(context.Context, *DestroyInstanceRequest) (*DestroyInstanceResponse, error) {
   301  	return nil, status.Errorf(codes.Unimplemented, "method DestroyInstance not implemented")
   302  }
   303  func (UnimplementedGomoteServiceServer) ExecuteCommand(*ExecuteCommandRequest, GomoteService_ExecuteCommandServer) error {
   304  	return status.Errorf(codes.Unimplemented, "method ExecuteCommand not implemented")
   305  }
   306  func (UnimplementedGomoteServiceServer) InstanceAlive(context.Context, *InstanceAliveRequest) (*InstanceAliveResponse, error) {
   307  	return nil, status.Errorf(codes.Unimplemented, "method InstanceAlive not implemented")
   308  }
   309  func (UnimplementedGomoteServiceServer) ListDirectory(context.Context, *ListDirectoryRequest) (*ListDirectoryResponse, error) {
   310  	return nil, status.Errorf(codes.Unimplemented, "method ListDirectory not implemented")
   311  }
   312  func (UnimplementedGomoteServiceServer) ListInstances(context.Context, *ListInstancesRequest) (*ListInstancesResponse, error) {
   313  	return nil, status.Errorf(codes.Unimplemented, "method ListInstances not implemented")
   314  }
   315  func (UnimplementedGomoteServiceServer) ListSwarmingBuilders(context.Context, *ListSwarmingBuildersRequest) (*ListSwarmingBuildersResponse, error) {
   316  	return nil, status.Errorf(codes.Unimplemented, "method ListSwarmingBuilders not implemented")
   317  }
   318  func (UnimplementedGomoteServiceServer) ReadTGZToURL(context.Context, *ReadTGZToURLRequest) (*ReadTGZToURLResponse, error) {
   319  	return nil, status.Errorf(codes.Unimplemented, "method ReadTGZToURL not implemented")
   320  }
   321  func (UnimplementedGomoteServiceServer) RemoveFiles(context.Context, *RemoveFilesRequest) (*RemoveFilesResponse, error) {
   322  	return nil, status.Errorf(codes.Unimplemented, "method RemoveFiles not implemented")
   323  }
   324  func (UnimplementedGomoteServiceServer) SignSSHKey(context.Context, *SignSSHKeyRequest) (*SignSSHKeyResponse, error) {
   325  	return nil, status.Errorf(codes.Unimplemented, "method SignSSHKey not implemented")
   326  }
   327  func (UnimplementedGomoteServiceServer) UploadFile(context.Context, *UploadFileRequest) (*UploadFileResponse, error) {
   328  	return nil, status.Errorf(codes.Unimplemented, "method UploadFile not implemented")
   329  }
   330  func (UnimplementedGomoteServiceServer) WriteFileFromURL(context.Context, *WriteFileFromURLRequest) (*WriteFileFromURLResponse, error) {
   331  	return nil, status.Errorf(codes.Unimplemented, "method WriteFileFromURL not implemented")
   332  }
   333  func (UnimplementedGomoteServiceServer) WriteTGZFromURL(context.Context, *WriteTGZFromURLRequest) (*WriteTGZFromURLResponse, error) {
   334  	return nil, status.Errorf(codes.Unimplemented, "method WriteTGZFromURL not implemented")
   335  }
   336  func (UnimplementedGomoteServiceServer) mustEmbedUnimplementedGomoteServiceServer() {}
   337  
   338  // UnsafeGomoteServiceServer may be embedded to opt out of forward compatibility for this service.
   339  // Use of this interface is not recommended, as added methods to GomoteServiceServer will
   340  // result in compilation errors.
   341  type UnsafeGomoteServiceServer interface {
   342  	mustEmbedUnimplementedGomoteServiceServer()
   343  }
   344  
   345  func RegisterGomoteServiceServer(s grpc.ServiceRegistrar, srv GomoteServiceServer) {
   346  	s.RegisterService(&GomoteService_ServiceDesc, srv)
   347  }
   348  
   349  func _GomoteService_Authenticate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   350  	in := new(AuthenticateRequest)
   351  	if err := dec(in); err != nil {
   352  		return nil, err
   353  	}
   354  	if interceptor == nil {
   355  		return srv.(GomoteServiceServer).Authenticate(ctx, in)
   356  	}
   357  	info := &grpc.UnaryServerInfo{
   358  		Server:     srv,
   359  		FullMethod: "/protos.GomoteService/Authenticate",
   360  	}
   361  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   362  		return srv.(GomoteServiceServer).Authenticate(ctx, req.(*AuthenticateRequest))
   363  	}
   364  	return interceptor(ctx, in, info, handler)
   365  }
   366  
   367  func _GomoteService_AddBootstrap_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   368  	in := new(AddBootstrapRequest)
   369  	if err := dec(in); err != nil {
   370  		return nil, err
   371  	}
   372  	if interceptor == nil {
   373  		return srv.(GomoteServiceServer).AddBootstrap(ctx, in)
   374  	}
   375  	info := &grpc.UnaryServerInfo{
   376  		Server:     srv,
   377  		FullMethod: "/protos.GomoteService/AddBootstrap",
   378  	}
   379  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   380  		return srv.(GomoteServiceServer).AddBootstrap(ctx, req.(*AddBootstrapRequest))
   381  	}
   382  	return interceptor(ctx, in, info, handler)
   383  }
   384  
   385  func _GomoteService_CreateInstance_Handler(srv interface{}, stream grpc.ServerStream) error {
   386  	m := new(CreateInstanceRequest)
   387  	if err := stream.RecvMsg(m); err != nil {
   388  		return err
   389  	}
   390  	return srv.(GomoteServiceServer).CreateInstance(m, &gomoteServiceCreateInstanceServer{stream})
   391  }
   392  
   393  type GomoteService_CreateInstanceServer interface {
   394  	Send(*CreateInstanceResponse) error
   395  	grpc.ServerStream
   396  }
   397  
   398  type gomoteServiceCreateInstanceServer struct {
   399  	grpc.ServerStream
   400  }
   401  
   402  func (x *gomoteServiceCreateInstanceServer) Send(m *CreateInstanceResponse) error {
   403  	return x.ServerStream.SendMsg(m)
   404  }
   405  
   406  func _GomoteService_DestroyInstance_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   407  	in := new(DestroyInstanceRequest)
   408  	if err := dec(in); err != nil {
   409  		return nil, err
   410  	}
   411  	if interceptor == nil {
   412  		return srv.(GomoteServiceServer).DestroyInstance(ctx, in)
   413  	}
   414  	info := &grpc.UnaryServerInfo{
   415  		Server:     srv,
   416  		FullMethod: "/protos.GomoteService/DestroyInstance",
   417  	}
   418  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   419  		return srv.(GomoteServiceServer).DestroyInstance(ctx, req.(*DestroyInstanceRequest))
   420  	}
   421  	return interceptor(ctx, in, info, handler)
   422  }
   423  
   424  func _GomoteService_ExecuteCommand_Handler(srv interface{}, stream grpc.ServerStream) error {
   425  	m := new(ExecuteCommandRequest)
   426  	if err := stream.RecvMsg(m); err != nil {
   427  		return err
   428  	}
   429  	return srv.(GomoteServiceServer).ExecuteCommand(m, &gomoteServiceExecuteCommandServer{stream})
   430  }
   431  
   432  type GomoteService_ExecuteCommandServer interface {
   433  	Send(*ExecuteCommandResponse) error
   434  	grpc.ServerStream
   435  }
   436  
   437  type gomoteServiceExecuteCommandServer struct {
   438  	grpc.ServerStream
   439  }
   440  
   441  func (x *gomoteServiceExecuteCommandServer) Send(m *ExecuteCommandResponse) error {
   442  	return x.ServerStream.SendMsg(m)
   443  }
   444  
   445  func _GomoteService_InstanceAlive_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   446  	in := new(InstanceAliveRequest)
   447  	if err := dec(in); err != nil {
   448  		return nil, err
   449  	}
   450  	if interceptor == nil {
   451  		return srv.(GomoteServiceServer).InstanceAlive(ctx, in)
   452  	}
   453  	info := &grpc.UnaryServerInfo{
   454  		Server:     srv,
   455  		FullMethod: "/protos.GomoteService/InstanceAlive",
   456  	}
   457  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   458  		return srv.(GomoteServiceServer).InstanceAlive(ctx, req.(*InstanceAliveRequest))
   459  	}
   460  	return interceptor(ctx, in, info, handler)
   461  }
   462  
   463  func _GomoteService_ListDirectory_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   464  	in := new(ListDirectoryRequest)
   465  	if err := dec(in); err != nil {
   466  		return nil, err
   467  	}
   468  	if interceptor == nil {
   469  		return srv.(GomoteServiceServer).ListDirectory(ctx, in)
   470  	}
   471  	info := &grpc.UnaryServerInfo{
   472  		Server:     srv,
   473  		FullMethod: "/protos.GomoteService/ListDirectory",
   474  	}
   475  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   476  		return srv.(GomoteServiceServer).ListDirectory(ctx, req.(*ListDirectoryRequest))
   477  	}
   478  	return interceptor(ctx, in, info, handler)
   479  }
   480  
   481  func _GomoteService_ListInstances_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   482  	in := new(ListInstancesRequest)
   483  	if err := dec(in); err != nil {
   484  		return nil, err
   485  	}
   486  	if interceptor == nil {
   487  		return srv.(GomoteServiceServer).ListInstances(ctx, in)
   488  	}
   489  	info := &grpc.UnaryServerInfo{
   490  		Server:     srv,
   491  		FullMethod: "/protos.GomoteService/ListInstances",
   492  	}
   493  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   494  		return srv.(GomoteServiceServer).ListInstances(ctx, req.(*ListInstancesRequest))
   495  	}
   496  	return interceptor(ctx, in, info, handler)
   497  }
   498  
   499  func _GomoteService_ListSwarmingBuilders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   500  	in := new(ListSwarmingBuildersRequest)
   501  	if err := dec(in); err != nil {
   502  		return nil, err
   503  	}
   504  	if interceptor == nil {
   505  		return srv.(GomoteServiceServer).ListSwarmingBuilders(ctx, in)
   506  	}
   507  	info := &grpc.UnaryServerInfo{
   508  		Server:     srv,
   509  		FullMethod: "/protos.GomoteService/ListSwarmingBuilders",
   510  	}
   511  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   512  		return srv.(GomoteServiceServer).ListSwarmingBuilders(ctx, req.(*ListSwarmingBuildersRequest))
   513  	}
   514  	return interceptor(ctx, in, info, handler)
   515  }
   516  
   517  func _GomoteService_ReadTGZToURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   518  	in := new(ReadTGZToURLRequest)
   519  	if err := dec(in); err != nil {
   520  		return nil, err
   521  	}
   522  	if interceptor == nil {
   523  		return srv.(GomoteServiceServer).ReadTGZToURL(ctx, in)
   524  	}
   525  	info := &grpc.UnaryServerInfo{
   526  		Server:     srv,
   527  		FullMethod: "/protos.GomoteService/ReadTGZToURL",
   528  	}
   529  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   530  		return srv.(GomoteServiceServer).ReadTGZToURL(ctx, req.(*ReadTGZToURLRequest))
   531  	}
   532  	return interceptor(ctx, in, info, handler)
   533  }
   534  
   535  func _GomoteService_RemoveFiles_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   536  	in := new(RemoveFilesRequest)
   537  	if err := dec(in); err != nil {
   538  		return nil, err
   539  	}
   540  	if interceptor == nil {
   541  		return srv.(GomoteServiceServer).RemoveFiles(ctx, in)
   542  	}
   543  	info := &grpc.UnaryServerInfo{
   544  		Server:     srv,
   545  		FullMethod: "/protos.GomoteService/RemoveFiles",
   546  	}
   547  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   548  		return srv.(GomoteServiceServer).RemoveFiles(ctx, req.(*RemoveFilesRequest))
   549  	}
   550  	return interceptor(ctx, in, info, handler)
   551  }
   552  
   553  func _GomoteService_SignSSHKey_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   554  	in := new(SignSSHKeyRequest)
   555  	if err := dec(in); err != nil {
   556  		return nil, err
   557  	}
   558  	if interceptor == nil {
   559  		return srv.(GomoteServiceServer).SignSSHKey(ctx, in)
   560  	}
   561  	info := &grpc.UnaryServerInfo{
   562  		Server:     srv,
   563  		FullMethod: "/protos.GomoteService/SignSSHKey",
   564  	}
   565  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   566  		return srv.(GomoteServiceServer).SignSSHKey(ctx, req.(*SignSSHKeyRequest))
   567  	}
   568  	return interceptor(ctx, in, info, handler)
   569  }
   570  
   571  func _GomoteService_UploadFile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   572  	in := new(UploadFileRequest)
   573  	if err := dec(in); err != nil {
   574  		return nil, err
   575  	}
   576  	if interceptor == nil {
   577  		return srv.(GomoteServiceServer).UploadFile(ctx, in)
   578  	}
   579  	info := &grpc.UnaryServerInfo{
   580  		Server:     srv,
   581  		FullMethod: "/protos.GomoteService/UploadFile",
   582  	}
   583  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   584  		return srv.(GomoteServiceServer).UploadFile(ctx, req.(*UploadFileRequest))
   585  	}
   586  	return interceptor(ctx, in, info, handler)
   587  }
   588  
   589  func _GomoteService_WriteFileFromURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   590  	in := new(WriteFileFromURLRequest)
   591  	if err := dec(in); err != nil {
   592  		return nil, err
   593  	}
   594  	if interceptor == nil {
   595  		return srv.(GomoteServiceServer).WriteFileFromURL(ctx, in)
   596  	}
   597  	info := &grpc.UnaryServerInfo{
   598  		Server:     srv,
   599  		FullMethod: "/protos.GomoteService/WriteFileFromURL",
   600  	}
   601  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   602  		return srv.(GomoteServiceServer).WriteFileFromURL(ctx, req.(*WriteFileFromURLRequest))
   603  	}
   604  	return interceptor(ctx, in, info, handler)
   605  }
   606  
   607  func _GomoteService_WriteTGZFromURL_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
   608  	in := new(WriteTGZFromURLRequest)
   609  	if err := dec(in); err != nil {
   610  		return nil, err
   611  	}
   612  	if interceptor == nil {
   613  		return srv.(GomoteServiceServer).WriteTGZFromURL(ctx, in)
   614  	}
   615  	info := &grpc.UnaryServerInfo{
   616  		Server:     srv,
   617  		FullMethod: "/protos.GomoteService/WriteTGZFromURL",
   618  	}
   619  	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
   620  		return srv.(GomoteServiceServer).WriteTGZFromURL(ctx, req.(*WriteTGZFromURLRequest))
   621  	}
   622  	return interceptor(ctx, in, info, handler)
   623  }
   624  
   625  // GomoteService_ServiceDesc is the grpc.ServiceDesc for GomoteService service.
   626  // It's only intended for direct use with grpc.RegisterService,
   627  // and not to be introspected or modified (even as a copy)
   628  var GomoteService_ServiceDesc = grpc.ServiceDesc{
   629  	ServiceName: "protos.GomoteService",
   630  	HandlerType: (*GomoteServiceServer)(nil),
   631  	Methods: []grpc.MethodDesc{
   632  		{
   633  			MethodName: "Authenticate",
   634  			Handler:    _GomoteService_Authenticate_Handler,
   635  		},
   636  		{
   637  			MethodName: "AddBootstrap",
   638  			Handler:    _GomoteService_AddBootstrap_Handler,
   639  		},
   640  		{
   641  			MethodName: "DestroyInstance",
   642  			Handler:    _GomoteService_DestroyInstance_Handler,
   643  		},
   644  		{
   645  			MethodName: "InstanceAlive",
   646  			Handler:    _GomoteService_InstanceAlive_Handler,
   647  		},
   648  		{
   649  			MethodName: "ListDirectory",
   650  			Handler:    _GomoteService_ListDirectory_Handler,
   651  		},
   652  		{
   653  			MethodName: "ListInstances",
   654  			Handler:    _GomoteService_ListInstances_Handler,
   655  		},
   656  		{
   657  			MethodName: "ListSwarmingBuilders",
   658  			Handler:    _GomoteService_ListSwarmingBuilders_Handler,
   659  		},
   660  		{
   661  			MethodName: "ReadTGZToURL",
   662  			Handler:    _GomoteService_ReadTGZToURL_Handler,
   663  		},
   664  		{
   665  			MethodName: "RemoveFiles",
   666  			Handler:    _GomoteService_RemoveFiles_Handler,
   667  		},
   668  		{
   669  			MethodName: "SignSSHKey",
   670  			Handler:    _GomoteService_SignSSHKey_Handler,
   671  		},
   672  		{
   673  			MethodName: "UploadFile",
   674  			Handler:    _GomoteService_UploadFile_Handler,
   675  		},
   676  		{
   677  			MethodName: "WriteFileFromURL",
   678  			Handler:    _GomoteService_WriteFileFromURL_Handler,
   679  		},
   680  		{
   681  			MethodName: "WriteTGZFromURL",
   682  			Handler:    _GomoteService_WriteTGZFromURL_Handler,
   683  		},
   684  	},
   685  	Streams: []grpc.StreamDesc{
   686  		{
   687  			StreamName:    "CreateInstance",
   688  			Handler:       _GomoteService_CreateInstance_Handler,
   689  			ServerStreams: true,
   690  		},
   691  		{
   692  			StreamName:    "ExecuteCommand",
   693  			Handler:       _GomoteService_ExecuteCommand_Handler,
   694  			ServerStreams: true,
   695  		},
   696  	},
   697  	Metadata: "gomote.proto",
   698  }