|
|
|
|
@ -4,14 +4,15 @@ package vagrant_server
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
context "context"
|
|
|
|
|
empty "github.com/golang/protobuf/ptypes/empty"
|
|
|
|
|
grpc "google.golang.org/grpc"
|
|
|
|
|
codes "google.golang.org/grpc/codes"
|
|
|
|
|
status "google.golang.org/grpc/status"
|
|
|
|
|
emptypb "google.golang.org/protobuf/types/known/emptypb"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
|
|
|
|
|
// VagrantClient is the client API for Vagrant service.
|
|
|
|
|
@ -21,11 +22,11 @@ type VagrantClient interface {
|
|
|
|
|
// GetVersionInfo returns information about the server. This RPC call does
|
|
|
|
|
// NOT require authentication. It can be used by clients to determine if they
|
|
|
|
|
// are capable of talking to this server.
|
|
|
|
|
GetVersionInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetVersionInfoResponse, error)
|
|
|
|
|
GetVersionInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetVersionInfoResponse, error)
|
|
|
|
|
UpsertBasis(ctx context.Context, in *UpsertBasisRequest, opts ...grpc.CallOption) (*UpsertBasisResponse, error)
|
|
|
|
|
GetBasis(ctx context.Context, in *GetBasisRequest, opts ...grpc.CallOption) (*GetBasisResponse, error)
|
|
|
|
|
FindBasis(ctx context.Context, in *FindBasisRequest, opts ...grpc.CallOption) (*FindBasisResponse, error)
|
|
|
|
|
ListBasis(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListBasisResponse, error)
|
|
|
|
|
ListBasis(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListBasisResponse, error)
|
|
|
|
|
// ListTasks returns the tasks.
|
|
|
|
|
ListTasks(ctx context.Context, in *ListTasksRequest, opts ...grpc.CallOption) (*ListTasksResponse, error)
|
|
|
|
|
// GetTask returns a task
|
|
|
|
|
@ -43,13 +44,13 @@ type VagrantClient interface {
|
|
|
|
|
// ListProjects returns a list of all the projects. There is no equivalent
|
|
|
|
|
// ListApplications because applications are a part of projects and you
|
|
|
|
|
// can use GetProject to get more information about the project.
|
|
|
|
|
ListProjects(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListProjectsResponse, error)
|
|
|
|
|
ListProjects(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListProjectsResponse, error)
|
|
|
|
|
// UpsertMachine upserts a machine with a project. If the machine
|
|
|
|
|
// is already registered this does nothing.
|
|
|
|
|
UpsertMachine(ctx context.Context, in *UpsertMachineRequest, opts ...grpc.CallOption) (*UpsertMachineResponse, error)
|
|
|
|
|
GetMachine(ctx context.Context, in *GetMachineRequest, opts ...grpc.CallOption) (*GetMachineResponse, error)
|
|
|
|
|
FindMachine(ctx context.Context, in *FindMachineRequest, opts ...grpc.CallOption) (*FindMachineResponse, error)
|
|
|
|
|
ListMachines(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListMachinesResponse, error)
|
|
|
|
|
ListMachines(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListMachinesResponse, error)
|
|
|
|
|
// GetLogStream reads the log stream for a deployment. This will immediately
|
|
|
|
|
// send a single LogEntry with the lines we have so far. If there are no
|
|
|
|
|
// available lines this will NOT block and instead will return an error.
|
|
|
|
|
@ -71,7 +72,7 @@ type VagrantClient interface {
|
|
|
|
|
//
|
|
|
|
|
// This RPC always returns immediately. You must use GetJob or GetJobStream
|
|
|
|
|
// to wait on the status of the cancellation.
|
|
|
|
|
CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
|
|
|
|
CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
|
|
// GetJob queries a job by ID.
|
|
|
|
|
GetJob(ctx context.Context, in *GetJobRequest, opts ...grpc.CallOption) (*Job, error)
|
|
|
|
|
// INTERNAL: ListJobs lists all the jobs the server has processed. This
|
|
|
|
|
@ -88,11 +89,11 @@ type VagrantClient interface {
|
|
|
|
|
// GetRunner gets information about a single runner.
|
|
|
|
|
GetRunner(ctx context.Context, in *GetRunnerRequest, opts ...grpc.CallOption) (*Runner, error)
|
|
|
|
|
// GetServerConfig sets configuration for the Vagrant server.
|
|
|
|
|
GetServerConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetServerConfigResponse, error)
|
|
|
|
|
GetServerConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetServerConfigResponse, error)
|
|
|
|
|
// SetServerConfig sets configuration for the Vagrant server.
|
|
|
|
|
SetServerConfig(ctx context.Context, in *SetServerConfigRequest, opts ...grpc.CallOption) (*empty.Empty, error)
|
|
|
|
|
SetServerConfig(ctx context.Context, in *SetServerConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
|
|
|
|
|
// CreateSnapshot creates a new database snapshot.
|
|
|
|
|
CreateSnapshot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Vagrant_CreateSnapshotClient, error)
|
|
|
|
|
CreateSnapshot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Vagrant_CreateSnapshotClient, error)
|
|
|
|
|
// RestoreSnapshot performs a database restore with the given snapshot.
|
|
|
|
|
// This API doesn't do a full online restore, it only stages the restore
|
|
|
|
|
// for the next server start to finalize the restore. See the arguments for
|
|
|
|
|
@ -101,11 +102,11 @@ type VagrantClient interface {
|
|
|
|
|
// BootstrapToken returns the initial token for the server. This can only
|
|
|
|
|
// be requested once on first startup. After initial request this will
|
|
|
|
|
// always return a PermissionDenied error.
|
|
|
|
|
BootstrapToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
BootstrapToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
// Generate a new invite token that users can exchange for a login token.
|
|
|
|
|
GenerateInviteToken(ctx context.Context, in *InviteTokenRequest, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
// Generate a new login token that users can use to login directly.
|
|
|
|
|
GenerateLoginToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
GenerateLoginToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
// Exchange a invite token for a login token.
|
|
|
|
|
ConvertInviteToken(ctx context.Context, in *ConvertInviteTokenRequest, opts ...grpc.CallOption) (*NewTokenResponse, error)
|
|
|
|
|
// RunnerConfig is called to register a runner and receive the configuration
|
|
|
|
|
@ -115,7 +116,6 @@ type VagrantClient interface {
|
|
|
|
|
// RunnerJobStream is called by a runner to request a single job for
|
|
|
|
|
// execution and update the status of that job.
|
|
|
|
|
RunnerJobStream(ctx context.Context, opts ...grpc.CallOption) (Vagrant_RunnerJobStreamClient, error)
|
|
|
|
|
RubyVagrantClientInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RubyVagrantClientInfoResponse, error)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type vagrantClient struct {
|
|
|
|
|
@ -126,7 +126,7 @@ func NewVagrantClient(cc grpc.ClientConnInterface) VagrantClient {
|
|
|
|
|
return &vagrantClient{cc}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) GetVersionInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetVersionInfoResponse, error) {
|
|
|
|
|
func (c *vagrantClient) GetVersionInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetVersionInfoResponse, error) {
|
|
|
|
|
out := new(GetVersionInfoResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/GetVersionInfo", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -162,7 +162,7 @@ func (c *vagrantClient) FindBasis(ctx context.Context, in *FindBasisRequest, opt
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) ListBasis(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListBasisResponse, error) {
|
|
|
|
|
func (c *vagrantClient) ListBasis(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListBasisResponse, error) {
|
|
|
|
|
out := new(ListBasisResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/ListBasis", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -234,7 +234,7 @@ func (c *vagrantClient) FindProject(ctx context.Context, in *FindProjectRequest,
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) ListProjects(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListProjectsResponse, error) {
|
|
|
|
|
func (c *vagrantClient) ListProjects(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListProjectsResponse, error) {
|
|
|
|
|
out := new(ListProjectsResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/ListProjects", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -270,7 +270,7 @@ func (c *vagrantClient) FindMachine(ctx context.Context, in *FindMachineRequest,
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) ListMachines(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*ListMachinesResponse, error) {
|
|
|
|
|
func (c *vagrantClient) ListMachines(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListMachinesResponse, error) {
|
|
|
|
|
out := new(ListMachinesResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/ListMachines", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -280,7 +280,7 @@ func (c *vagrantClient) ListMachines(ctx context.Context, in *empty.Empty, opts
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) GetLogStream(ctx context.Context, in *GetLogStreamRequest, opts ...grpc.CallOption) (Vagrant_GetLogStreamClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[0], "/hashicorp.vagrant.Vagrant/GetLogStream", opts...)
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[0], "/hashicorp.vagrant.Vagrant/GetLogStream", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -338,8 +338,8 @@ func (c *vagrantClient) QueueJob(ctx context.Context, in *QueueJobRequest, opts
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
|
out := new(empty.Empty)
|
|
|
|
|
func (c *vagrantClient) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
|
|
|
out := new(emptypb.Empty)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/CancelJob", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
@ -375,7 +375,7 @@ func (c *vagrantClient) ValidateJob(ctx context.Context, in *ValidateJobRequest,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) GetJobStream(ctx context.Context, in *GetJobStreamRequest, opts ...grpc.CallOption) (Vagrant_GetJobStreamClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[1], "/hashicorp.vagrant.Vagrant/GetJobStream", opts...)
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[1], "/hashicorp.vagrant.Vagrant/GetJobStream", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -415,7 +415,7 @@ func (c *vagrantClient) GetRunner(ctx context.Context, in *GetRunnerRequest, opt
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) GetServerConfig(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*GetServerConfigResponse, error) {
|
|
|
|
|
func (c *vagrantClient) GetServerConfig(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetServerConfigResponse, error) {
|
|
|
|
|
out := new(GetServerConfigResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/GetServerConfig", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -424,8 +424,8 @@ func (c *vagrantClient) GetServerConfig(ctx context.Context, in *empty.Empty, op
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) SetServerConfig(ctx context.Context, in *SetServerConfigRequest, opts ...grpc.CallOption) (*empty.Empty, error) {
|
|
|
|
|
out := new(empty.Empty)
|
|
|
|
|
func (c *vagrantClient) SetServerConfig(ctx context.Context, in *SetServerConfigRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
|
|
|
|
|
out := new(emptypb.Empty)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/SetServerConfig", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
@ -433,8 +433,8 @@ func (c *vagrantClient) SetServerConfig(ctx context.Context, in *SetServerConfig
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) CreateSnapshot(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (Vagrant_CreateSnapshotClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[2], "/hashicorp.vagrant.Vagrant/CreateSnapshot", opts...)
|
|
|
|
|
func (c *vagrantClient) CreateSnapshot(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (Vagrant_CreateSnapshotClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[2], "/hashicorp.vagrant.Vagrant/CreateSnapshot", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -466,7 +466,7 @@ func (x *vagrantCreateSnapshotClient) Recv() (*CreateSnapshotResponse, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) RestoreSnapshot(ctx context.Context, opts ...grpc.CallOption) (Vagrant_RestoreSnapshotClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[3], "/hashicorp.vagrant.Vagrant/RestoreSnapshot", opts...)
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[3], "/hashicorp.vagrant.Vagrant/RestoreSnapshot", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -476,7 +476,7 @@ func (c *vagrantClient) RestoreSnapshot(ctx context.Context, opts ...grpc.CallOp
|
|
|
|
|
|
|
|
|
|
type Vagrant_RestoreSnapshotClient interface {
|
|
|
|
|
Send(*RestoreSnapshotRequest) error
|
|
|
|
|
CloseAndRecv() (*empty.Empty, error)
|
|
|
|
|
CloseAndRecv() (*emptypb.Empty, error)
|
|
|
|
|
grpc.ClientStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -488,18 +488,18 @@ func (x *vagrantRestoreSnapshotClient) Send(m *RestoreSnapshotRequest) error {
|
|
|
|
|
return x.ClientStream.SendMsg(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *vagrantRestoreSnapshotClient) CloseAndRecv() (*empty.Empty, error) {
|
|
|
|
|
func (x *vagrantRestoreSnapshotClient) CloseAndRecv() (*emptypb.Empty, error) {
|
|
|
|
|
if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
m := new(empty.Empty)
|
|
|
|
|
m := new(emptypb.Empty)
|
|
|
|
|
if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) BootstrapToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error) {
|
|
|
|
|
func (c *vagrantClient) BootstrapToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error) {
|
|
|
|
|
out := new(NewTokenResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/BootstrapToken", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -517,7 +517,7 @@ func (c *vagrantClient) GenerateInviteToken(ctx context.Context, in *InviteToken
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) GenerateLoginToken(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error) {
|
|
|
|
|
func (c *vagrantClient) GenerateLoginToken(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*NewTokenResponse, error) {
|
|
|
|
|
out := new(NewTokenResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/GenerateLoginToken", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
@ -536,7 +536,7 @@ func (c *vagrantClient) ConvertInviteToken(ctx context.Context, in *ConvertInvit
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) RunnerConfig(ctx context.Context, opts ...grpc.CallOption) (Vagrant_RunnerConfigClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[4], "/hashicorp.vagrant.Vagrant/RunnerConfig", opts...)
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[4], "/hashicorp.vagrant.Vagrant/RunnerConfig", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -567,7 +567,7 @@ func (x *vagrantRunnerConfigClient) Recv() (*RunnerConfigResponse, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) RunnerJobStream(ctx context.Context, opts ...grpc.CallOption) (Vagrant_RunnerJobStreamClient, error) {
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &_Vagrant_serviceDesc.Streams[5], "/hashicorp.vagrant.Vagrant/RunnerJobStream", opts...)
|
|
|
|
|
stream, err := c.cc.NewStream(ctx, &Vagrant_ServiceDesc.Streams[5], "/hashicorp.vagrant.Vagrant/RunnerJobStream", opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -597,15 +597,6 @@ func (x *vagrantRunnerJobStreamClient) Recv() (*RunnerJobStreamResponse, error)
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (c *vagrantClient) RubyVagrantClientInfo(ctx context.Context, in *empty.Empty, opts ...grpc.CallOption) (*RubyVagrantClientInfoResponse, error) {
|
|
|
|
|
out := new(RubyVagrantClientInfoResponse)
|
|
|
|
|
err := c.cc.Invoke(ctx, "/hashicorp.vagrant.Vagrant/RubyVagrantClientInfo", in, out, opts...)
|
|
|
|
|
if err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
return out, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// VagrantServer is the server API for Vagrant service.
|
|
|
|
|
// All implementations must embed UnimplementedVagrantServer
|
|
|
|
|
// for forward compatibility
|
|
|
|
|
@ -613,11 +604,11 @@ type VagrantServer interface {
|
|
|
|
|
// GetVersionInfo returns information about the server. This RPC call does
|
|
|
|
|
// NOT require authentication. It can be used by clients to determine if they
|
|
|
|
|
// are capable of talking to this server.
|
|
|
|
|
GetVersionInfo(context.Context, *empty.Empty) (*GetVersionInfoResponse, error)
|
|
|
|
|
GetVersionInfo(context.Context, *emptypb.Empty) (*GetVersionInfoResponse, error)
|
|
|
|
|
UpsertBasis(context.Context, *UpsertBasisRequest) (*UpsertBasisResponse, error)
|
|
|
|
|
GetBasis(context.Context, *GetBasisRequest) (*GetBasisResponse, error)
|
|
|
|
|
FindBasis(context.Context, *FindBasisRequest) (*FindBasisResponse, error)
|
|
|
|
|
ListBasis(context.Context, *empty.Empty) (*ListBasisResponse, error)
|
|
|
|
|
ListBasis(context.Context, *emptypb.Empty) (*ListBasisResponse, error)
|
|
|
|
|
// ListTasks returns the tasks.
|
|
|
|
|
ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error)
|
|
|
|
|
// GetTask returns a task
|
|
|
|
|
@ -635,13 +626,13 @@ type VagrantServer interface {
|
|
|
|
|
// ListProjects returns a list of all the projects. There is no equivalent
|
|
|
|
|
// ListApplications because applications are a part of projects and you
|
|
|
|
|
// can use GetProject to get more information about the project.
|
|
|
|
|
ListProjects(context.Context, *empty.Empty) (*ListProjectsResponse, error)
|
|
|
|
|
ListProjects(context.Context, *emptypb.Empty) (*ListProjectsResponse, error)
|
|
|
|
|
// UpsertMachine upserts a machine with a project. If the machine
|
|
|
|
|
// is already registered this does nothing.
|
|
|
|
|
UpsertMachine(context.Context, *UpsertMachineRequest) (*UpsertMachineResponse, error)
|
|
|
|
|
GetMachine(context.Context, *GetMachineRequest) (*GetMachineResponse, error)
|
|
|
|
|
FindMachine(context.Context, *FindMachineRequest) (*FindMachineResponse, error)
|
|
|
|
|
ListMachines(context.Context, *empty.Empty) (*ListMachinesResponse, error)
|
|
|
|
|
ListMachines(context.Context, *emptypb.Empty) (*ListMachinesResponse, error)
|
|
|
|
|
// GetLogStream reads the log stream for a deployment. This will immediately
|
|
|
|
|
// send a single LogEntry with the lines we have so far. If there are no
|
|
|
|
|
// available lines this will NOT block and instead will return an error.
|
|
|
|
|
@ -663,7 +654,7 @@ type VagrantServer interface {
|
|
|
|
|
//
|
|
|
|
|
// This RPC always returns immediately. You must use GetJob or GetJobStream
|
|
|
|
|
// to wait on the status of the cancellation.
|
|
|
|
|
CancelJob(context.Context, *CancelJobRequest) (*empty.Empty, error)
|
|
|
|
|
CancelJob(context.Context, *CancelJobRequest) (*emptypb.Empty, error)
|
|
|
|
|
// GetJob queries a job by ID.
|
|
|
|
|
GetJob(context.Context, *GetJobRequest) (*Job, error)
|
|
|
|
|
// INTERNAL: ListJobs lists all the jobs the server has processed. This
|
|
|
|
|
@ -680,11 +671,11 @@ type VagrantServer interface {
|
|
|
|
|
// GetRunner gets information about a single runner.
|
|
|
|
|
GetRunner(context.Context, *GetRunnerRequest) (*Runner, error)
|
|
|
|
|
// GetServerConfig sets configuration for the Vagrant server.
|
|
|
|
|
GetServerConfig(context.Context, *empty.Empty) (*GetServerConfigResponse, error)
|
|
|
|
|
GetServerConfig(context.Context, *emptypb.Empty) (*GetServerConfigResponse, error)
|
|
|
|
|
// SetServerConfig sets configuration for the Vagrant server.
|
|
|
|
|
SetServerConfig(context.Context, *SetServerConfigRequest) (*empty.Empty, error)
|
|
|
|
|
SetServerConfig(context.Context, *SetServerConfigRequest) (*emptypb.Empty, error)
|
|
|
|
|
// CreateSnapshot creates a new database snapshot.
|
|
|
|
|
CreateSnapshot(*empty.Empty, Vagrant_CreateSnapshotServer) error
|
|
|
|
|
CreateSnapshot(*emptypb.Empty, Vagrant_CreateSnapshotServer) error
|
|
|
|
|
// RestoreSnapshot performs a database restore with the given snapshot.
|
|
|
|
|
// This API doesn't do a full online restore, it only stages the restore
|
|
|
|
|
// for the next server start to finalize the restore. See the arguments for
|
|
|
|
|
@ -693,11 +684,11 @@ type VagrantServer interface {
|
|
|
|
|
// BootstrapToken returns the initial token for the server. This can only
|
|
|
|
|
// be requested once on first startup. After initial request this will
|
|
|
|
|
// always return a PermissionDenied error.
|
|
|
|
|
BootstrapToken(context.Context, *empty.Empty) (*NewTokenResponse, error)
|
|
|
|
|
BootstrapToken(context.Context, *emptypb.Empty) (*NewTokenResponse, error)
|
|
|
|
|
// Generate a new invite token that users can exchange for a login token.
|
|
|
|
|
GenerateInviteToken(context.Context, *InviteTokenRequest) (*NewTokenResponse, error)
|
|
|
|
|
// Generate a new login token that users can use to login directly.
|
|
|
|
|
GenerateLoginToken(context.Context, *empty.Empty) (*NewTokenResponse, error)
|
|
|
|
|
GenerateLoginToken(context.Context, *emptypb.Empty) (*NewTokenResponse, error)
|
|
|
|
|
// Exchange a invite token for a login token.
|
|
|
|
|
ConvertInviteToken(context.Context, *ConvertInviteTokenRequest) (*NewTokenResponse, error)
|
|
|
|
|
// RunnerConfig is called to register a runner and receive the configuration
|
|
|
|
|
@ -707,7 +698,6 @@ type VagrantServer interface {
|
|
|
|
|
// RunnerJobStream is called by a runner to request a single job for
|
|
|
|
|
// execution and update the status of that job.
|
|
|
|
|
RunnerJobStream(Vagrant_RunnerJobStreamServer) error
|
|
|
|
|
RubyVagrantClientInfo(context.Context, *empty.Empty) (*RubyVagrantClientInfoResponse, error)
|
|
|
|
|
mustEmbedUnimplementedVagrantServer()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -715,7 +705,7 @@ type VagrantServer interface {
|
|
|
|
|
type UnimplementedVagrantServer struct {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (UnimplementedVagrantServer) GetVersionInfo(context.Context, *empty.Empty) (*GetVersionInfoResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) GetVersionInfo(context.Context, *emptypb.Empty) (*GetVersionInfoResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetVersionInfo not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) UpsertBasis(context.Context, *UpsertBasisRequest) (*UpsertBasisResponse, error) {
|
|
|
|
|
@ -727,7 +717,7 @@ func (UnimplementedVagrantServer) GetBasis(context.Context, *GetBasisRequest) (*
|
|
|
|
|
func (UnimplementedVagrantServer) FindBasis(context.Context, *FindBasisRequest) (*FindBasisResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method FindBasis not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) ListBasis(context.Context, *empty.Empty) (*ListBasisResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) ListBasis(context.Context, *emptypb.Empty) (*ListBasisResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListBasis not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) ListTasks(context.Context, *ListTasksRequest) (*ListTasksResponse, error) {
|
|
|
|
|
@ -751,7 +741,7 @@ func (UnimplementedVagrantServer) GetProject(context.Context, *GetProjectRequest
|
|
|
|
|
func (UnimplementedVagrantServer) FindProject(context.Context, *FindProjectRequest) (*FindProjectResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method FindProject not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) ListProjects(context.Context, *empty.Empty) (*ListProjectsResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) ListProjects(context.Context, *emptypb.Empty) (*ListProjectsResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListProjects not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) UpsertMachine(context.Context, *UpsertMachineRequest) (*UpsertMachineResponse, error) {
|
|
|
|
|
@ -763,7 +753,7 @@ func (UnimplementedVagrantServer) GetMachine(context.Context, *GetMachineRequest
|
|
|
|
|
func (UnimplementedVagrantServer) FindMachine(context.Context, *FindMachineRequest) (*FindMachineResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method FindMachine not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) ListMachines(context.Context, *empty.Empty) (*ListMachinesResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) ListMachines(context.Context, *emptypb.Empty) (*ListMachinesResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method ListMachines not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) GetLogStream(*GetLogStreamRequest, Vagrant_GetLogStreamServer) error {
|
|
|
|
|
@ -778,7 +768,7 @@ func (UnimplementedVagrantServer) GetConfig(context.Context, *ConfigGetRequest)
|
|
|
|
|
func (UnimplementedVagrantServer) QueueJob(context.Context, *QueueJobRequest) (*QueueJobResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method QueueJob not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) CancelJob(context.Context, *CancelJobRequest) (*empty.Empty, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) CancelJob(context.Context, *CancelJobRequest) (*emptypb.Empty, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method CancelJob not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) GetJob(context.Context, *GetJobRequest) (*Job, error) {
|
|
|
|
|
@ -796,25 +786,25 @@ func (UnimplementedVagrantServer) GetJobStream(*GetJobStreamRequest, Vagrant_Get
|
|
|
|
|
func (UnimplementedVagrantServer) GetRunner(context.Context, *GetRunnerRequest) (*Runner, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetRunner not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) GetServerConfig(context.Context, *empty.Empty) (*GetServerConfigResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) GetServerConfig(context.Context, *emptypb.Empty) (*GetServerConfigResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetServerConfig not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) SetServerConfig(context.Context, *SetServerConfigRequest) (*empty.Empty, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) SetServerConfig(context.Context, *SetServerConfigRequest) (*emptypb.Empty, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method SetServerConfig not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) CreateSnapshot(*empty.Empty, Vagrant_CreateSnapshotServer) error {
|
|
|
|
|
func (UnimplementedVagrantServer) CreateSnapshot(*emptypb.Empty, Vagrant_CreateSnapshotServer) error {
|
|
|
|
|
return status.Errorf(codes.Unimplemented, "method CreateSnapshot not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) RestoreSnapshot(Vagrant_RestoreSnapshotServer) error {
|
|
|
|
|
return status.Errorf(codes.Unimplemented, "method RestoreSnapshot not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) BootstrapToken(context.Context, *empty.Empty) (*NewTokenResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) BootstrapToken(context.Context, *emptypb.Empty) (*NewTokenResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method BootstrapToken not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) GenerateInviteToken(context.Context, *InviteTokenRequest) (*NewTokenResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GenerateInviteToken not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) GenerateLoginToken(context.Context, *empty.Empty) (*NewTokenResponse, error) {
|
|
|
|
|
func (UnimplementedVagrantServer) GenerateLoginToken(context.Context, *emptypb.Empty) (*NewTokenResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GenerateLoginToken not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) ConvertInviteToken(context.Context, *ConvertInviteTokenRequest) (*NewTokenResponse, error) {
|
|
|
|
|
@ -826,9 +816,6 @@ func (UnimplementedVagrantServer) RunnerConfig(Vagrant_RunnerConfigServer) error
|
|
|
|
|
func (UnimplementedVagrantServer) RunnerJobStream(Vagrant_RunnerJobStreamServer) error {
|
|
|
|
|
return status.Errorf(codes.Unimplemented, "method RunnerJobStream not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) RubyVagrantClientInfo(context.Context, *empty.Empty) (*RubyVagrantClientInfoResponse, error) {
|
|
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method RubyVagrantClientInfo not implemented")
|
|
|
|
|
}
|
|
|
|
|
func (UnimplementedVagrantServer) mustEmbedUnimplementedVagrantServer() {}
|
|
|
|
|
|
|
|
|
|
// UnsafeVagrantServer may be embedded to opt out of forward compatibility for this service.
|
|
|
|
|
@ -839,11 +826,11 @@ type UnsafeVagrantServer interface {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func RegisterVagrantServer(s grpc.ServiceRegistrar, srv VagrantServer) {
|
|
|
|
|
s.RegisterService(&_Vagrant_serviceDesc, srv)
|
|
|
|
|
s.RegisterService(&Vagrant_ServiceDesc, srv)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_GetVersionInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -855,7 +842,7 @@ func _Vagrant_GetVersionInfo_Handler(srv interface{}, ctx context.Context, dec f
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/GetVersionInfo",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).GetVersionInfo(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).GetVersionInfo(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -915,7 +902,7 @@ func _Vagrant_FindBasis_Handler(srv interface{}, ctx context.Context, dec func(i
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_ListBasis_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -927,7 +914,7 @@ func _Vagrant_ListBasis_Handler(srv interface{}, ctx context.Context, dec func(i
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/ListBasis",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).ListBasis(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).ListBasis(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1059,7 +1046,7 @@ func _Vagrant_FindProject_Handler(srv interface{}, ctx context.Context, dec func
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_ListProjects_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -1071,7 +1058,7 @@ func _Vagrant_ListProjects_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/ListProjects",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).ListProjects(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).ListProjects(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1131,7 +1118,7 @@ func _Vagrant_FindMachine_Handler(srv interface{}, ctx context.Context, dec func
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_ListMachines_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -1143,7 +1130,7 @@ func _Vagrant_ListMachines_Handler(srv interface{}, ctx context.Context, dec fun
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/ListMachines",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).ListMachines(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).ListMachines(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1335,7 +1322,7 @@ func _Vagrant_GetRunner_Handler(srv interface{}, ctx context.Context, dec func(i
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_GetServerConfig_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -1347,7 +1334,7 @@ func _Vagrant_GetServerConfig_Handler(srv interface{}, ctx context.Context, dec
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/GetServerConfig",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).GetServerConfig(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).GetServerConfig(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1371,7 +1358,7 @@ func _Vagrant_SetServerConfig_Handler(srv interface{}, ctx context.Context, dec
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_CreateSnapshot_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
|
|
m := new(empty.Empty)
|
|
|
|
|
m := new(emptypb.Empty)
|
|
|
|
|
if err := stream.RecvMsg(m); err != nil {
|
|
|
|
|
return err
|
|
|
|
|
}
|
|
|
|
|
@ -1396,7 +1383,7 @@ func _Vagrant_RestoreSnapshot_Handler(srv interface{}, stream grpc.ServerStream)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type Vagrant_RestoreSnapshotServer interface {
|
|
|
|
|
SendAndClose(*empty.Empty) error
|
|
|
|
|
SendAndClose(*emptypb.Empty) error
|
|
|
|
|
Recv() (*RestoreSnapshotRequest, error)
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
@ -1405,7 +1392,7 @@ type vagrantRestoreSnapshotServer struct {
|
|
|
|
|
grpc.ServerStream
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (x *vagrantRestoreSnapshotServer) SendAndClose(m *empty.Empty) error {
|
|
|
|
|
func (x *vagrantRestoreSnapshotServer) SendAndClose(m *emptypb.Empty) error {
|
|
|
|
|
return x.ServerStream.SendMsg(m)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -1418,7 +1405,7 @@ func (x *vagrantRestoreSnapshotServer) Recv() (*RestoreSnapshotRequest, error) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_BootstrapToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -1430,7 +1417,7 @@ func _Vagrant_BootstrapToken_Handler(srv interface{}, ctx context.Context, dec f
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/BootstrapToken",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).BootstrapToken(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).BootstrapToken(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1454,7 +1441,7 @@ func _Vagrant_GenerateInviteToken_Handler(srv interface{}, ctx context.Context,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_GenerateLoginToken_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
in := new(emptypb.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
@ -1466,7 +1453,7 @@ func _Vagrant_GenerateLoginToken_Handler(srv interface{}, ctx context.Context, d
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/GenerateLoginToken",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).GenerateLoginToken(ctx, req.(*empty.Empty))
|
|
|
|
|
return srv.(VagrantServer).GenerateLoginToken(ctx, req.(*emptypb.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
@ -1541,25 +1528,10 @@ func (x *vagrantRunnerJobStreamServer) Recv() (*RunnerJobStreamRequest, error) {
|
|
|
|
|
return m, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func _Vagrant_RubyVagrantClientInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
in := new(empty.Empty)
|
|
|
|
|
if err := dec(in); err != nil {
|
|
|
|
|
return nil, err
|
|
|
|
|
}
|
|
|
|
|
if interceptor == nil {
|
|
|
|
|
return srv.(VagrantServer).RubyVagrantClientInfo(ctx, in)
|
|
|
|
|
}
|
|
|
|
|
info := &grpc.UnaryServerInfo{
|
|
|
|
|
Server: srv,
|
|
|
|
|
FullMethod: "/hashicorp.vagrant.Vagrant/RubyVagrantClientInfo",
|
|
|
|
|
}
|
|
|
|
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
return srv.(VagrantServer).RubyVagrantClientInfo(ctx, req.(*empty.Empty))
|
|
|
|
|
}
|
|
|
|
|
return interceptor(ctx, in, info, handler)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var _Vagrant_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
// Vagrant_ServiceDesc is the grpc.ServiceDesc for Vagrant service.
|
|
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
|
|
|
var Vagrant_ServiceDesc = grpc.ServiceDesc{
|
|
|
|
|
ServiceName: "hashicorp.vagrant.Vagrant",
|
|
|
|
|
HandlerType: (*VagrantServer)(nil),
|
|
|
|
|
Methods: []grpc.MethodDesc{
|
|
|
|
|
@ -1687,10 +1659,6 @@ var _Vagrant_serviceDesc = grpc.ServiceDesc{
|
|
|
|
|
MethodName: "ConvertInviteToken",
|
|
|
|
|
Handler: _Vagrant_ConvertInviteToken_Handler,
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
MethodName: "RubyVagrantClientInfo",
|
|
|
|
|
Handler: _Vagrant_RubyVagrantClientInfo_Handler,
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
Streams: []grpc.StreamDesc{
|
|
|
|
|
{
|
|
|
|
|
|