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