github.com/terramate-io/tf@v0.0.0-20230830114523-fce866b4dfcd/cloudplugin/cloudproto1/cloudproto1.pb.go (about)

     1  // Code generated by protoc-gen-go. DO NOT EDIT.
     2  // versions:
     3  // 	protoc-gen-go v1.31.0
     4  // 	protoc        v3.15.6
     5  // source: cloudproto1.proto
     6  
     7  package cloudproto1
     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  	protoreflect "google.golang.org/protobuf/reflect/protoreflect"
    15  	protoimpl "google.golang.org/protobuf/runtime/protoimpl"
    16  	reflect "reflect"
    17  	sync "sync"
    18  )
    19  
    20  const (
    21  	// Verify that this generated code is sufficiently up-to-date.
    22  	_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
    23  	// Verify that runtime/protoimpl is sufficiently up-to-date.
    24  	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
    25  )
    26  
    27  // CommandRequest is used to request the execution of a specific command with
    28  // provided flags. It is the raw args from the terraform cloud command.
    29  type CommandRequest struct {
    30  	state         protoimpl.MessageState
    31  	sizeCache     protoimpl.SizeCache
    32  	unknownFields protoimpl.UnknownFields
    33  
    34  	Args []string `protobuf:"bytes,1,rep,name=args,proto3" json:"args,omitempty"`
    35  }
    36  
    37  func (x *CommandRequest) Reset() {
    38  	*x = CommandRequest{}
    39  	if protoimpl.UnsafeEnabled {
    40  		mi := &file_cloudproto1_proto_msgTypes[0]
    41  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    42  		ms.StoreMessageInfo(mi)
    43  	}
    44  }
    45  
    46  func (x *CommandRequest) String() string {
    47  	return protoimpl.X.MessageStringOf(x)
    48  }
    49  
    50  func (*CommandRequest) ProtoMessage() {}
    51  
    52  func (x *CommandRequest) ProtoReflect() protoreflect.Message {
    53  	mi := &file_cloudproto1_proto_msgTypes[0]
    54  	if protoimpl.UnsafeEnabled && x != nil {
    55  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    56  		if ms.LoadMessageInfo() == nil {
    57  			ms.StoreMessageInfo(mi)
    58  		}
    59  		return ms
    60  	}
    61  	return mi.MessageOf(x)
    62  }
    63  
    64  // Deprecated: Use CommandRequest.ProtoReflect.Descriptor instead.
    65  func (*CommandRequest) Descriptor() ([]byte, []int) {
    66  	return file_cloudproto1_proto_rawDescGZIP(), []int{0}
    67  }
    68  
    69  func (x *CommandRequest) GetArgs() []string {
    70  	if x != nil {
    71  		return x.Args
    72  	}
    73  	return nil
    74  }
    75  
    76  // CommandResponse contains the result of the command execution, including any
    77  // output or errors.
    78  type CommandResponse struct {
    79  	state         protoimpl.MessageState
    80  	sizeCache     protoimpl.SizeCache
    81  	unknownFields protoimpl.UnknownFields
    82  
    83  	// Types that are assignable to Data:
    84  	//
    85  	//	*CommandResponse_ExitCode
    86  	//	*CommandResponse_Stdout
    87  	//	*CommandResponse_Stderr
    88  	Data isCommandResponse_Data `protobuf_oneof:"data"`
    89  }
    90  
    91  func (x *CommandResponse) Reset() {
    92  	*x = CommandResponse{}
    93  	if protoimpl.UnsafeEnabled {
    94  		mi := &file_cloudproto1_proto_msgTypes[1]
    95  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
    96  		ms.StoreMessageInfo(mi)
    97  	}
    98  }
    99  
   100  func (x *CommandResponse) String() string {
   101  	return protoimpl.X.MessageStringOf(x)
   102  }
   103  
   104  func (*CommandResponse) ProtoMessage() {}
   105  
   106  func (x *CommandResponse) ProtoReflect() protoreflect.Message {
   107  	mi := &file_cloudproto1_proto_msgTypes[1]
   108  	if protoimpl.UnsafeEnabled && x != nil {
   109  		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
   110  		if ms.LoadMessageInfo() == nil {
   111  			ms.StoreMessageInfo(mi)
   112  		}
   113  		return ms
   114  	}
   115  	return mi.MessageOf(x)
   116  }
   117  
   118  // Deprecated: Use CommandResponse.ProtoReflect.Descriptor instead.
   119  func (*CommandResponse) Descriptor() ([]byte, []int) {
   120  	return file_cloudproto1_proto_rawDescGZIP(), []int{1}
   121  }
   122  
   123  func (m *CommandResponse) GetData() isCommandResponse_Data {
   124  	if m != nil {
   125  		return m.Data
   126  	}
   127  	return nil
   128  }
   129  
   130  func (x *CommandResponse) GetExitCode() int32 {
   131  	if x, ok := x.GetData().(*CommandResponse_ExitCode); ok {
   132  		return x.ExitCode
   133  	}
   134  	return 0
   135  }
   136  
   137  func (x *CommandResponse) GetStdout() []byte {
   138  	if x, ok := x.GetData().(*CommandResponse_Stdout); ok {
   139  		return x.Stdout
   140  	}
   141  	return nil
   142  }
   143  
   144  func (x *CommandResponse) GetStderr() []byte {
   145  	if x, ok := x.GetData().(*CommandResponse_Stderr); ok {
   146  		return x.Stderr
   147  	}
   148  	return nil
   149  }
   150  
   151  type isCommandResponse_Data interface {
   152  	isCommandResponse_Data()
   153  }
   154  
   155  type CommandResponse_ExitCode struct {
   156  	ExitCode int32 `protobuf:"varint,1,opt,name=exitCode,proto3,oneof"`
   157  }
   158  
   159  type CommandResponse_Stdout struct {
   160  	Stdout []byte `protobuf:"bytes,2,opt,name=stdout,proto3,oneof"`
   161  }
   162  
   163  type CommandResponse_Stderr struct {
   164  	Stderr []byte `protobuf:"bytes,3,opt,name=stderr,proto3,oneof"`
   165  }
   166  
   167  func (*CommandResponse_ExitCode) isCommandResponse_Data() {}
   168  
   169  func (*CommandResponse_Stdout) isCommandResponse_Data() {}
   170  
   171  func (*CommandResponse_Stderr) isCommandResponse_Data() {}
   172  
   173  var File_cloudproto1_proto protoreflect.FileDescriptor
   174  
   175  var file_cloudproto1_proto_rawDesc = []byte{
   176  	0x0a, 0x11, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31, 0x2e, 0x70, 0x72,
   177  	0x6f, 0x74, 0x6f, 0x12, 0x0b, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31,
   178  	0x22, 0x24, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
   179  	0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
   180  	0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x22, 0x6b, 0x0a, 0x0f, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e,
   181  	0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1c, 0x0a, 0x08, 0x65, 0x78, 0x69,
   182  	0x74, 0x43, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x48, 0x00, 0x52, 0x08, 0x65,
   183  	0x78, 0x69, 0x74, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75,
   184  	0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x6f, 0x75,
   185  	0x74, 0x12, 0x18, 0x0a, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28,
   186  	0x0c, 0x48, 0x00, 0x52, 0x06, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x64,
   187  	0x61, 0x74, 0x61, 0x32, 0x5a, 0x0a, 0x0e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x53, 0x65,
   188  	0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x48, 0x0a, 0x07, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65,
   189  	0x12, 0x1b, 0x2e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31, 0x2e, 0x43,
   190  	0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e,
   191  	0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31, 0x2e, 0x43, 0x6f, 0x6d, 0x6d,
   192  	0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42,
   193  	0x41, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x68, 0x61,
   194  	0x73, 0x68, 0x69, 0x63, 0x6f, 0x72, 0x70, 0x2f, 0x74, 0x65, 0x72, 0x72, 0x61, 0x66, 0x6f, 0x72,
   195  	0x6d, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64,
   196  	0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x70, 0x72, 0x6f, 0x74,
   197  	0x6f, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
   198  }
   199  
   200  var (
   201  	file_cloudproto1_proto_rawDescOnce sync.Once
   202  	file_cloudproto1_proto_rawDescData = file_cloudproto1_proto_rawDesc
   203  )
   204  
   205  func file_cloudproto1_proto_rawDescGZIP() []byte {
   206  	file_cloudproto1_proto_rawDescOnce.Do(func() {
   207  		file_cloudproto1_proto_rawDescData = protoimpl.X.CompressGZIP(file_cloudproto1_proto_rawDescData)
   208  	})
   209  	return file_cloudproto1_proto_rawDescData
   210  }
   211  
   212  var file_cloudproto1_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
   213  var file_cloudproto1_proto_goTypes = []interface{}{
   214  	(*CommandRequest)(nil),  // 0: cloudproto1.CommandRequest
   215  	(*CommandResponse)(nil), // 1: cloudproto1.CommandResponse
   216  }
   217  var file_cloudproto1_proto_depIdxs = []int32{
   218  	0, // 0: cloudproto1.CommandService.Execute:input_type -> cloudproto1.CommandRequest
   219  	1, // 1: cloudproto1.CommandService.Execute:output_type -> cloudproto1.CommandResponse
   220  	1, // [1:2] is the sub-list for method output_type
   221  	0, // [0:1] is the sub-list for method input_type
   222  	0, // [0:0] is the sub-list for extension type_name
   223  	0, // [0:0] is the sub-list for extension extendee
   224  	0, // [0:0] is the sub-list for field type_name
   225  }
   226  
   227  func init() { file_cloudproto1_proto_init() }
   228  func file_cloudproto1_proto_init() {
   229  	if File_cloudproto1_proto != nil {
   230  		return
   231  	}
   232  	if !protoimpl.UnsafeEnabled {
   233  		file_cloudproto1_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
   234  			switch v := v.(*CommandRequest); i {
   235  			case 0:
   236  				return &v.state
   237  			case 1:
   238  				return &v.sizeCache
   239  			case 2:
   240  				return &v.unknownFields
   241  			default:
   242  				return nil
   243  			}
   244  		}
   245  		file_cloudproto1_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
   246  			switch v := v.(*CommandResponse); i {
   247  			case 0:
   248  				return &v.state
   249  			case 1:
   250  				return &v.sizeCache
   251  			case 2:
   252  				return &v.unknownFields
   253  			default:
   254  				return nil
   255  			}
   256  		}
   257  	}
   258  	file_cloudproto1_proto_msgTypes[1].OneofWrappers = []interface{}{
   259  		(*CommandResponse_ExitCode)(nil),
   260  		(*CommandResponse_Stdout)(nil),
   261  		(*CommandResponse_Stderr)(nil),
   262  	}
   263  	type x struct{}
   264  	out := protoimpl.TypeBuilder{
   265  		File: protoimpl.DescBuilder{
   266  			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
   267  			RawDescriptor: file_cloudproto1_proto_rawDesc,
   268  			NumEnums:      0,
   269  			NumMessages:   2,
   270  			NumExtensions: 0,
   271  			NumServices:   1,
   272  		},
   273  		GoTypes:           file_cloudproto1_proto_goTypes,
   274  		DependencyIndexes: file_cloudproto1_proto_depIdxs,
   275  		MessageInfos:      file_cloudproto1_proto_msgTypes,
   276  	}.Build()
   277  	File_cloudproto1_proto = out.File
   278  	file_cloudproto1_proto_rawDesc = nil
   279  	file_cloudproto1_proto_goTypes = nil
   280  	file_cloudproto1_proto_depIdxs = nil
   281  }
   282  
   283  // Reference imports to suppress errors if they are not otherwise used.
   284  var _ context.Context
   285  var _ grpc.ClientConnInterface
   286  
   287  // This is a compile-time assertion to ensure that this generated file
   288  // is compatible with the grpc package it is being compiled against.
   289  const _ = grpc.SupportPackageIsVersion6
   290  
   291  // CommandServiceClient is the client API for CommandService service.
   292  //
   293  // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
   294  type CommandServiceClient interface {
   295  	// Execute runs a specific command with the provided flags and returns the result.
   296  	Execute(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (CommandService_ExecuteClient, error)
   297  }
   298  
   299  type commandServiceClient struct {
   300  	cc grpc.ClientConnInterface
   301  }
   302  
   303  func NewCommandServiceClient(cc grpc.ClientConnInterface) CommandServiceClient {
   304  	return &commandServiceClient{cc}
   305  }
   306  
   307  func (c *commandServiceClient) Execute(ctx context.Context, in *CommandRequest, opts ...grpc.CallOption) (CommandService_ExecuteClient, error) {
   308  	stream, err := c.cc.NewStream(ctx, &_CommandService_serviceDesc.Streams[0], "/cloudproto1.CommandService/Execute", opts...)
   309  	if err != nil {
   310  		return nil, err
   311  	}
   312  	x := &commandServiceExecuteClient{stream}
   313  	if err := x.ClientStream.SendMsg(in); err != nil {
   314  		return nil, err
   315  	}
   316  	if err := x.ClientStream.CloseSend(); err != nil {
   317  		return nil, err
   318  	}
   319  	return x, nil
   320  }
   321  
   322  type CommandService_ExecuteClient interface {
   323  	Recv() (*CommandResponse, error)
   324  	grpc.ClientStream
   325  }
   326  
   327  type commandServiceExecuteClient struct {
   328  	grpc.ClientStream
   329  }
   330  
   331  func (x *commandServiceExecuteClient) Recv() (*CommandResponse, error) {
   332  	m := new(CommandResponse)
   333  	if err := x.ClientStream.RecvMsg(m); err != nil {
   334  		return nil, err
   335  	}
   336  	return m, nil
   337  }
   338  
   339  // CommandServiceServer is the server API for CommandService service.
   340  type CommandServiceServer interface {
   341  	// Execute runs a specific command with the provided flags and returns the result.
   342  	Execute(*CommandRequest, CommandService_ExecuteServer) error
   343  }
   344  
   345  // UnimplementedCommandServiceServer can be embedded to have forward compatible implementations.
   346  type UnimplementedCommandServiceServer struct {
   347  }
   348  
   349  func (*UnimplementedCommandServiceServer) Execute(*CommandRequest, CommandService_ExecuteServer) error {
   350  	return status.Errorf(codes.Unimplemented, "method Execute not implemented")
   351  }
   352  
   353  func RegisterCommandServiceServer(s *grpc.Server, srv CommandServiceServer) {
   354  	s.RegisterService(&_CommandService_serviceDesc, srv)
   355  }
   356  
   357  func _CommandService_Execute_Handler(srv interface{}, stream grpc.ServerStream) error {
   358  	m := new(CommandRequest)
   359  	if err := stream.RecvMsg(m); err != nil {
   360  		return err
   361  	}
   362  	return srv.(CommandServiceServer).Execute(m, &commandServiceExecuteServer{stream})
   363  }
   364  
   365  type CommandService_ExecuteServer interface {
   366  	Send(*CommandResponse) error
   367  	grpc.ServerStream
   368  }
   369  
   370  type commandServiceExecuteServer struct {
   371  	grpc.ServerStream
   372  }
   373  
   374  func (x *commandServiceExecuteServer) Send(m *CommandResponse) error {
   375  	return x.ServerStream.SendMsg(m)
   376  }
   377  
   378  var _CommandService_serviceDesc = grpc.ServiceDesc{
   379  	ServiceName: "cloudproto1.CommandService",
   380  	HandlerType: (*CommandServiceServer)(nil),
   381  	Methods:     []grpc.MethodDesc{},
   382  	Streams: []grpc.StreamDesc{
   383  		{
   384  			StreamName:    "Execute",
   385  			Handler:       _CommandService_Execute_Handler,
   386  			ServerStreams: true,
   387  		},
   388  	},
   389  	Metadata: "cloudproto1.proto",
   390  }