From ef167d692ebac40d60819987d2f11c47fa4658dc Mon Sep 17 00:00:00 2001 From: Gyanendra Mishra Date: Mon, 20 Mar 2023 15:44:43 +0100 Subject: [PATCH] feat: print files artifacts registered in an enclave during enclave inspect (#228) Closes https://github.com/kurtosis-tech/kurtosis/issues/176 --- .circleci/config.yml | 4 + .../api_container_service.pb.go | 677 +++++++++++------- .../api_container_service_grpc.pb.go | 123 +++- .../core/lib/enclaves/enclave_context.go | 9 + .../engine_service.pb.go | 45 +- .../engine_service_grpc.pb.go | 51 +- api/protobuf/core/api_container_service.proto | 18 + .../api_container_service_grpc_pb.d.ts | 5 + .../api_container_service_grpc_pb.js | 22 + .../api_container_service_grpc_web_pb.d.ts | 12 + .../api_container_service_grpc_web_pb.js | 63 +- .../api_container_service_pb.d.ts | 42 ++ .../api_container_service_pb.js | 372 +++++++++- .../src/core/lib/enclaves/enclave_context.ts | 13 +- .../enclaves/generic_api_container_client.ts | 6 +- .../grpc_node_api_container_client.ts | 30 +- .../enclaves/grpc_web_api_container_client.ts | 27 +- .../engine_service_grpc_web_pb.js | 2 +- .../engine_service_pb.js | 8 +- .../enclave/inspect/files_artifacts.go | 62 ++ .../enclave/inspect/files_artifacts_test.go | 29 + cli/cli/commands/enclave/inspect/inspect.go | 14 +- .../commands/enclave/inspect/user_services.go | 3 +- .../server/api_container_service.go | 13 + .../file_artifact_name_and_uuid.go | 14 + .../files_artifact_store.go | 15 + .../files_artifact_store_test.go | 23 + docs/docs/reference/sdk.md | 11 +- 28 files changed, 1381 insertions(+), 332 deletions(-) create mode 100644 cli/cli/commands/enclave/inspect/files_artifacts.go create mode 100644 cli/cli/commands/enclave/inspect/files_artifacts_test.go create mode 100644 core/server/commons/enclave_data_directory/file_artifact_name_and_uuid.go diff --git a/.circleci/config.yml b/.circleci/config.yml index 94d5c91ad4..e399c1d726 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -560,6 +560,10 @@ jobs: test_old_enclave_continuity: executor: ubuntu_vm steps: + # TODO remove this after version > 0.68.12 is out + # This exits the test_old_enclave_continuity immediately + # after a new version is out we remove these comments and this line + - run: circleci-agent step halt - checkout - <<: *abort_job_if_only_docs_changes diff --git a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go index 32d8450635..511881f9cc 100644 --- a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go +++ b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.1 // protoc v3.21.12 // source: api_container_service.proto @@ -71,7 +71,9 @@ func (Port_TransportProtocol) EnumDescriptor() ([]byte, []int) { } // ============================================================================================== -// Shared Objects (Used By Multiple Endpoints) +// +// Shared Objects (Used By Multiple Endpoints) +// // ============================================================================================== type Port struct { state protoimpl.MessageState @@ -153,7 +155,9 @@ type ServiceInfo struct { // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info MaybePublicIpAddr string `protobuf:"bytes,4,opt,name=maybe_public_ip_addr,json=maybePublicIpAddr,proto3" json:"maybe_public_ip_addr,omitempty"` // Mapping defining the ports that the service can be reached at *outside* the enclave, in the user_defined_port_id -> port_info where user_defined_port_id - // corresponds to the ID that was passed in in StartServiceArgs + // + // corresponds to the ID that was passed in in StartServiceArgs + // // NOTE: Will be empty if the service isn't running, the service didn't define any ports, or the backend doesn't support reporting public service info MaybePublicPorts map[string]*Port `protobuf:"bytes,5,rep,name=maybe_public_ports,json=maybePublicPorts,proto3" json:"maybe_public_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Name of the service @@ -251,7 +255,7 @@ type ServiceConfig struct { ContainerImageName string `protobuf:"bytes,1,opt,name=container_image_name,json=containerImageName,proto3" json:"container_image_name,omitempty"` // Definition of the ports *inside* the enclave that the container should have exposed, specified as user_friendly_port_id -> port_definition PrivatePorts map[string]*Port `protobuf:"bytes,2,rep,name=private_ports,json=privatePorts,proto3" json:"private_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` - //TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution + // TODO this is a huge hack to temporarily enable static ports for NEAR until we have a more productized solution PublicPorts map[string]*Port `protobuf:"bytes,3,rep,name=public_ports,json=publicPorts,proto3" json:"public_ports,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Corresponds to a Dockerfile's ENTRYPOINT directive; leave blank to do no overriding EntrypointArgs []string `protobuf:"bytes,4,rep,name=entrypoint_args,json=entrypointArgs,proto3" json:"entrypoint_args,omitempty"` @@ -432,7 +436,9 @@ func (x *UpdateServiceConfig) GetSubnetwork() string { } // ============================================================================================== -// Execute Starlark Arguments +// +// Execute Starlark Arguments +// // ============================================================================================== type RunStarlarkScriptArgs struct { state protoimpl.MessageState @@ -517,6 +523,7 @@ type RunStarlarkPackageArgs struct { // This should be a valid JSON string // // Types that are assignable to StarlarkPackageContent: + // // *RunStarlarkPackageArgs_Local // *RunStarlarkPackageArgs_Remote StarlarkPackageContent isRunStarlarkPackageArgs_StarlarkPackageContent `protobuf_oneof:"starlark_package_content"` @@ -625,7 +632,9 @@ func (*RunStarlarkPackageArgs_Local) isRunStarlarkPackageArgs_StarlarkPackageCon func (*RunStarlarkPackageArgs_Remote) isRunStarlarkPackageArgs_StarlarkPackageContent() {} // ============================================================================================== -// Starlark Execution Response +// +// Starlark Execution Response +// // ============================================================================================== type StarlarkRunResponseLine struct { state protoimpl.MessageState @@ -633,6 +642,7 @@ type StarlarkRunResponseLine struct { unknownFields protoimpl.UnknownFields // Types that are assignable to RunResponseLine: + // // *StarlarkRunResponseLine_Instruction // *StarlarkRunResponseLine_Error // *StarlarkRunResponseLine_ProgressInfo @@ -999,6 +1009,7 @@ type StarlarkError struct { unknownFields protoimpl.UnknownFields // Types that are assignable to Error: + // // *StarlarkError_InterpretationError // *StarlarkError_ValidationError // *StarlarkError_ExecutionError @@ -1347,7 +1358,9 @@ func (x *StarlarkRunFinishedEvent) GetSerializedOutput() string { } // ============================================================================================== -// Start Service +// +// Start Service +// // ============================================================================================== type StartServicesArgs struct { state protoimpl.MessageState @@ -1454,7 +1467,9 @@ func (x *StartServicesResponse) GetFailedServiceNameToError() map[string]string } // ============================================================================================== -// Get Services +// +// Get Services +// // ============================================================================================== type GetServicesArgs struct { state protoimpl.MessageState @@ -1668,7 +1683,9 @@ func (x *GetExistingAndHistoricalServiceIdentifiersResponse) GetAllIdentifiers() } // ============================================================================================== -// Remove Service +// +// Remove Service +// // ============================================================================================== type RemoveServiceArgs struct { state protoimpl.MessageState @@ -1766,7 +1783,9 @@ func (x *RemoveServiceResponse) GetServiceUuid() string { } // ============================================================================================== -// Repartition +// +// Repartition +// // ============================================================================================== type RepartitionArgs struct { state protoimpl.MessageState @@ -1778,7 +1797,8 @@ type RepartitionArgs struct { // Definition of partitionIdA -> partitionIdB -> information defining the connection between A <-> B PartitionConnections map[string]*PartitionConnections `protobuf:"bytes,2,rep,name=partition_connections,json=partitionConnections,proto3" json:"partition_connections,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` // Information about the default inter-partition connection to set up if one is not defined in the - // partition connections map + // + // partition connections map DefaultConnection *PartitionConnectionInfo `protobuf:"bytes,3,opt,name=default_connection,json=defaultConnection,proto3" json:"default_connection,omitempty"` } @@ -1979,7 +1999,9 @@ func (x *PartitionConnectionInfo) GetPacketLossPercentage() float32 { } // ============================================================================================== -// Exec Command +// +// Exec Command +// // ============================================================================================== type ExecCommandArgs struct { state protoimpl.MessageState @@ -2038,7 +2060,9 @@ func (x *ExecCommandArgs) GetCommandArgs() []string { } // ============================================================================================== -// Pause/Unpause Service +// +// Pause/Unpause Service +// // ============================================================================================== type PauseServiceArgs struct { state protoimpl.MessageState @@ -2193,26 +2217,28 @@ func (x *ExecCommandResponse) GetLogOutput() string { } // ============================================================================================== -// Wait For HTTP Get Endpoint Availability +// +// Wait For HTTP Get Endpoint Availability +// // ============================================================================================== type WaitForHttpGetEndpointAvailabilityArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //The identifier of the service to check. + // The identifier of the service to check. ServiceIdentifier string `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - //The port of the service to check. For instance 8080 + // The port of the service to check. For instance 8080 Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - //The path of the service to check. It mustn't start with the first slash. For instance `service/health` + // The path of the service to check. It mustn't start with the first slash. For instance `service/health` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - //The number of milliseconds to wait until executing the first HTTP call + // The number of milliseconds to wait until executing the first HTTP call InitialDelayMilliseconds uint32 `protobuf:"varint,4,opt,name=initial_delay_milliseconds,json=initialDelayMilliseconds,proto3" json:"initial_delay_milliseconds,omitempty"` - //Max number of HTTP call attempts that this will execute until giving up and returning an error + // Max number of HTTP call attempts that this will execute until giving up and returning an error Retries uint32 `protobuf:"varint,5,opt,name=retries,proto3" json:"retries,omitempty"` - //Number of milliseconds to wait between retries + // Number of milliseconds to wait between retries RetriesDelayMilliseconds uint32 `protobuf:"varint,6,opt,name=retries_delay_milliseconds,json=retriesDelayMilliseconds,proto3" json:"retries_delay_milliseconds,omitempty"` - //If the endpoint returns this value, the service will be marked as available (e.g. Hello World). + // If the endpoint returns this value, the service will be marked as available (e.g. Hello World). BodyText string `protobuf:"bytes,7,opt,name=body_text,json=bodyText,proto3" json:"body_text,omitempty"` } @@ -2298,28 +2324,30 @@ func (x *WaitForHttpGetEndpointAvailabilityArgs) GetBodyText() string { } // ============================================================================================== -// Wait For HTTP Post Endpoint Availability +// +// Wait For HTTP Post Endpoint Availability +// // ============================================================================================== type WaitForHttpPostEndpointAvailabilityArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //The identifier of the service to check. + // The identifier of the service to check. ServiceIdentifier string `protobuf:"bytes,1,opt,name=service_identifier,json=serviceIdentifier,proto3" json:"service_identifier,omitempty"` - //The port of the service to check. For instance 8080 + // The port of the service to check. For instance 8080 Port uint32 `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"` - //The path of the service to check. It mustn't start with the first slash. For instance `service/health` + // The path of the service to check. It mustn't start with the first slash. For instance `service/health` Path string `protobuf:"bytes,3,opt,name=path,proto3" json:"path,omitempty"` - //The content of the request body. + // The content of the request body. RequestBody string `protobuf:"bytes,4,opt,name=request_body,json=requestBody,proto3" json:"request_body,omitempty"` - //The number of milliseconds to wait until executing the first HTTP call + // The number of milliseconds to wait until executing the first HTTP call InitialDelayMilliseconds uint32 `protobuf:"varint,5,opt,name=initial_delay_milliseconds,json=initialDelayMilliseconds,proto3" json:"initial_delay_milliseconds,omitempty"` - //Max number of HTTP call attempts that this will execute until giving up and returning an error + // Max number of HTTP call attempts that this will execute until giving up and returning an error Retries uint32 `protobuf:"varint,6,opt,name=retries,proto3" json:"retries,omitempty"` - //Number of milliseconds to wait between retries + // Number of milliseconds to wait between retries RetriesDelayMilliseconds uint32 `protobuf:"varint,7,opt,name=retries_delay_milliseconds,json=retriesDelayMilliseconds,proto3" json:"retries_delay_milliseconds,omitempty"` - //If the endpoint returns this value, the service will be marked as available (e.g. Hello World). + // If the endpoint returns this value, the service will be marked as available (e.g. Hello World). BodyText string `protobuf:"bytes,8,opt,name=body_text,json=bodyText,proto3" json:"body_text,omitempty"` } @@ -2412,7 +2440,9 @@ func (x *WaitForHttpPostEndpointAvailabilityArgs) GetBodyText() string { } // ============================================================================================== -// Upload Files Artifact +// +// Upload Files Artifact +// // ============================================================================================== type UploadFilesArtifactArgs struct { state protoimpl.MessageState @@ -2529,7 +2559,9 @@ func (x *UploadFilesArtifactResponse) GetName() string { } // ============================================================================================== -// Download Files Artifact +// +// Download Files Artifact +// // ============================================================================================== type DownloadFilesArtifactArgs struct { state protoimpl.MessageState @@ -2628,7 +2660,9 @@ func (x *DownloadFilesArtifactResponse) GetData() []byte { } // ============================================================================================== -// Store Web Files Artifact +// +// Store Web Files Artifact +// // ============================================================================================== type StoreWebFilesArtifactArgs struct { state protoimpl.MessageState @@ -2954,6 +2988,110 @@ func (x *RenderTemplatesToFilesArtifactResponse) GetUuid() string { return "" } +type FilesArtifactNameAndUuid struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // A string representing the name of the file + FileName string `protobuf:"bytes,1,opt,name=fileName,proto3" json:"fileName,omitempty"` + // A string representing the uuid of the file + FileUuid string `protobuf:"bytes,2,opt,name=fileUuid,proto3" json:"fileUuid,omitempty"` +} + +func (x *FilesArtifactNameAndUuid) Reset() { + *x = FilesArtifactNameAndUuid{} + if protoimpl.UnsafeEnabled { + mi := &file_api_container_service_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilesArtifactNameAndUuid) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilesArtifactNameAndUuid) ProtoMessage() {} + +func (x *FilesArtifactNameAndUuid) ProtoReflect() protoreflect.Message { + mi := &file_api_container_service_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilesArtifactNameAndUuid.ProtoReflect.Descriptor instead. +func (*FilesArtifactNameAndUuid) Descriptor() ([]byte, []int) { + return file_api_container_service_proto_rawDescGZIP(), []int{45} +} + +func (x *FilesArtifactNameAndUuid) GetFileName() string { + if x != nil { + return x.FileName + } + return "" +} + +func (x *FilesArtifactNameAndUuid) GetFileUuid() string { + if x != nil { + return x.FileUuid + } + return "" +} + +type ListFilesArtifactNamesAndUuidsResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + FileNamesAndUuids []*FilesArtifactNameAndUuid `protobuf:"bytes,1,rep,name=file_names_and_uuids,json=fileNamesAndUuids,proto3" json:"file_names_and_uuids,omitempty"` +} + +func (x *ListFilesArtifactNamesAndUuidsResponse) Reset() { + *x = ListFilesArtifactNamesAndUuidsResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_api_container_service_proto_msgTypes[46] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ListFilesArtifactNamesAndUuidsResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ListFilesArtifactNamesAndUuidsResponse) ProtoMessage() {} + +func (x *ListFilesArtifactNamesAndUuidsResponse) ProtoReflect() protoreflect.Message { + mi := &file_api_container_service_proto_msgTypes[46] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use ListFilesArtifactNamesAndUuidsResponse.ProtoReflect.Descriptor instead. +func (*ListFilesArtifactNamesAndUuidsResponse) Descriptor() ([]byte, []int) { + return file_api_container_service_proto_rawDescGZIP(), []int{46} +} + +func (x *ListFilesArtifactNamesAndUuidsResponse) GetFileNamesAndUuids() []*FilesArtifactNameAndUuid { + if x != nil { + return x.FileNamesAndUuids + } + return nil +} + // An object representing the template and the data that needs to be inserted type RenderTemplatesToFilesArtifactArgs_TemplateAndData struct { state protoimpl.MessageState @@ -2969,7 +3107,7 @@ type RenderTemplatesToFilesArtifactArgs_TemplateAndData struct { func (x *RenderTemplatesToFilesArtifactArgs_TemplateAndData) Reset() { *x = RenderTemplatesToFilesArtifactArgs_TemplateAndData{} if protoimpl.UnsafeEnabled { - mi := &file_api_container_service_proto_msgTypes[60] + mi := &file_api_container_service_proto_msgTypes[62] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2982,7 +3120,7 @@ func (x *RenderTemplatesToFilesArtifactArgs_TemplateAndData) String() string { func (*RenderTemplatesToFilesArtifactArgs_TemplateAndData) ProtoMessage() {} func (x *RenderTemplatesToFilesArtifactArgs_TemplateAndData) ProtoReflect() protoreflect.Message { - mi := &file_api_container_service_proto_msgTypes[60] + mi := &file_api_container_service_proto_msgTypes[62] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -3585,133 +3723,155 @@ var file_api_container_service_proto_rawDesc = []byte{ 0x0a, 0x26, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x75, 0x75, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x32, 0x82, 0x0f, 0x0a, - 0x13, 0x41, 0x70, 0x69, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, - 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, - 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x41, - 0x72, 0x67, 0x73, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, - 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, - 0x00, 0x30, 0x01, 0x12, 0x6f, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, - 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, - 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, - 0x6b, 0x52, 0x75, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, - 0x22, 0x00, 0x30, 0x01, 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, - 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, - 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, - 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, - 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, - 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, - 0x65, 0x72, 0x73, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x45, 0x2e, 0x61, 0x70, - 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, - 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, - 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x00, 0x12, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, - 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, - 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, - 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x61, 0x72, - 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, - 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, - 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x12, 0x4d, 0x0a, 0x0c, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x75, 0x75, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x18, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, + 0x65, 0x41, 0x6e, 0x64, 0x55, 0x75, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, + 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x55, 0x75, 0x69, 0x64, + 0x22, 0x86, 0x01, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x55, 0x75, + 0x69, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x14, 0x66, + 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x5f, 0x61, 0x6e, 0x64, 0x5f, 0x75, 0x75, + 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x70, 0x69, 0x5f, + 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x41, + 0x6e, 0x64, 0x55, 0x75, 0x69, 0x64, 0x52, 0x11, 0x66, 0x69, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, + 0x73, 0x41, 0x6e, 0x64, 0x55, 0x75, 0x69, 0x64, 0x73, 0x32, 0xf9, 0x0f, 0x0a, 0x13, 0x41, 0x70, + 0x69, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x12, 0x6d, 0x0a, 0x11, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, + 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x12, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, + 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x41, 0x72, 0x67, 0x73, + 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x52, 0x75, 0x6e, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0x00, 0x30, 0x01, + 0x12, 0x6f, 0x0a, 0x12, 0x52, 0x75, 0x6e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, + 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x75, 0x6e, 0x53, 0x74, + 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x41, 0x72, 0x67, + 0x73, 0x1a, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x6c, 0x61, 0x72, 0x6b, 0x52, 0x75, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x4c, 0x69, 0x6e, 0x65, 0x22, 0x00, 0x30, + 0x01, 0x12, 0x61, 0x0a, 0x0d, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x61, + 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x73, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, + 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x8d, 0x01, 0x0a, 0x2a, 0x47, 0x65, 0x74, 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x45, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x47, 0x65, 0x74, + 0x45, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x41, 0x6e, 0x64, 0x48, 0x69, 0x73, 0x74, 0x6f, + 0x72, 0x69, 0x63, 0x61, 0x6c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x65, 0x6e, + 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, + 0x00, 0x12, 0x61, 0x0a, 0x0d, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, + 0x63, 0x65, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x28, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6d, + 0x6f, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0b, 0x52, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, + 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, + 0x00, 0x12, 0x5b, 0x0a, 0x0b, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x12, 0x22, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, + 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x43, 0x6f, 0x6d, + 0x6d, 0x61, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x4d, + 0x0a, 0x0c, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x23, + 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, + 0x70, 0x69, 0x2e, 0x50, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, + 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x51, 0x0a, + 0x0e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, + 0x25, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, - 0x12, 0x51, 0x0a, 0x0e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x12, 0x25, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x75, 0x73, 0x65, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, - 0x79, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x22, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, - 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, - 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, - 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, - 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x7b, - 0x0a, 0x23, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, - 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, - 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x3a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, - 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, - 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, + 0x12, 0x79, 0x0a, 0x22, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, + 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, + 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x47, 0x65, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x13, 0x55, - 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, - 0x63, 0x74, 0x12, 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, - 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, - 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, - 0x70, 0x69, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, - 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x12, 0x79, 0x0a, 0x15, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, - 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, - 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, - 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, - 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, - 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, - 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x15, 0x53, - 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, - 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, - 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, - 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, - 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, - 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x91, 0x01, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x72, 0x65, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, - 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, - 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, - 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, - 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x38, - 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, - 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, - 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x94, 0x01, 0x0a, 0x1e, 0x52, + 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x7b, 0x0a, 0x23, 0x57, + 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, + 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, + 0x74, 0x79, 0x12, 0x3a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, + 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x57, 0x61, 0x69, 0x74, 0x46, 0x6f, 0x72, 0x48, 0x74, + 0x74, 0x70, 0x50, 0x6f, 0x73, 0x74, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x41, 0x76, + 0x61, 0x69, 0x6c, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x16, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x13, 0x55, 0x70, 0x6c, 0x6f, + 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, + 0x2a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, + 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x2e, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, + 0x15, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, + 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, + 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, + 0x6f, 0x61, 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, + 0x41, 0x72, 0x67, 0x73, 0x1a, 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, + 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, + 0x64, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x79, 0x0a, 0x15, 0x53, 0x74, 0x6f, 0x72, + 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, + 0x74, 0x12, 0x2c, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, + 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, 0x73, 0x1a, + 0x30, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, + 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x57, 0x65, 0x62, 0x46, 0x69, 0x6c, 0x65, + 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x22, 0x00, 0x12, 0x91, 0x01, 0x0a, 0x1d, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x34, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, + 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, + 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x41, 0x72, 0x67, 0x73, 0x1a, 0x38, 0x2e, 0x61, 0x70, + 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, + 0x53, 0x74, 0x6f, 0x72, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, + 0x63, 0x74, 0x46, 0x72, 0x6f, 0x6d, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x94, 0x01, 0x0a, 0x1e, 0x52, 0x65, 0x6e, 0x64, + 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, + 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x35, 0x2e, 0x61, 0x70, 0x69, + 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, - 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x12, 0x35, 0x2e, - 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, - 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, - 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, - 0x41, 0x72, 0x67, 0x73, 0x1a, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, - 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, - 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, 0x68, 0x2f, 0x6b, 0x75, - 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, 0x6f, 0x6c, 0x61, 0x6e, - 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x5f, - 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, 0x5f, 0x62, 0x69, 0x6e, - 0x64, 0x69, 0x6e, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x41, 0x72, 0x67, + 0x73, 0x1a, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, + 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x52, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, + 0x6c, 0x61, 0x74, 0x65, 0x73, 0x54, 0x6f, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, + 0x66, 0x61, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x75, + 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, + 0x61, 0x63, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x55, 0x75, 0x69, 0x64, 0x73, + 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, + 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x39, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x63, + 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x61, 0x70, 0x69, 0x2e, 0x4c, 0x69, 0x73, + 0x74, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x41, 0x72, 0x74, 0x69, 0x66, 0x61, 0x63, 0x74, 0x4e, 0x61, + 0x6d, 0x65, 0x73, 0x41, 0x6e, 0x64, 0x55, 0x75, 0x69, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x52, 0x5a, 0x50, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2d, 0x74, 0x65, 0x63, + 0x68, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, 0x73, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x67, + 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x6b, 0x75, 0x72, 0x74, 0x6f, + 0x73, 0x69, 0x73, 0x5f, 0x63, 0x6f, 0x72, 0x65, 0x5f, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x70, 0x69, + 0x5f, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( @@ -3727,7 +3887,7 @@ func file_api_container_service_proto_rawDescGZIP() []byte { } var file_api_container_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_api_container_service_proto_msgTypes = make([]protoimpl.MessageInfo, 62) +var file_api_container_service_proto_msgTypes = make([]protoimpl.MessageInfo, 64) var file_api_container_service_proto_goTypes = []interface{}{ (Port_TransportProtocol)(0), // 0: api_container_api.Port.TransportProtocol (*Port)(nil), // 1: api_container_api.Port @@ -3775,33 +3935,35 @@ var file_api_container_service_proto_goTypes = []interface{}{ (*StoreFilesArtifactFromServiceResponse)(nil), // 43: api_container_api.StoreFilesArtifactFromServiceResponse (*RenderTemplatesToFilesArtifactArgs)(nil), // 44: api_container_api.RenderTemplatesToFilesArtifactArgs (*RenderTemplatesToFilesArtifactResponse)(nil), // 45: api_container_api.RenderTemplatesToFilesArtifactResponse - nil, // 46: api_container_api.ServiceInfo.PrivatePortsEntry - nil, // 47: api_container_api.ServiceInfo.MaybePublicPortsEntry - nil, // 48: api_container_api.ServiceConfig.PrivatePortsEntry - nil, // 49: api_container_api.ServiceConfig.PublicPortsEntry - nil, // 50: api_container_api.ServiceConfig.EnvVarsEntry - nil, // 51: api_container_api.ServiceConfig.FilesArtifactMountpointsEntry - nil, // 52: api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry - nil, // 53: api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry - nil, // 54: api_container_api.StartServicesResponse.FailedServiceNameToErrorEntry - nil, // 55: api_container_api.GetServicesArgs.ServiceIdentifiersEntry - nil, // 56: api_container_api.GetServicesResponse.ServiceInfoEntry - nil, // 57: api_container_api.RepartitionArgs.PartitionServicesEntry - nil, // 58: api_container_api.RepartitionArgs.PartitionConnectionsEntry - nil, // 59: api_container_api.PartitionServices.ServiceNameSetEntry - nil, // 60: api_container_api.PartitionConnections.ConnectionInfoEntry - (*RenderTemplatesToFilesArtifactArgs_TemplateAndData)(nil), // 61: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplateAndData - nil, // 62: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry - (*emptypb.Empty)(nil), // 63: google.protobuf.Empty + (*FilesArtifactNameAndUuid)(nil), // 46: api_container_api.FilesArtifactNameAndUuid + (*ListFilesArtifactNamesAndUuidsResponse)(nil), // 47: api_container_api.ListFilesArtifactNamesAndUuidsResponse + nil, // 48: api_container_api.ServiceInfo.PrivatePortsEntry + nil, // 49: api_container_api.ServiceInfo.MaybePublicPortsEntry + nil, // 50: api_container_api.ServiceConfig.PrivatePortsEntry + nil, // 51: api_container_api.ServiceConfig.PublicPortsEntry + nil, // 52: api_container_api.ServiceConfig.EnvVarsEntry + nil, // 53: api_container_api.ServiceConfig.FilesArtifactMountpointsEntry + nil, // 54: api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry + nil, // 55: api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry + nil, // 56: api_container_api.StartServicesResponse.FailedServiceNameToErrorEntry + nil, // 57: api_container_api.GetServicesArgs.ServiceIdentifiersEntry + nil, // 58: api_container_api.GetServicesResponse.ServiceInfoEntry + nil, // 59: api_container_api.RepartitionArgs.PartitionServicesEntry + nil, // 60: api_container_api.RepartitionArgs.PartitionConnectionsEntry + nil, // 61: api_container_api.PartitionServices.ServiceNameSetEntry + nil, // 62: api_container_api.PartitionConnections.ConnectionInfoEntry + (*RenderTemplatesToFilesArtifactArgs_TemplateAndData)(nil), // 63: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplateAndData + nil, // 64: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry + (*emptypb.Empty)(nil), // 65: google.protobuf.Empty } var file_api_container_service_proto_depIdxs = []int32{ 0, // 0: api_container_api.Port.transport_protocol:type_name -> api_container_api.Port.TransportProtocol - 46, // 1: api_container_api.ServiceInfo.private_ports:type_name -> api_container_api.ServiceInfo.PrivatePortsEntry - 47, // 2: api_container_api.ServiceInfo.maybe_public_ports:type_name -> api_container_api.ServiceInfo.MaybePublicPortsEntry - 48, // 3: api_container_api.ServiceConfig.private_ports:type_name -> api_container_api.ServiceConfig.PrivatePortsEntry - 49, // 4: api_container_api.ServiceConfig.public_ports:type_name -> api_container_api.ServiceConfig.PublicPortsEntry - 50, // 5: api_container_api.ServiceConfig.env_vars:type_name -> api_container_api.ServiceConfig.EnvVarsEntry - 51, // 6: api_container_api.ServiceConfig.files_artifact_mountpoints:type_name -> api_container_api.ServiceConfig.FilesArtifactMountpointsEntry + 48, // 1: api_container_api.ServiceInfo.private_ports:type_name -> api_container_api.ServiceInfo.PrivatePortsEntry + 49, // 2: api_container_api.ServiceInfo.maybe_public_ports:type_name -> api_container_api.ServiceInfo.MaybePublicPortsEntry + 50, // 3: api_container_api.ServiceConfig.private_ports:type_name -> api_container_api.ServiceConfig.PrivatePortsEntry + 51, // 4: api_container_api.ServiceConfig.public_ports:type_name -> api_container_api.ServiceConfig.PublicPortsEntry + 52, // 5: api_container_api.ServiceConfig.env_vars:type_name -> api_container_api.ServiceConfig.EnvVarsEntry + 53, // 6: api_container_api.ServiceConfig.files_artifact_mountpoints:type_name -> api_container_api.ServiceConfig.FilesArtifactMountpointsEntry 8, // 7: api_container_api.StarlarkRunResponseLine.instruction:type_name -> api_container_api.StarlarkInstruction 12, // 8: api_container_api.StarlarkRunResponseLine.error:type_name -> api_container_api.StarlarkError 16, // 9: api_container_api.StarlarkRunResponseLine.progress_info:type_name -> api_container_api.StarlarkRunProgress @@ -3812,68 +3974,71 @@ var file_api_container_service_proto_depIdxs = []int32{ 13, // 14: api_container_api.StarlarkError.interpretation_error:type_name -> api_container_api.StarlarkInterpretationError 14, // 15: api_container_api.StarlarkError.validation_error:type_name -> api_container_api.StarlarkValidationError 15, // 16: api_container_api.StarlarkError.execution_error:type_name -> api_container_api.StarlarkExecutionError - 52, // 17: api_container_api.StartServicesArgs.service_names_to_configs:type_name -> api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry - 53, // 18: api_container_api.StartServicesResponse.successful_service_name_to_service_info:type_name -> api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry - 54, // 19: api_container_api.StartServicesResponse.failed_service_name_to_error:type_name -> api_container_api.StartServicesResponse.FailedServiceNameToErrorEntry - 55, // 20: api_container_api.GetServicesArgs.service_identifiers:type_name -> api_container_api.GetServicesArgs.ServiceIdentifiersEntry - 56, // 21: api_container_api.GetServicesResponse.service_info:type_name -> api_container_api.GetServicesResponse.ServiceInfoEntry + 54, // 17: api_container_api.StartServicesArgs.service_names_to_configs:type_name -> api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry + 55, // 18: api_container_api.StartServicesResponse.successful_service_name_to_service_info:type_name -> api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry + 56, // 19: api_container_api.StartServicesResponse.failed_service_name_to_error:type_name -> api_container_api.StartServicesResponse.FailedServiceNameToErrorEntry + 57, // 20: api_container_api.GetServicesArgs.service_identifiers:type_name -> api_container_api.GetServicesArgs.ServiceIdentifiersEntry + 58, // 21: api_container_api.GetServicesResponse.service_info:type_name -> api_container_api.GetServicesResponse.ServiceInfoEntry 22, // 22: api_container_api.GetExistingAndHistoricalServiceIdentifiersResponse.allIdentifiers:type_name -> api_container_api.ServiceIdentifiers - 57, // 23: api_container_api.RepartitionArgs.partition_services:type_name -> api_container_api.RepartitionArgs.PartitionServicesEntry - 58, // 24: api_container_api.RepartitionArgs.partition_connections:type_name -> api_container_api.RepartitionArgs.PartitionConnectionsEntry + 59, // 23: api_container_api.RepartitionArgs.partition_services:type_name -> api_container_api.RepartitionArgs.PartitionServicesEntry + 60, // 24: api_container_api.RepartitionArgs.partition_connections:type_name -> api_container_api.RepartitionArgs.PartitionConnectionsEntry 29, // 25: api_container_api.RepartitionArgs.default_connection:type_name -> api_container_api.PartitionConnectionInfo - 59, // 26: api_container_api.PartitionServices.service_name_set:type_name -> api_container_api.PartitionServices.ServiceNameSetEntry - 60, // 27: api_container_api.PartitionConnections.connection_info:type_name -> api_container_api.PartitionConnections.ConnectionInfoEntry - 62, // 28: api_container_api.RenderTemplatesToFilesArtifactArgs.templates_and_data_by_destination_rel_filepath:type_name -> api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry - 1, // 29: api_container_api.ServiceInfo.PrivatePortsEntry.value:type_name -> api_container_api.Port - 1, // 30: api_container_api.ServiceInfo.MaybePublicPortsEntry.value:type_name -> api_container_api.Port - 1, // 31: api_container_api.ServiceConfig.PrivatePortsEntry.value:type_name -> api_container_api.Port - 1, // 32: api_container_api.ServiceConfig.PublicPortsEntry.value:type_name -> api_container_api.Port - 3, // 33: api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry.value:type_name -> api_container_api.ServiceConfig - 2, // 34: api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry.value:type_name -> api_container_api.ServiceInfo - 2, // 35: api_container_api.GetServicesResponse.ServiceInfoEntry.value:type_name -> api_container_api.ServiceInfo - 27, // 36: api_container_api.RepartitionArgs.PartitionServicesEntry.value:type_name -> api_container_api.PartitionServices - 28, // 37: api_container_api.RepartitionArgs.PartitionConnectionsEntry.value:type_name -> api_container_api.PartitionConnections - 29, // 38: api_container_api.PartitionConnections.ConnectionInfoEntry.value:type_name -> api_container_api.PartitionConnectionInfo - 61, // 39: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry.value:type_name -> api_container_api.RenderTemplatesToFilesArtifactArgs.TemplateAndData - 5, // 40: api_container_api.ApiContainerService.RunStarlarkScript:input_type -> api_container_api.RunStarlarkScriptArgs - 6, // 41: api_container_api.ApiContainerService.RunStarlarkPackage:input_type -> api_container_api.RunStarlarkPackageArgs - 18, // 42: api_container_api.ApiContainerService.StartServices:input_type -> api_container_api.StartServicesArgs - 20, // 43: api_container_api.ApiContainerService.GetServices:input_type -> api_container_api.GetServicesArgs - 63, // 44: api_container_api.ApiContainerService.GetExistingAndHistoricalServiceIdentifiers:input_type -> google.protobuf.Empty - 24, // 45: api_container_api.ApiContainerService.RemoveService:input_type -> api_container_api.RemoveServiceArgs - 26, // 46: api_container_api.ApiContainerService.Repartition:input_type -> api_container_api.RepartitionArgs - 30, // 47: api_container_api.ApiContainerService.ExecCommand:input_type -> api_container_api.ExecCommandArgs - 31, // 48: api_container_api.ApiContainerService.PauseService:input_type -> api_container_api.PauseServiceArgs - 32, // 49: api_container_api.ApiContainerService.UnpauseService:input_type -> api_container_api.UnpauseServiceArgs - 34, // 50: api_container_api.ApiContainerService.WaitForHttpGetEndpointAvailability:input_type -> api_container_api.WaitForHttpGetEndpointAvailabilityArgs - 35, // 51: api_container_api.ApiContainerService.WaitForHttpPostEndpointAvailability:input_type -> api_container_api.WaitForHttpPostEndpointAvailabilityArgs - 36, // 52: api_container_api.ApiContainerService.UploadFilesArtifact:input_type -> api_container_api.UploadFilesArtifactArgs - 38, // 53: api_container_api.ApiContainerService.DownloadFilesArtifact:input_type -> api_container_api.DownloadFilesArtifactArgs - 40, // 54: api_container_api.ApiContainerService.StoreWebFilesArtifact:input_type -> api_container_api.StoreWebFilesArtifactArgs - 42, // 55: api_container_api.ApiContainerService.StoreFilesArtifactFromService:input_type -> api_container_api.StoreFilesArtifactFromServiceArgs - 44, // 56: api_container_api.ApiContainerService.RenderTemplatesToFilesArtifact:input_type -> api_container_api.RenderTemplatesToFilesArtifactArgs - 7, // 57: api_container_api.ApiContainerService.RunStarlarkScript:output_type -> api_container_api.StarlarkRunResponseLine - 7, // 58: api_container_api.ApiContainerService.RunStarlarkPackage:output_type -> api_container_api.StarlarkRunResponseLine - 19, // 59: api_container_api.ApiContainerService.StartServices:output_type -> api_container_api.StartServicesResponse - 21, // 60: api_container_api.ApiContainerService.GetServices:output_type -> api_container_api.GetServicesResponse - 23, // 61: api_container_api.ApiContainerService.GetExistingAndHistoricalServiceIdentifiers:output_type -> api_container_api.GetExistingAndHistoricalServiceIdentifiersResponse - 25, // 62: api_container_api.ApiContainerService.RemoveService:output_type -> api_container_api.RemoveServiceResponse - 63, // 63: api_container_api.ApiContainerService.Repartition:output_type -> google.protobuf.Empty - 33, // 64: api_container_api.ApiContainerService.ExecCommand:output_type -> api_container_api.ExecCommandResponse - 63, // 65: api_container_api.ApiContainerService.PauseService:output_type -> google.protobuf.Empty - 63, // 66: api_container_api.ApiContainerService.UnpauseService:output_type -> google.protobuf.Empty - 63, // 67: api_container_api.ApiContainerService.WaitForHttpGetEndpointAvailability:output_type -> google.protobuf.Empty - 63, // 68: api_container_api.ApiContainerService.WaitForHttpPostEndpointAvailability:output_type -> google.protobuf.Empty - 37, // 69: api_container_api.ApiContainerService.UploadFilesArtifact:output_type -> api_container_api.UploadFilesArtifactResponse - 39, // 70: api_container_api.ApiContainerService.DownloadFilesArtifact:output_type -> api_container_api.DownloadFilesArtifactResponse - 41, // 71: api_container_api.ApiContainerService.StoreWebFilesArtifact:output_type -> api_container_api.StoreWebFilesArtifactResponse - 43, // 72: api_container_api.ApiContainerService.StoreFilesArtifactFromService:output_type -> api_container_api.StoreFilesArtifactFromServiceResponse - 45, // 73: api_container_api.ApiContainerService.RenderTemplatesToFilesArtifact:output_type -> api_container_api.RenderTemplatesToFilesArtifactResponse - 57, // [57:74] is the sub-list for method output_type - 40, // [40:57] is the sub-list for method input_type - 40, // [40:40] is the sub-list for extension type_name - 40, // [40:40] is the sub-list for extension extendee - 0, // [0:40] is the sub-list for field type_name + 61, // 26: api_container_api.PartitionServices.service_name_set:type_name -> api_container_api.PartitionServices.ServiceNameSetEntry + 62, // 27: api_container_api.PartitionConnections.connection_info:type_name -> api_container_api.PartitionConnections.ConnectionInfoEntry + 64, // 28: api_container_api.RenderTemplatesToFilesArtifactArgs.templates_and_data_by_destination_rel_filepath:type_name -> api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry + 46, // 29: api_container_api.ListFilesArtifactNamesAndUuidsResponse.file_names_and_uuids:type_name -> api_container_api.FilesArtifactNameAndUuid + 1, // 30: api_container_api.ServiceInfo.PrivatePortsEntry.value:type_name -> api_container_api.Port + 1, // 31: api_container_api.ServiceInfo.MaybePublicPortsEntry.value:type_name -> api_container_api.Port + 1, // 32: api_container_api.ServiceConfig.PrivatePortsEntry.value:type_name -> api_container_api.Port + 1, // 33: api_container_api.ServiceConfig.PublicPortsEntry.value:type_name -> api_container_api.Port + 3, // 34: api_container_api.StartServicesArgs.ServiceNamesToConfigsEntry.value:type_name -> api_container_api.ServiceConfig + 2, // 35: api_container_api.StartServicesResponse.SuccessfulServiceNameToServiceInfoEntry.value:type_name -> api_container_api.ServiceInfo + 2, // 36: api_container_api.GetServicesResponse.ServiceInfoEntry.value:type_name -> api_container_api.ServiceInfo + 27, // 37: api_container_api.RepartitionArgs.PartitionServicesEntry.value:type_name -> api_container_api.PartitionServices + 28, // 38: api_container_api.RepartitionArgs.PartitionConnectionsEntry.value:type_name -> api_container_api.PartitionConnections + 29, // 39: api_container_api.PartitionConnections.ConnectionInfoEntry.value:type_name -> api_container_api.PartitionConnectionInfo + 63, // 40: api_container_api.RenderTemplatesToFilesArtifactArgs.TemplatesAndDataByDestinationRelFilepathEntry.value:type_name -> api_container_api.RenderTemplatesToFilesArtifactArgs.TemplateAndData + 5, // 41: api_container_api.ApiContainerService.RunStarlarkScript:input_type -> api_container_api.RunStarlarkScriptArgs + 6, // 42: api_container_api.ApiContainerService.RunStarlarkPackage:input_type -> api_container_api.RunStarlarkPackageArgs + 18, // 43: api_container_api.ApiContainerService.StartServices:input_type -> api_container_api.StartServicesArgs + 20, // 44: api_container_api.ApiContainerService.GetServices:input_type -> api_container_api.GetServicesArgs + 65, // 45: api_container_api.ApiContainerService.GetExistingAndHistoricalServiceIdentifiers:input_type -> google.protobuf.Empty + 24, // 46: api_container_api.ApiContainerService.RemoveService:input_type -> api_container_api.RemoveServiceArgs + 26, // 47: api_container_api.ApiContainerService.Repartition:input_type -> api_container_api.RepartitionArgs + 30, // 48: api_container_api.ApiContainerService.ExecCommand:input_type -> api_container_api.ExecCommandArgs + 31, // 49: api_container_api.ApiContainerService.PauseService:input_type -> api_container_api.PauseServiceArgs + 32, // 50: api_container_api.ApiContainerService.UnpauseService:input_type -> api_container_api.UnpauseServiceArgs + 34, // 51: api_container_api.ApiContainerService.WaitForHttpGetEndpointAvailability:input_type -> api_container_api.WaitForHttpGetEndpointAvailabilityArgs + 35, // 52: api_container_api.ApiContainerService.WaitForHttpPostEndpointAvailability:input_type -> api_container_api.WaitForHttpPostEndpointAvailabilityArgs + 36, // 53: api_container_api.ApiContainerService.UploadFilesArtifact:input_type -> api_container_api.UploadFilesArtifactArgs + 38, // 54: api_container_api.ApiContainerService.DownloadFilesArtifact:input_type -> api_container_api.DownloadFilesArtifactArgs + 40, // 55: api_container_api.ApiContainerService.StoreWebFilesArtifact:input_type -> api_container_api.StoreWebFilesArtifactArgs + 42, // 56: api_container_api.ApiContainerService.StoreFilesArtifactFromService:input_type -> api_container_api.StoreFilesArtifactFromServiceArgs + 44, // 57: api_container_api.ApiContainerService.RenderTemplatesToFilesArtifact:input_type -> api_container_api.RenderTemplatesToFilesArtifactArgs + 65, // 58: api_container_api.ApiContainerService.ListFilesArtifactNamesAndUuids:input_type -> google.protobuf.Empty + 7, // 59: api_container_api.ApiContainerService.RunStarlarkScript:output_type -> api_container_api.StarlarkRunResponseLine + 7, // 60: api_container_api.ApiContainerService.RunStarlarkPackage:output_type -> api_container_api.StarlarkRunResponseLine + 19, // 61: api_container_api.ApiContainerService.StartServices:output_type -> api_container_api.StartServicesResponse + 21, // 62: api_container_api.ApiContainerService.GetServices:output_type -> api_container_api.GetServicesResponse + 23, // 63: api_container_api.ApiContainerService.GetExistingAndHistoricalServiceIdentifiers:output_type -> api_container_api.GetExistingAndHistoricalServiceIdentifiersResponse + 25, // 64: api_container_api.ApiContainerService.RemoveService:output_type -> api_container_api.RemoveServiceResponse + 65, // 65: api_container_api.ApiContainerService.Repartition:output_type -> google.protobuf.Empty + 33, // 66: api_container_api.ApiContainerService.ExecCommand:output_type -> api_container_api.ExecCommandResponse + 65, // 67: api_container_api.ApiContainerService.PauseService:output_type -> google.protobuf.Empty + 65, // 68: api_container_api.ApiContainerService.UnpauseService:output_type -> google.protobuf.Empty + 65, // 69: api_container_api.ApiContainerService.WaitForHttpGetEndpointAvailability:output_type -> google.protobuf.Empty + 65, // 70: api_container_api.ApiContainerService.WaitForHttpPostEndpointAvailability:output_type -> google.protobuf.Empty + 37, // 71: api_container_api.ApiContainerService.UploadFilesArtifact:output_type -> api_container_api.UploadFilesArtifactResponse + 39, // 72: api_container_api.ApiContainerService.DownloadFilesArtifact:output_type -> api_container_api.DownloadFilesArtifactResponse + 41, // 73: api_container_api.ApiContainerService.StoreWebFilesArtifact:output_type -> api_container_api.StoreWebFilesArtifactResponse + 43, // 74: api_container_api.ApiContainerService.StoreFilesArtifactFromService:output_type -> api_container_api.StoreFilesArtifactFromServiceResponse + 45, // 75: api_container_api.ApiContainerService.RenderTemplatesToFilesArtifact:output_type -> api_container_api.RenderTemplatesToFilesArtifactResponse + 47, // 76: api_container_api.ApiContainerService.ListFilesArtifactNamesAndUuids:output_type -> api_container_api.ListFilesArtifactNamesAndUuidsResponse + 59, // [59:77] is the sub-list for method output_type + 41, // [41:59] is the sub-list for method input_type + 41, // [41:41] is the sub-list for extension type_name + 41, // [41:41] is the sub-list for extension extendee + 0, // [0:41] is the sub-list for field type_name } func init() { file_api_container_service_proto_init() } @@ -4422,7 +4587,31 @@ func file_api_container_service_proto_init() { return nil } } - file_api_container_service_proto_msgTypes[60].Exporter = func(v interface{}, i int) interface{} { + file_api_container_service_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*FilesArtifactNameAndUuid); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_container_service_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ListFilesArtifactNamesAndUuidsResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_api_container_service_proto_msgTypes[62].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*RenderTemplatesToFilesArtifactArgs_TemplateAndData); i { case 0: return &v.state @@ -4462,7 +4651,7 @@ func file_api_container_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_api_container_service_proto_rawDesc, NumEnums: 1, - NumMessages: 62, + NumMessages: 64, NumExtensions: 0, NumServices: 1, }, diff --git a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc.pb.go b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc.pb.go index d7ad9c5f1e..9fb4030eda 100644 --- a/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc.pb.go +++ b/api/golang/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.21.12 // source: api_container_service.proto @@ -19,6 +19,27 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + ApiContainerService_RunStarlarkScript_FullMethodName = "/api_container_api.ApiContainerService/RunStarlarkScript" + ApiContainerService_RunStarlarkPackage_FullMethodName = "/api_container_api.ApiContainerService/RunStarlarkPackage" + ApiContainerService_StartServices_FullMethodName = "/api_container_api.ApiContainerService/StartServices" + ApiContainerService_GetServices_FullMethodName = "/api_container_api.ApiContainerService/GetServices" + ApiContainerService_GetExistingAndHistoricalServiceIdentifiers_FullMethodName = "/api_container_api.ApiContainerService/GetExistingAndHistoricalServiceIdentifiers" + ApiContainerService_RemoveService_FullMethodName = "/api_container_api.ApiContainerService/RemoveService" + ApiContainerService_Repartition_FullMethodName = "/api_container_api.ApiContainerService/Repartition" + ApiContainerService_ExecCommand_FullMethodName = "/api_container_api.ApiContainerService/ExecCommand" + ApiContainerService_PauseService_FullMethodName = "/api_container_api.ApiContainerService/PauseService" + ApiContainerService_UnpauseService_FullMethodName = "/api_container_api.ApiContainerService/UnpauseService" + ApiContainerService_WaitForHttpGetEndpointAvailability_FullMethodName = "/api_container_api.ApiContainerService/WaitForHttpGetEndpointAvailability" + ApiContainerService_WaitForHttpPostEndpointAvailability_FullMethodName = "/api_container_api.ApiContainerService/WaitForHttpPostEndpointAvailability" + ApiContainerService_UploadFilesArtifact_FullMethodName = "/api_container_api.ApiContainerService/UploadFilesArtifact" + ApiContainerService_DownloadFilesArtifact_FullMethodName = "/api_container_api.ApiContainerService/DownloadFilesArtifact" + ApiContainerService_StoreWebFilesArtifact_FullMethodName = "/api_container_api.ApiContainerService/StoreWebFilesArtifact" + ApiContainerService_StoreFilesArtifactFromService_FullMethodName = "/api_container_api.ApiContainerService/StoreFilesArtifactFromService" + ApiContainerService_RenderTemplatesToFilesArtifact_FullMethodName = "/api_container_api.ApiContainerService/RenderTemplatesToFilesArtifact" + ApiContainerService_ListFilesArtifactNamesAndUuids_FullMethodName = "/api_container_api.ApiContainerService/ListFilesArtifactNamesAndUuids" +) + // ApiContainerServiceClient is the client API for ApiContainerService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -58,6 +79,7 @@ type ApiContainerServiceClient interface { StoreFilesArtifactFromService(ctx context.Context, in *StoreFilesArtifactFromServiceArgs, opts ...grpc.CallOption) (*StoreFilesArtifactFromServiceResponse, error) // Renders the templates and their data to a files artifact in the Kurtosis File System RenderTemplatesToFilesArtifact(ctx context.Context, in *RenderTemplatesToFilesArtifactArgs, opts ...grpc.CallOption) (*RenderTemplatesToFilesArtifactResponse, error) + ListFilesArtifactNamesAndUuids(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListFilesArtifactNamesAndUuidsResponse, error) } type apiContainerServiceClient struct { @@ -69,7 +91,7 @@ func NewApiContainerServiceClient(cc grpc.ClientConnInterface) ApiContainerServi } func (c *apiContainerServiceClient) RunStarlarkScript(ctx context.Context, in *RunStarlarkScriptArgs, opts ...grpc.CallOption) (ApiContainerService_RunStarlarkScriptClient, error) { - stream, err := c.cc.NewStream(ctx, &ApiContainerService_ServiceDesc.Streams[0], "/api_container_api.ApiContainerService/RunStarlarkScript", opts...) + stream, err := c.cc.NewStream(ctx, &ApiContainerService_ServiceDesc.Streams[0], ApiContainerService_RunStarlarkScript_FullMethodName, opts...) if err != nil { return nil, err } @@ -101,7 +123,7 @@ func (x *apiContainerServiceRunStarlarkScriptClient) Recv() (*StarlarkRunRespons } func (c *apiContainerServiceClient) RunStarlarkPackage(ctx context.Context, in *RunStarlarkPackageArgs, opts ...grpc.CallOption) (ApiContainerService_RunStarlarkPackageClient, error) { - stream, err := c.cc.NewStream(ctx, &ApiContainerService_ServiceDesc.Streams[1], "/api_container_api.ApiContainerService/RunStarlarkPackage", opts...) + stream, err := c.cc.NewStream(ctx, &ApiContainerService_ServiceDesc.Streams[1], ApiContainerService_RunStarlarkPackage_FullMethodName, opts...) if err != nil { return nil, err } @@ -134,7 +156,7 @@ func (x *apiContainerServiceRunStarlarkPackageClient) Recv() (*StarlarkRunRespon func (c *apiContainerServiceClient) StartServices(ctx context.Context, in *StartServicesArgs, opts ...grpc.CallOption) (*StartServicesResponse, error) { out := new(StartServicesResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/StartServices", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_StartServices_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -143,7 +165,7 @@ func (c *apiContainerServiceClient) StartServices(ctx context.Context, in *Start func (c *apiContainerServiceClient) GetServices(ctx context.Context, in *GetServicesArgs, opts ...grpc.CallOption) (*GetServicesResponse, error) { out := new(GetServicesResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/GetServices", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_GetServices_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -152,7 +174,7 @@ func (c *apiContainerServiceClient) GetServices(ctx context.Context, in *GetServ func (c *apiContainerServiceClient) GetExistingAndHistoricalServiceIdentifiers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetExistingAndHistoricalServiceIdentifiersResponse, error) { out := new(GetExistingAndHistoricalServiceIdentifiersResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/GetExistingAndHistoricalServiceIdentifiers", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_GetExistingAndHistoricalServiceIdentifiers_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -161,7 +183,7 @@ func (c *apiContainerServiceClient) GetExistingAndHistoricalServiceIdentifiers(c func (c *apiContainerServiceClient) RemoveService(ctx context.Context, in *RemoveServiceArgs, opts ...grpc.CallOption) (*RemoveServiceResponse, error) { out := new(RemoveServiceResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/RemoveService", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_RemoveService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -170,7 +192,7 @@ func (c *apiContainerServiceClient) RemoveService(ctx context.Context, in *Remov func (c *apiContainerServiceClient) Repartition(ctx context.Context, in *RepartitionArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/Repartition", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_Repartition_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -179,7 +201,7 @@ func (c *apiContainerServiceClient) Repartition(ctx context.Context, in *Reparti func (c *apiContainerServiceClient) ExecCommand(ctx context.Context, in *ExecCommandArgs, opts ...grpc.CallOption) (*ExecCommandResponse, error) { out := new(ExecCommandResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/ExecCommand", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_ExecCommand_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -188,7 +210,7 @@ func (c *apiContainerServiceClient) ExecCommand(ctx context.Context, in *ExecCom func (c *apiContainerServiceClient) PauseService(ctx context.Context, in *PauseServiceArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/PauseService", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_PauseService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -197,7 +219,7 @@ func (c *apiContainerServiceClient) PauseService(ctx context.Context, in *PauseS func (c *apiContainerServiceClient) UnpauseService(ctx context.Context, in *UnpauseServiceArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/UnpauseService", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_UnpauseService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -206,7 +228,7 @@ func (c *apiContainerServiceClient) UnpauseService(ctx context.Context, in *Unpa func (c *apiContainerServiceClient) WaitForHttpGetEndpointAvailability(ctx context.Context, in *WaitForHttpGetEndpointAvailabilityArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/WaitForHttpGetEndpointAvailability", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_WaitForHttpGetEndpointAvailability_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -215,7 +237,7 @@ func (c *apiContainerServiceClient) WaitForHttpGetEndpointAvailability(ctx conte func (c *apiContainerServiceClient) WaitForHttpPostEndpointAvailability(ctx context.Context, in *WaitForHttpPostEndpointAvailabilityArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/WaitForHttpPostEndpointAvailability", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_WaitForHttpPostEndpointAvailability_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -224,7 +246,7 @@ func (c *apiContainerServiceClient) WaitForHttpPostEndpointAvailability(ctx cont func (c *apiContainerServiceClient) UploadFilesArtifact(ctx context.Context, in *UploadFilesArtifactArgs, opts ...grpc.CallOption) (*UploadFilesArtifactResponse, error) { out := new(UploadFilesArtifactResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/UploadFilesArtifact", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_UploadFilesArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -233,7 +255,7 @@ func (c *apiContainerServiceClient) UploadFilesArtifact(ctx context.Context, in func (c *apiContainerServiceClient) DownloadFilesArtifact(ctx context.Context, in *DownloadFilesArtifactArgs, opts ...grpc.CallOption) (*DownloadFilesArtifactResponse, error) { out := new(DownloadFilesArtifactResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/DownloadFilesArtifact", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_DownloadFilesArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -242,7 +264,7 @@ func (c *apiContainerServiceClient) DownloadFilesArtifact(ctx context.Context, i func (c *apiContainerServiceClient) StoreWebFilesArtifact(ctx context.Context, in *StoreWebFilesArtifactArgs, opts ...grpc.CallOption) (*StoreWebFilesArtifactResponse, error) { out := new(StoreWebFilesArtifactResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/StoreWebFilesArtifact", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_StoreWebFilesArtifact_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -251,7 +273,7 @@ func (c *apiContainerServiceClient) StoreWebFilesArtifact(ctx context.Context, i func (c *apiContainerServiceClient) StoreFilesArtifactFromService(ctx context.Context, in *StoreFilesArtifactFromServiceArgs, opts ...grpc.CallOption) (*StoreFilesArtifactFromServiceResponse, error) { out := new(StoreFilesArtifactFromServiceResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/StoreFilesArtifactFromService", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_StoreFilesArtifactFromService_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -260,7 +282,16 @@ func (c *apiContainerServiceClient) StoreFilesArtifactFromService(ctx context.Co func (c *apiContainerServiceClient) RenderTemplatesToFilesArtifact(ctx context.Context, in *RenderTemplatesToFilesArtifactArgs, opts ...grpc.CallOption) (*RenderTemplatesToFilesArtifactResponse, error) { out := new(RenderTemplatesToFilesArtifactResponse) - err := c.cc.Invoke(ctx, "/api_container_api.ApiContainerService/RenderTemplatesToFilesArtifact", in, out, opts...) + err := c.cc.Invoke(ctx, ApiContainerService_RenderTemplatesToFilesArtifact_FullMethodName, in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *apiContainerServiceClient) ListFilesArtifactNamesAndUuids(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ListFilesArtifactNamesAndUuidsResponse, error) { + out := new(ListFilesArtifactNamesAndUuidsResponse) + err := c.cc.Invoke(ctx, ApiContainerService_ListFilesArtifactNamesAndUuids_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -306,6 +337,7 @@ type ApiContainerServiceServer interface { StoreFilesArtifactFromService(context.Context, *StoreFilesArtifactFromServiceArgs) (*StoreFilesArtifactFromServiceResponse, error) // Renders the templates and their data to a files artifact in the Kurtosis File System RenderTemplatesToFilesArtifact(context.Context, *RenderTemplatesToFilesArtifactArgs) (*RenderTemplatesToFilesArtifactResponse, error) + ListFilesArtifactNamesAndUuids(context.Context, *emptypb.Empty) (*ListFilesArtifactNamesAndUuidsResponse, error) } // UnimplementedApiContainerServiceServer should be embedded to have forward compatible implementations. @@ -363,6 +395,9 @@ func (UnimplementedApiContainerServiceServer) StoreFilesArtifactFromService(cont func (UnimplementedApiContainerServiceServer) RenderTemplatesToFilesArtifact(context.Context, *RenderTemplatesToFilesArtifactArgs) (*RenderTemplatesToFilesArtifactResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method RenderTemplatesToFilesArtifact not implemented") } +func (UnimplementedApiContainerServiceServer) ListFilesArtifactNamesAndUuids(context.Context, *emptypb.Empty) (*ListFilesArtifactNamesAndUuidsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListFilesArtifactNamesAndUuids not implemented") +} // UnsafeApiContainerServiceServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to ApiContainerServiceServer will @@ -427,7 +462,7 @@ func _ApiContainerService_StartServices_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/StartServices", + FullMethod: ApiContainerService_StartServices_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).StartServices(ctx, req.(*StartServicesArgs)) @@ -445,7 +480,7 @@ func _ApiContainerService_GetServices_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/GetServices", + FullMethod: ApiContainerService_GetServices_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).GetServices(ctx, req.(*GetServicesArgs)) @@ -463,7 +498,7 @@ func _ApiContainerService_GetExistingAndHistoricalServiceIdentifiers_Handler(srv } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/GetExistingAndHistoricalServiceIdentifiers", + FullMethod: ApiContainerService_GetExistingAndHistoricalServiceIdentifiers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).GetExistingAndHistoricalServiceIdentifiers(ctx, req.(*emptypb.Empty)) @@ -481,7 +516,7 @@ func _ApiContainerService_RemoveService_Handler(srv interface{}, ctx context.Con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/RemoveService", + FullMethod: ApiContainerService_RemoveService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).RemoveService(ctx, req.(*RemoveServiceArgs)) @@ -499,7 +534,7 @@ func _ApiContainerService_Repartition_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/Repartition", + FullMethod: ApiContainerService_Repartition_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).Repartition(ctx, req.(*RepartitionArgs)) @@ -517,7 +552,7 @@ func _ApiContainerService_ExecCommand_Handler(srv interface{}, ctx context.Conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/ExecCommand", + FullMethod: ApiContainerService_ExecCommand_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).ExecCommand(ctx, req.(*ExecCommandArgs)) @@ -535,7 +570,7 @@ func _ApiContainerService_PauseService_Handler(srv interface{}, ctx context.Cont } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/PauseService", + FullMethod: ApiContainerService_PauseService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).PauseService(ctx, req.(*PauseServiceArgs)) @@ -553,7 +588,7 @@ func _ApiContainerService_UnpauseService_Handler(srv interface{}, ctx context.Co } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/UnpauseService", + FullMethod: ApiContainerService_UnpauseService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).UnpauseService(ctx, req.(*UnpauseServiceArgs)) @@ -571,7 +606,7 @@ func _ApiContainerService_WaitForHttpGetEndpointAvailability_Handler(srv interfa } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/WaitForHttpGetEndpointAvailability", + FullMethod: ApiContainerService_WaitForHttpGetEndpointAvailability_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).WaitForHttpGetEndpointAvailability(ctx, req.(*WaitForHttpGetEndpointAvailabilityArgs)) @@ -589,7 +624,7 @@ func _ApiContainerService_WaitForHttpPostEndpointAvailability_Handler(srv interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/WaitForHttpPostEndpointAvailability", + FullMethod: ApiContainerService_WaitForHttpPostEndpointAvailability_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).WaitForHttpPostEndpointAvailability(ctx, req.(*WaitForHttpPostEndpointAvailabilityArgs)) @@ -607,7 +642,7 @@ func _ApiContainerService_UploadFilesArtifact_Handler(srv interface{}, ctx conte } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/UploadFilesArtifact", + FullMethod: ApiContainerService_UploadFilesArtifact_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).UploadFilesArtifact(ctx, req.(*UploadFilesArtifactArgs)) @@ -625,7 +660,7 @@ func _ApiContainerService_DownloadFilesArtifact_Handler(srv interface{}, ctx con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/DownloadFilesArtifact", + FullMethod: ApiContainerService_DownloadFilesArtifact_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).DownloadFilesArtifact(ctx, req.(*DownloadFilesArtifactArgs)) @@ -643,7 +678,7 @@ func _ApiContainerService_StoreWebFilesArtifact_Handler(srv interface{}, ctx con } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/StoreWebFilesArtifact", + FullMethod: ApiContainerService_StoreWebFilesArtifact_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).StoreWebFilesArtifact(ctx, req.(*StoreWebFilesArtifactArgs)) @@ -661,7 +696,7 @@ func _ApiContainerService_StoreFilesArtifactFromService_Handler(srv interface{}, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/StoreFilesArtifactFromService", + FullMethod: ApiContainerService_StoreFilesArtifactFromService_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).StoreFilesArtifactFromService(ctx, req.(*StoreFilesArtifactFromServiceArgs)) @@ -679,7 +714,7 @@ func _ApiContainerService_RenderTemplatesToFilesArtifact_Handler(srv interface{} } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/api_container_api.ApiContainerService/RenderTemplatesToFilesArtifact", + FullMethod: ApiContainerService_RenderTemplatesToFilesArtifact_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(ApiContainerServiceServer).RenderTemplatesToFilesArtifact(ctx, req.(*RenderTemplatesToFilesArtifactArgs)) @@ -687,6 +722,24 @@ func _ApiContainerService_RenderTemplatesToFilesArtifact_Handler(srv interface{} return interceptor(ctx, in, info, handler) } +func _ApiContainerService_ListFilesArtifactNamesAndUuids_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(emptypb.Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(ApiContainerServiceServer).ListFilesArtifactNamesAndUuids(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: ApiContainerService_ListFilesArtifactNamesAndUuids_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(ApiContainerServiceServer).ListFilesArtifactNamesAndUuids(ctx, req.(*emptypb.Empty)) + } + return interceptor(ctx, in, info, handler) +} + // ApiContainerService_ServiceDesc is the grpc.ServiceDesc for ApiContainerService service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -754,6 +807,10 @@ var ApiContainerService_ServiceDesc = grpc.ServiceDesc{ MethodName: "RenderTemplatesToFilesArtifact", Handler: _ApiContainerService_RenderTemplatesToFilesArtifact_Handler, }, + { + MethodName: "ListFilesArtifactNamesAndUuids", + Handler: _ApiContainerService_ListFilesArtifactNamesAndUuids_Handler, + }, }, Streams: []grpc.StreamDesc{ { diff --git a/api/golang/core/lib/enclaves/enclave_context.go b/api/golang/core/lib/enclaves/enclave_context.go index 18126cf94f..e1c38197db 100644 --- a/api/golang/core/lib/enclaves/enclave_context.go +++ b/api/golang/core/lib/enclaves/enclave_context.go @@ -260,6 +260,15 @@ func (enclaveCtx *EnclaveContext) GetExistingAndHistoricalServiceIdentifiers(ctx return services.NewServiceIdentifiers(enclaveCtx.enclaveName, response.AllIdentifiers), nil } +// Docs available at https://docs.kurtosis.com/#getallfilesartifactnamesanduuids---filesartifactnameanduuid-filesartifactnamesanduuids +func (enclaveCtx *EnclaveContext) GetAllFilesArtifactNamesAndUuids(ctx context.Context) ([]*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid, error) { + response, err := enclaveCtx.client.ListFilesArtifactNamesAndUuids(ctx, &emptypb.Empty{}) + if err != nil { + return nil, stacktrace.Propagate(err, "An error occurred while fetching file names and uuids") + } + return response.GetFileNamesAndUuids(), nil +} + // ==================================================================================================== // // Private helper methods diff --git a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go index 98dcdb1f8b..60d314565f 100644 --- a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go +++ b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: -// protoc-gen-go v1.28.1 +// protoc-gen-go v1.29.1 // protoc v3.21.12 // source: engine_service.proto @@ -23,7 +23,9 @@ const ( ) // ============================================================================================== -// Get Enclaves +// +// Get Enclaves +// // ============================================================================================== // Status of the containers in the enclave // NOTE: We have to prefix the enum values with the enum name due to the way Protobuf enum valuee uniqueness works @@ -88,7 +90,8 @@ const ( EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_NONEXISTENT EnclaveAPIContainerStatus = 0 // An API container exists and is running // NOTE: this does NOT say that the server inside the API container is available, because checking if it's available requires making a call to the API container - // If we have a lot of API containers, we'd be making tons of calls + // + // If we have a lot of API containers, we'd be making tons of calls EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_RUNNING EnclaveAPIContainerStatus = 1 // An API container exists, but isn't running EnclaveAPIContainerStatus_EnclaveAPIContainerStatus_STOPPED EnclaveAPIContainerStatus = 2 @@ -135,7 +138,7 @@ func (EnclaveAPIContainerStatus) EnumDescriptor() ([]byte, []int) { return file_engine_service_proto_rawDescGZIP(), []int{1} } -//The filter operator which can be text or regex type +// The filter operator which can be text or regex type // NOTE: We have to prefix the enum values with the enum name due to the way Protobuf enum value uniqueness works type LogLineOperator int32 @@ -190,7 +193,9 @@ func (LogLineOperator) EnumDescriptor() ([]byte, []int) { } // ============================================================================================== -// Get Engine Info +// +// Get Engine Info +// // ============================================================================================== type GetEngineInfoResponse struct { state protoimpl.MessageState @@ -241,7 +246,9 @@ func (x *GetEngineInfoResponse) GetEngineVersion() string { } // ============================================================================================== -// Create Enclave +// +// Create Enclave +// // ============================================================================================== type CreateEnclaveArgs struct { state protoimpl.MessageState @@ -324,7 +331,7 @@ type CreateEnclaveResponse struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //All the enclave information inside this object + // All the enclave information inside this object EnclaveInfo *EnclaveInfo `protobuf:"bytes,1,opt,name=enclave_info,json=enclaveInfo,proto3" json:"enclave_info,omitempty"` } @@ -372,7 +379,7 @@ type EnclaveAPIContainerInfo struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //The container engine ID of the API container + // The container engine ID of the API container ContainerId string `protobuf:"bytes,1,opt,name=container_id,json=containerId,proto3" json:"container_id,omitempty"` // The IP inside the enclave network of the API container (i.e. how services inside the network can reach the API container) IpInsideEnclave string `protobuf:"bytes,2,opt,name=ip_inside_enclave,json=ipInsideEnclave,proto3" json:"ip_inside_enclave,omitempty"` @@ -529,7 +536,7 @@ type EnclaveInfo struct { ApiContainerInfo *EnclaveAPIContainerInfo `protobuf:"bytes,6,opt,name=api_container_info,json=apiContainerInfo,proto3" json:"api_container_info,omitempty"` // NOTE: Will not be present if the API container status is not "RUNNING"!! ApiContainerHostMachineInfo *EnclaveAPIContainerHostMachineInfo `protobuf:"bytes,7,opt,name=api_container_host_machine_info,json=apiContainerHostMachineInfo,proto3" json:"api_container_host_machine_info,omitempty"` - //The enclave's creation time + // The enclave's creation time CreationTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=creation_time,json=creationTime,proto3" json:"creation_time,omitempty"` } @@ -784,14 +791,16 @@ func (x *GetExistingAndHistoricalEnclaveIdentifiersResponse) GetAllIdentifiers() } // ============================================================================================== -// Stop Enclave +// +// Stop Enclave +// // ============================================================================================== type StopEnclaveArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to stop + // The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to stop EnclaveIdentifier string `protobuf:"bytes,1,opt,name=enclave_identifier,json=enclaveIdentifier,proto3" json:"enclave_identifier,omitempty"` } @@ -835,14 +844,16 @@ func (x *StopEnclaveArgs) GetEnclaveIdentifier() string { } // ============================================================================================== -// Destroy Enclave +// +// Destroy Enclave +// // ============================================================================================== type DestroyEnclaveArgs struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - //The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to destroy + // The identifier(uuid, shortened uuid, name) of the Kurtosis enclave to destroy EnclaveIdentifier string `protobuf:"bytes,1,opt,name=enclave_identifier,json=enclaveIdentifier,proto3" json:"enclave_identifier,omitempty"` } @@ -886,7 +897,9 @@ func (x *DestroyEnclaveArgs) GetEnclaveIdentifier() string { } // ============================================================================================== -// Create Enclave +// +// Create Enclave +// // ============================================================================================== type CleanArgs struct { state protoimpl.MessageState @@ -1040,7 +1053,9 @@ func (x *CleanResponse) GetRemovedEnclaveNameAndUuids() []*EnclaveNameAndUuid { } // ============================================================================================== -// Get User Service Logs +// +// Get User Service Logs +// // ============================================================================================== type GetServiceLogsArgs struct { state protoimpl.MessageState diff --git a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go index 5bcd526283..dfb80f4d11 100644 --- a/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go +++ b/api/golang/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc.pb.go @@ -1,6 +1,6 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: -// - protoc-gen-go-grpc v1.2.0 +// - protoc-gen-go-grpc v1.3.0 // - protoc v3.21.12 // source: engine_service.proto @@ -19,6 +19,17 @@ import ( // Requires gRPC-Go v1.32.0 or later. const _ = grpc.SupportPackageIsVersion7 +const ( + EngineService_GetEngineInfo_FullMethodName = "/engine_api.EngineService/GetEngineInfo" + EngineService_CreateEnclave_FullMethodName = "/engine_api.EngineService/CreateEnclave" + EngineService_GetEnclaves_FullMethodName = "/engine_api.EngineService/GetEnclaves" + EngineService_GetExistingAndHistoricalEnclaveIdentifiers_FullMethodName = "/engine_api.EngineService/GetExistingAndHistoricalEnclaveIdentifiers" + EngineService_StopEnclave_FullMethodName = "/engine_api.EngineService/StopEnclave" + EngineService_DestroyEnclave_FullMethodName = "/engine_api.EngineService/DestroyEnclave" + EngineService_Clean_FullMethodName = "/engine_api.EngineService/Clean" + EngineService_GetServiceLogs_FullMethodName = "/engine_api.EngineService/GetServiceLogs" +) + // EngineServiceClient is the client API for EngineService service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. @@ -26,7 +37,9 @@ type EngineServiceClient interface { // Endpoint for getting information about the engine, which is also what we use to verify that the engine has become available GetEngineInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetEngineInfoResponse, error) // ============================================================================================== - // Enclave Management + // + // Enclave Management + // // ============================================================================================== // Creates a new Kurtosis Enclave CreateEnclave(ctx context.Context, in *CreateEnclaveArgs, opts ...grpc.CallOption) (*CreateEnclaveResponse, error) @@ -54,7 +67,7 @@ func NewEngineServiceClient(cc grpc.ClientConnInterface) EngineServiceClient { func (c *engineServiceClient) GetEngineInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetEngineInfoResponse, error) { out := new(GetEngineInfoResponse) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/GetEngineInfo", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_GetEngineInfo_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -63,7 +76,7 @@ func (c *engineServiceClient) GetEngineInfo(ctx context.Context, in *emptypb.Emp func (c *engineServiceClient) CreateEnclave(ctx context.Context, in *CreateEnclaveArgs, opts ...grpc.CallOption) (*CreateEnclaveResponse, error) { out := new(CreateEnclaveResponse) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/CreateEnclave", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_CreateEnclave_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -72,7 +85,7 @@ func (c *engineServiceClient) CreateEnclave(ctx context.Context, in *CreateEncla func (c *engineServiceClient) GetEnclaves(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetEnclavesResponse, error) { out := new(GetEnclavesResponse) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/GetEnclaves", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_GetEnclaves_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -81,7 +94,7 @@ func (c *engineServiceClient) GetEnclaves(ctx context.Context, in *emptypb.Empty func (c *engineServiceClient) GetExistingAndHistoricalEnclaveIdentifiers(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetExistingAndHistoricalEnclaveIdentifiersResponse, error) { out := new(GetExistingAndHistoricalEnclaveIdentifiersResponse) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/GetExistingAndHistoricalEnclaveIdentifiers", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_GetExistingAndHistoricalEnclaveIdentifiers_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -90,7 +103,7 @@ func (c *engineServiceClient) GetExistingAndHistoricalEnclaveIdentifiers(ctx con func (c *engineServiceClient) StopEnclave(ctx context.Context, in *StopEnclaveArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/StopEnclave", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_StopEnclave_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -99,7 +112,7 @@ func (c *engineServiceClient) StopEnclave(ctx context.Context, in *StopEnclaveAr func (c *engineServiceClient) DestroyEnclave(ctx context.Context, in *DestroyEnclaveArgs, opts ...grpc.CallOption) (*emptypb.Empty, error) { out := new(emptypb.Empty) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/DestroyEnclave", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_DestroyEnclave_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -108,7 +121,7 @@ func (c *engineServiceClient) DestroyEnclave(ctx context.Context, in *DestroyEnc func (c *engineServiceClient) Clean(ctx context.Context, in *CleanArgs, opts ...grpc.CallOption) (*CleanResponse, error) { out := new(CleanResponse) - err := c.cc.Invoke(ctx, "/engine_api.EngineService/Clean", in, out, opts...) + err := c.cc.Invoke(ctx, EngineService_Clean_FullMethodName, in, out, opts...) if err != nil { return nil, err } @@ -116,7 +129,7 @@ func (c *engineServiceClient) Clean(ctx context.Context, in *CleanArgs, opts ... } func (c *engineServiceClient) GetServiceLogs(ctx context.Context, in *GetServiceLogsArgs, opts ...grpc.CallOption) (EngineService_GetServiceLogsClient, error) { - stream, err := c.cc.NewStream(ctx, &EngineService_ServiceDesc.Streams[0], "/engine_api.EngineService/GetServiceLogs", opts...) + stream, err := c.cc.NewStream(ctx, &EngineService_ServiceDesc.Streams[0], EngineService_GetServiceLogs_FullMethodName, opts...) if err != nil { return nil, err } @@ -154,7 +167,9 @@ type EngineServiceServer interface { // Endpoint for getting information about the engine, which is also what we use to verify that the engine has become available GetEngineInfo(context.Context, *emptypb.Empty) (*GetEngineInfoResponse, error) // ============================================================================================== - // Enclave Management + // + // Enclave Management + // // ============================================================================================== // Creates a new Kurtosis Enclave CreateEnclave(context.Context, *CreateEnclaveArgs) (*CreateEnclaveResponse, error) @@ -222,7 +237,7 @@ func _EngineService_GetEngineInfo_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/GetEngineInfo", + FullMethod: EngineService_GetEngineInfo_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).GetEngineInfo(ctx, req.(*emptypb.Empty)) @@ -240,7 +255,7 @@ func _EngineService_CreateEnclave_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/CreateEnclave", + FullMethod: EngineService_CreateEnclave_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).CreateEnclave(ctx, req.(*CreateEnclaveArgs)) @@ -258,7 +273,7 @@ func _EngineService_GetEnclaves_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/GetEnclaves", + FullMethod: EngineService_GetEnclaves_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).GetEnclaves(ctx, req.(*emptypb.Empty)) @@ -276,7 +291,7 @@ func _EngineService_GetExistingAndHistoricalEnclaveIdentifiers_Handler(srv inter } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/GetExistingAndHistoricalEnclaveIdentifiers", + FullMethod: EngineService_GetExistingAndHistoricalEnclaveIdentifiers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).GetExistingAndHistoricalEnclaveIdentifiers(ctx, req.(*emptypb.Empty)) @@ -294,7 +309,7 @@ func _EngineService_StopEnclave_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/StopEnclave", + FullMethod: EngineService_StopEnclave_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).StopEnclave(ctx, req.(*StopEnclaveArgs)) @@ -312,7 +327,7 @@ func _EngineService_DestroyEnclave_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/DestroyEnclave", + FullMethod: EngineService_DestroyEnclave_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).DestroyEnclave(ctx, req.(*DestroyEnclaveArgs)) @@ -330,7 +345,7 @@ func _EngineService_Clean_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/engine_api.EngineService/Clean", + FullMethod: EngineService_Clean_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(EngineServiceServer).Clean(ctx, req.(*CleanArgs)) diff --git a/api/protobuf/core/api_container_service.proto b/api/protobuf/core/api_container_service.proto index 83849bd902..8a2ec29cdd 100644 --- a/api/protobuf/core/api_container_service.proto +++ b/api/protobuf/core/api_container_service.proto @@ -59,6 +59,8 @@ service ApiContainerService { // Renders the templates and their data to a files artifact in the Kurtosis File System rpc RenderTemplatesToFilesArtifact(RenderTemplatesToFilesArtifactArgs) returns (RenderTemplatesToFilesArtifactResponse) {} + + rpc ListFilesArtifactNamesAndUuids(google.protobuf.Empty) returns (ListFilesArtifactNamesAndUuidsResponse) {} } // ============================================================================================== @@ -516,3 +518,19 @@ message RenderTemplatesToFilesArtifactResponse { // UUID of the files artifact, for use when referencing it in the future string uuid = 1; } + + +// ============================================================================================== +// List Files Artifact Names And Uuids +// ============================================================================================== + +message FilesArtifactNameAndUuid { + // A string representing the name of the file + string fileName = 1; + // A string representing the uuid of the file + string fileUuid = 2; +} + +message ListFilesArtifactNamesAndUuidsResponse { + repeated FilesArtifactNameAndUuid file_names_and_uuids = 1; +} diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.d.ts b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.d.ts index b1032f4659..f0a9a595c4 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.d.ts +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.d.ts @@ -25,6 +25,7 @@ interface IApiContainerServiceService extends grpc.ServiceDefinition; storeFilesArtifactFromService: grpc.MethodDefinition; renderTemplatesToFilesArtifact: grpc.MethodDefinition; + listFilesArtifactNamesAndUuids: grpc.MethodDefinition; } export const ApiContainerServiceService: IApiContainerServiceService; @@ -47,6 +48,7 @@ export interface IApiContainerServiceServer extends grpc.UntypedServiceImplement storeWebFilesArtifact: grpc.handleUnaryCall; storeFilesArtifactFromService: grpc.handleUnaryCall; renderTemplatesToFilesArtifact: grpc.handleUnaryCall; + listFilesArtifactNamesAndUuids: grpc.handleUnaryCall; } export class ApiContainerServiceClient extends grpc.Client { @@ -100,4 +102,7 @@ export class ApiContainerServiceClient extends grpc.Client { renderTemplatesToFilesArtifact(argument: api_container_service_pb.RenderTemplatesToFilesArtifactArgs, callback: grpc.requestCallback): grpc.ClientUnaryCall; renderTemplatesToFilesArtifact(argument: api_container_service_pb.RenderTemplatesToFilesArtifactArgs, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; renderTemplatesToFilesArtifact(argument: api_container_service_pb.RenderTemplatesToFilesArtifactArgs, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listFilesArtifactNamesAndUuids(argument: google_protobuf_empty_pb.Empty, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listFilesArtifactNamesAndUuids(argument: google_protobuf_empty_pb.Empty, metadataOrOptions: grpc.Metadata | grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; + listFilesArtifactNamesAndUuids(argument: google_protobuf_empty_pb.Empty, metadata: grpc.Metadata | null, options: grpc.CallOptions | null, callback: grpc.requestCallback): grpc.ClientUnaryCall; } diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.js b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.js index 6d631c2dbb..9a0becdecb 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.js +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb.js @@ -82,6 +82,17 @@ function deserialize_api_container_api_GetServicesResponse(buffer_arg) { return api_container_service_pb.GetServicesResponse.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_api_container_api_ListFilesArtifactNamesAndUuidsResponse(arg) { + if (!(arg instanceof api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse)) { + throw new Error('Expected argument of type api_container_api.ListFilesArtifactNamesAndUuidsResponse'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_api_container_api_ListFilesArtifactNamesAndUuidsResponse(buffer_arg) { + return api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_api_container_api_PauseServiceArgs(arg) { if (!(arg instanceof api_container_service_pb.PauseServiceArgs)) { throw new Error('Expected argument of type api_container_api.PauseServiceArgs'); @@ -520,6 +531,17 @@ renderTemplatesToFilesArtifact: { responseSerialize: serialize_api_container_api_RenderTemplatesToFilesArtifactResponse, responseDeserialize: deserialize_api_container_api_RenderTemplatesToFilesArtifactResponse, }, + listFilesArtifactNamesAndUuids: { + path: '/api_container_api.ApiContainerService/ListFilesArtifactNamesAndUuids', + requestStream: false, + responseStream: false, + requestType: google_protobuf_empty_pb.Empty, + responseType: api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse, + requestSerialize: serialize_google_protobuf_Empty, + requestDeserialize: deserialize_google_protobuf_Empty, + responseSerialize: serialize_api_container_api_ListFilesArtifactNamesAndUuidsResponse, + responseDeserialize: deserialize_api_container_api_ListFilesArtifactNamesAndUuidsResponse, + }, }; exports.ApiContainerServiceClient = grpc.makeGenericClientConstructor(ApiContainerServiceService); diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.d.ts b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.d.ts index 94a4be33f0..9c129d2511 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.d.ts +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.d.ts @@ -124,6 +124,13 @@ export class ApiContainerServiceClient { response: api_container_service_pb.RenderTemplatesToFilesArtifactResponse) => void ): grpcWeb.ClientReadableStream; + listFilesArtifactNamesAndUuids( + request: google_protobuf_empty_pb.Empty, + metadata: grpcWeb.Metadata | undefined, + callback: (err: grpcWeb.RpcError, + response: api_container_service_pb.ListFilesArtifactNamesAndUuidsResponse) => void + ): grpcWeb.ClientReadableStream; + } export class ApiContainerServicePromiseClient { @@ -216,5 +223,10 @@ export class ApiContainerServicePromiseClient { metadata?: grpcWeb.Metadata ): Promise; + listFilesArtifactNamesAndUuids( + request: google_protobuf_empty_pb.Empty, + metadata?: grpcWeb.Metadata + ): Promise; + } diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js index 5a924eb14e..88a6042860 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb.js @@ -7,7 +7,7 @@ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 -// protoc v3.15.6 +// protoc v3.19.1 // source: api_container_service.proto @@ -1103,5 +1103,66 @@ proto.api_container_api.ApiContainerServicePromiseClient.prototype.renderTemplat }; +/** + * @const + * @type {!grpc.web.MethodDescriptor< + * !proto.google.protobuf.Empty, + * !proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse>} + */ +const methodDescriptor_ApiContainerService_ListFilesArtifactNamesAndUuids = new grpc.web.MethodDescriptor( + '/api_container_api.ApiContainerService/ListFilesArtifactNamesAndUuids', + grpc.web.MethodType.UNARY, + google_protobuf_empty_pb.Empty, + proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse, + /** + * @param {!proto.google.protobuf.Empty} request + * @return {!Uint8Array} + */ + function(request) { + return request.serializeBinary(); + }, + proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.deserializeBinary +); + + +/** + * @param {!proto.google.protobuf.Empty} request The + * request proto + * @param {?Object} metadata User defined + * call metadata + * @param {function(?grpc.web.RpcError, ?proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse)} + * callback The callback function(error, response) + * @return {!grpc.web.ClientReadableStream|undefined} + * The XHR Node Readable Stream + */ +proto.api_container_api.ApiContainerServiceClient.prototype.listFilesArtifactNamesAndUuids = + function(request, metadata, callback) { + return this.client_.rpcCall(this.hostname_ + + '/api_container_api.ApiContainerService/ListFilesArtifactNamesAndUuids', + request, + metadata || {}, + methodDescriptor_ApiContainerService_ListFilesArtifactNamesAndUuids, + callback); +}; + + +/** + * @param {!proto.google.protobuf.Empty} request The + * request proto + * @param {?Object=} metadata User defined + * call metadata + * @return {!Promise} + * Promise that resolves to the response + */ +proto.api_container_api.ApiContainerServicePromiseClient.prototype.listFilesArtifactNamesAndUuids = + function(request, metadata) { + return this.client_.unaryCall(this.hostname_ + + '/api_container_api.ApiContainerService/ListFilesArtifactNamesAndUuids', + request, + metadata || {}, + methodDescriptor_ApiContainerService_ListFilesArtifactNamesAndUuids); +}; + + module.exports = proto.api_container_api; diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts index 3726df15a0..5e110d2f76 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.d.ts @@ -1236,3 +1236,45 @@ export namespace RenderTemplatesToFilesArtifactResponse { } } +export class FilesArtifactNameAndUuid extends jspb.Message { + getFilename(): string; + setFilename(value: string): FilesArtifactNameAndUuid; + + getFileuuid(): string; + setFileuuid(value: string): FilesArtifactNameAndUuid; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilesArtifactNameAndUuid.AsObject; + static toObject(includeInstance: boolean, msg: FilesArtifactNameAndUuid): FilesArtifactNameAndUuid.AsObject; + static serializeBinaryToWriter(message: FilesArtifactNameAndUuid, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilesArtifactNameAndUuid; + static deserializeBinaryFromReader(message: FilesArtifactNameAndUuid, reader: jspb.BinaryReader): FilesArtifactNameAndUuid; +} + +export namespace FilesArtifactNameAndUuid { + export type AsObject = { + filename: string, + fileuuid: string, + } +} + +export class ListFilesArtifactNamesAndUuidsResponse extends jspb.Message { + getFileNamesAndUuidsList(): Array; + setFileNamesAndUuidsList(value: Array): ListFilesArtifactNamesAndUuidsResponse; + clearFileNamesAndUuidsList(): ListFilesArtifactNamesAndUuidsResponse; + addFileNamesAndUuids(value?: FilesArtifactNameAndUuid, index?: number): FilesArtifactNameAndUuid; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListFilesArtifactNamesAndUuidsResponse.AsObject; + static toObject(includeInstance: boolean, msg: ListFilesArtifactNamesAndUuidsResponse): ListFilesArtifactNamesAndUuidsResponse.AsObject; + static serializeBinaryToWriter(message: ListFilesArtifactNamesAndUuidsResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListFilesArtifactNamesAndUuidsResponse; + static deserializeBinaryFromReader(message: ListFilesArtifactNamesAndUuidsResponse, reader: jspb.BinaryReader): ListFilesArtifactNamesAndUuidsResponse; +} + +export namespace ListFilesArtifactNamesAndUuidsResponse { + export type AsObject = { + fileNamesAndUuidsList: Array, + } +} + diff --git a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js index 8e0eb13db9..bf3484887f 100644 --- a/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js +++ b/api/typescript/src/core/kurtosis_core_rpc_api_bindings/api_container_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); @@ -21,9 +27,11 @@ goog.exportSymbol('proto.api_container_api.DownloadFilesArtifactArgs', null, glo goog.exportSymbol('proto.api_container_api.DownloadFilesArtifactResponse', null, global); goog.exportSymbol('proto.api_container_api.ExecCommandArgs', null, global); goog.exportSymbol('proto.api_container_api.ExecCommandResponse', null, global); +goog.exportSymbol('proto.api_container_api.FilesArtifactNameAndUuid', null, global); goog.exportSymbol('proto.api_container_api.GetExistingAndHistoricalServiceIdentifiersResponse', null, global); goog.exportSymbol('proto.api_container_api.GetServicesArgs', null, global); goog.exportSymbol('proto.api_container_api.GetServicesResponse', null, global); +goog.exportSymbol('proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse', null, global); goog.exportSymbol('proto.api_container_api.PartitionConnectionInfo', null, global); goog.exportSymbol('proto.api_container_api.PartitionConnections', null, global); goog.exportSymbol('proto.api_container_api.PartitionServices', null, global); @@ -1033,6 +1041,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.api_container_api.RenderTemplatesToFilesArtifactResponse.displayName = 'proto.api_container_api.RenderTemplatesToFilesArtifactResponse'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.api_container_api.FilesArtifactNameAndUuid = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.api_container_api.FilesArtifactNameAndUuid, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.api_container_api.FilesArtifactNameAndUuid.displayName = 'proto.api_container_api.FilesArtifactNameAndUuid'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.repeatedFields_, null); +}; +goog.inherits(proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.displayName = 'proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse'; +} @@ -9841,4 +9891,324 @@ proto.api_container_api.RenderTemplatesToFilesArtifactResponse.prototype.setUuid }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.toObject = function(opt_includeInstance) { + return proto.api_container_api.FilesArtifactNameAndUuid.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.api_container_api.FilesArtifactNameAndUuid} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_container_api.FilesArtifactNameAndUuid.toObject = function(includeInstance, msg) { + var f, obj = { + filename: jspb.Message.getFieldWithDefault(msg, 1, ""), + fileuuid: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.api_container_api.FilesArtifactNameAndUuid} + */ +proto.api_container_api.FilesArtifactNameAndUuid.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.api_container_api.FilesArtifactNameAndUuid; + return proto.api_container_api.FilesArtifactNameAndUuid.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.api_container_api.FilesArtifactNameAndUuid} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.api_container_api.FilesArtifactNameAndUuid} + */ +proto.api_container_api.FilesArtifactNameAndUuid.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFilename(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFileuuid(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.api_container_api.FilesArtifactNameAndUuid.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.api_container_api.FilesArtifactNameAndUuid} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_container_api.FilesArtifactNameAndUuid.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFilename(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFileuuid(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string fileName = 1; + * @return {string} + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.getFilename = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.api_container_api.FilesArtifactNameAndUuid} returns this + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.setFilename = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string fileUuid = 2; + * @return {string} + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.getFileuuid = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.api_container_api.FilesArtifactNameAndUuid} returns this + */ +proto.api_container_api.FilesArtifactNameAndUuid.prototype.setFileuuid = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.repeatedFields_ = [1]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.toObject = function(opt_includeInstance) { + return proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.toObject = function(includeInstance, msg) { + var f, obj = { + fileNamesAndUuidsList: jspb.Message.toObjectList(msg.getFileNamesAndUuidsList(), + proto.api_container_api.FilesArtifactNameAndUuid.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse; + return proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.api_container_api.FilesArtifactNameAndUuid; + reader.readMessage(value,proto.api_container_api.FilesArtifactNameAndUuid.deserializeBinaryFromReader); + msg.addFileNamesAndUuids(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getFileNamesAndUuidsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.api_container_api.FilesArtifactNameAndUuid.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated FilesArtifactNameAndUuid file_names_and_uuids = 1; + * @return {!Array} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.getFileNamesAndUuidsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.api_container_api.FilesArtifactNameAndUuid, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} returns this +*/ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.setFileNamesAndUuidsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.api_container_api.FilesArtifactNameAndUuid=} opt_value + * @param {number=} opt_index + * @return {!proto.api_container_api.FilesArtifactNameAndUuid} + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.addFileNamesAndUuids = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.api_container_api.FilesArtifactNameAndUuid, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse} returns this + */ +proto.api_container_api.ListFilesArtifactNamesAndUuidsResponse.prototype.clearFileNamesAndUuidsList = function() { + return this.setFileNamesAndUuidsList([]); +}; + + goog.object.extend(exports, proto.api_container_api); diff --git a/api/typescript/src/core/lib/enclaves/enclave_context.ts b/api/typescript/src/core/lib/enclaves/enclave_context.ts index a51f5470b8..8429618e5e 100644 --- a/api/typescript/src/core/lib/enclaves/enclave_context.ts +++ b/api/typescript/src/core/lib/enclaves/enclave_context.ts @@ -36,7 +36,7 @@ import { ServiceInfo, StartServicesArgs, RunStarlarkScriptArgs, - RunStarlarkPackageArgs, + RunStarlarkPackageArgs, FilesArtifactNameAndUuid, } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb"; import * as path from "path"; import {parseKurtosisYaml} from "./kurtosis_yaml"; @@ -553,6 +553,17 @@ export class EnclaveContext { return ok(new ServiceIdentifiers(getExistingAndHistoricalIdentifiersValue.getAllidentifiersList())) } + // Docs available at https://docs.kurtosis.com/#getallfilesartifactnamesanduuids---filesartifactnameanduuid-filesartifactnamesanduuids + public async getAllFilesArtifactNamesAndUuids(): Promise> { + const getAllFilesArtifactsNamesAndUuidsResponseResult = await this.backend.getAllFilesArtifactNamesAndUuids() + if (getAllFilesArtifactsNamesAndUuidsResponseResult.isErr()) { + return err(getAllFilesArtifactsNamesAndUuidsResponseResult.error) + } + + const getAllFilesArtifactsNamesAndUuidsResponseValue = getAllFilesArtifactsNamesAndUuidsResponseResult.value + return ok(getAllFilesArtifactsNamesAndUuidsResponseValue.getFileNamesAndUuidsList()) + } + // ==================================================================================================== // Private helper functions // ==================================================================================================== diff --git a/api/typescript/src/core/lib/enclaves/generic_api_container_client.ts b/api/typescript/src/core/lib/enclaves/generic_api_container_client.ts index d4331278d1..5355fdfd77 100644 --- a/api/typescript/src/core/lib/enclaves/generic_api_container_client.ts +++ b/api/typescript/src/core/lib/enclaves/generic_api_container_client.ts @@ -9,18 +9,15 @@ import { ExecCommandArgs, ExecCommandResponse, GetExistingAndHistoricalServiceIdentifiersResponse, GetServicesArgs, - GetServicesResponse, + GetServicesResponse, ListFilesArtifactNamesAndUuidsResponse, PauseServiceArgs, RemoveServiceArgs, RemoveServiceResponse, - RenderTemplatesToFilesArtifactArgs, - RenderTemplatesToFilesArtifactResponse, RepartitionArgs, RunStarlarkPackageArgs, RunStarlarkScriptArgs, StartServicesArgs, StartServicesResponse, - StoreFilesArtifactFromServiceArgs, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, UnpauseServiceArgs, @@ -50,4 +47,5 @@ export interface GenericApiContainerClient { storeWebFilesArtifact(storeWebFilesArtifactArgs: StoreWebFilesArtifactArgs): Promise> downloadFilesArtifact(downloadFilesArtifactArgs: DownloadFilesArtifactArgs): Promise> getExistingAndHistoricalServiceIdentifiers(): Promise> + getAllFilesArtifactNamesAndUuids(): Promise> } diff --git a/api/typescript/src/core/lib/enclaves/grpc_node_api_container_client.ts b/api/typescript/src/core/lib/enclaves/grpc_node_api_container_client.ts index a00d9570b7..67a5b6acb7 100644 --- a/api/typescript/src/core/lib/enclaves/grpc_node_api_container_client.ts +++ b/api/typescript/src/core/lib/enclaves/grpc_node_api_container_client.ts @@ -17,17 +17,13 @@ import { UploadFilesArtifactResponse, StoreWebFilesArtifactArgs, StoreWebFilesArtifactResponse, - StoreFilesArtifactFromServiceArgs, - StoreFilesArtifactFromServiceResponse, GetServicesArgs, - RenderTemplatesToFilesArtifactArgs, - RenderTemplatesToFilesArtifactResponse, RunStarlarkScriptArgs, RunStarlarkPackageArgs, StarlarkRunResponseLine, DownloadFilesArtifactResponse, DownloadFilesArtifactArgs, - GetExistingAndHistoricalServiceIdentifiersResponse, + GetExistingAndHistoricalServiceIdentifiersResponse, ListFilesArtifactNamesAndUuidsResponse, } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb"; import type { ApiContainerServiceClient as ApiContainerServiceClientNode } from "../../kurtosis_core_rpc_api_bindings/api_container_service_grpc_pb"; import { GenericApiContainerClient } from "./generic_api_container_client"; @@ -353,4 +349,28 @@ export class GrpcNodeApiContainerClient implements GenericApiContainerClient { return ok(getExistingAndHistoricalServiceIdentifiersResult.value); } + + public async getAllFilesArtifactNamesAndUuids(): Promise> { + const emptyArg: google_protobuf_empty_pb.Empty = new google_protobuf_empty_pb.Empty() + const getAllFilesArtifactNamesAndUuidsPromise: Promise> = new Promise((resolve, _unusedReject) => { + this.client.listFilesArtifactNamesAndUuids(emptyArg, {},(error: ServiceError | null, response?: ListFilesArtifactNamesAndUuidsResponse) => { + if (error === null) { + if (!response) { + resolve(err(new Error("No error was encountered but the response was still falsy; this should never happen"))); + } else { + resolve(ok(response!)); + } + } else { + resolve(err(error)); + } + }) + }); + + const getAllFilesArtifactNamesAndUuidsResult: Result = await getAllFilesArtifactNamesAndUuidsPromise; + if (getAllFilesArtifactNamesAndUuidsResult.isErr()) { + return err(getAllFilesArtifactNamesAndUuidsResult.error) + } + + return ok(getAllFilesArtifactNamesAndUuidsResult.value); + } } diff --git a/api/typescript/src/core/lib/enclaves/grpc_web_api_container_client.ts b/api/typescript/src/core/lib/enclaves/grpc_web_api_container_client.ts index e8e37629c8..f55c6ce28c 100644 --- a/api/typescript/src/core/lib/enclaves/grpc_web_api_container_client.ts +++ b/api/typescript/src/core/lib/enclaves/grpc_web_api_container_client.ts @@ -24,13 +24,12 @@ import { StarlarkRunResponseLine, DownloadFilesArtifactArgs, DownloadFilesArtifactResponse, - GetExistingAndHistoricalServiceIdentifiersResponse, + GetExistingAndHistoricalServiceIdentifiersResponse, ListFilesArtifactNamesAndUuidsResponse, } from "../../kurtosis_core_rpc_api_bindings/api_container_service_pb"; import { ApiContainerServiceClient as ApiContainerServiceClientWeb } from "../../kurtosis_core_rpc_api_bindings/api_container_service_grpc_web_pb"; import { GenericApiContainerClient } from "./generic_api_container_client"; import { EnclaveUUID } from "./enclave_context"; import {Readable} from "stream"; -import {ServiceError} from "@grpc/grpc-js"; export class GrpcWebApiContainerClient implements GenericApiContainerClient { @@ -350,6 +349,30 @@ export class GrpcWebApiContainerClient implements GenericApiContainerClient { return ok(getExistingAndHistoricalServiceIdentifiersResult.value); } + public async getAllFilesArtifactNamesAndUuids(): Promise> { + const emptyArg: google_protobuf_empty_pb.Empty = new google_protobuf_empty_pb.Empty() + const getAllFilesArtifactNamesAndUuidsPromise: Promise> = new Promise((resolve, _unusedReject) => { + this.client.listFilesArtifactNamesAndUuids(emptyArg, {},(error: grpc_web.RpcError | null, response?: ListFilesArtifactNamesAndUuidsResponse) => { + if (error === null) { + if (!response) { + resolve(err(new Error("No error was encountered but the response was still falsy; this should never happen"))); + } else { + resolve(ok(response!)); + } + } else { + resolve(err(error)); + } + }) + }); + + const getAllFilesArtifactNamesAndUuidsResult: Result = await getAllFilesArtifactNamesAndUuidsPromise; + if (getAllFilesArtifactNamesAndUuidsResult.isErr()) { + return err(getAllFilesArtifactNamesAndUuidsResult.error) + } + + return ok(getAllFilesArtifactNamesAndUuidsResult.value); + } + private forwardStarlarkRunResponseLinesStreamToReadable(incomingStream: grpc_web.ClientReadableStream): Readable { const starlarkExecutionResponseLinesReadable: Readable = new Readable({ objectMode: true, //setting object mode is to allow pass objects in the readable.push() method diff --git a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js index e2db64053b..6a18e31707 100644 --- a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js +++ b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_grpc_web_pb.js @@ -7,7 +7,7 @@ // Code generated by protoc-gen-grpc-web. DO NOT EDIT. // versions: // protoc-gen-grpc-web v1.4.2 -// protoc v3.15.6 +// protoc v3.19.1 // source: engine_service.proto diff --git a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js index 4bf71a0b01..1e5e7c42ec 100644 --- a/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js +++ b/api/typescript/src/engine/kurtosis_engine_rpc_api_bindings/engine_service_pb.js @@ -13,7 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = Function('return this')(); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js'); goog.object.extend(proto, google_protobuf_empty_pb); diff --git a/cli/cli/commands/enclave/inspect/files_artifacts.go b/cli/cli/commands/enclave/inspect/files_artifacts.go new file mode 100644 index 0000000000..2a25c08c05 --- /dev/null +++ b/cli/cli/commands/enclave/inspect/files_artifacts.go @@ -0,0 +1,62 @@ +package inspect + +import ( + "context" + "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" + "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rpc_api_bindings" + "github.com/kurtosis-tech/kurtosis/api/golang/engine/lib/kurtosis_context" + "github.com/kurtosis-tech/kurtosis/cli/cli/helpers/output_printers" + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface" + "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/uuid_generator" + "github.com/kurtosis-tech/stacktrace" + "sort" +) + +const ( + fileUuidsHeader = "UUID" + fileNameHeader = "Name" +) + +func printFilesArtifacts(ctx context.Context, kurtosisCtx *kurtosis_context.KurtosisContext, _ backend_interface.KurtosisBackend, enclaveInfo *kurtosis_engine_rpc_api_bindings.EnclaveInfo, showFullUuids bool, _ bool) error { + enclaveContext, err := kurtosisCtx.GetEnclaveContext(ctx, enclaveInfo.GetName()) + if err != nil { + return stacktrace.Propagate(err, "An error occurred while fetching enclave with name '%v'", enclaveInfo.GetName()) + } + + filesArtifactsNamesAndUuids, err := enclaveContext.GetAllFilesArtifactNamesAndUuids(ctx) + if err != nil { + return stacktrace.Propagate(err, "An error occurred while fetching files artifacts name and uuids for enclave '%v'", enclaveContext.GetEnclaveName()) + } + + sortedFilesNamesAndUuids := sortFileNamesAndUuids(filesArtifactsNamesAndUuids) + + tablePrinter := output_printers.NewTablePrinter( + fileUuidsHeader, + fileNameHeader, + ) + + for _, filesArtifactNameAndUuid := range sortedFilesNamesAndUuids { + uuid := filesArtifactNameAndUuid.GetFileUuid() + if !showFullUuids { + uuid = uuid_generator.ShortenedUUIDString(uuid) + } + fileName := filesArtifactNameAndUuid.GetFileName() + if err := tablePrinter.AddRow(uuid, fileName); err != nil { + return stacktrace.Propagate(err, "An error occurred while adding row with uuid '%v' and file name '%v'; This is a bug in Kurtosis", uuid, fileName) + } + } + + tablePrinter.Print() + return nil +} + +// we sort this in ascending order so that the user finds the table easy to read +func sortFileNamesAndUuids(fileNamesAndUuids []*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid) []*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid { + sort.Slice(fileNamesAndUuids, func(i, j int) bool { + firstFilesArtifactNameAndUuid := fileNamesAndUuids[i] + secondFilesArtifactNameAndUuid := fileNamesAndUuids[j] + return firstFilesArtifactNameAndUuid.GetFileName() < secondFilesArtifactNameAndUuid.GetFileName() + }) + + return fileNamesAndUuids +} diff --git a/cli/cli/commands/enclave/inspect/files_artifacts_test.go b/cli/cli/commands/enclave/inspect/files_artifacts_test.go new file mode 100644 index 0000000000..70efac17f0 --- /dev/null +++ b/cli/cli/commands/enclave/inspect/files_artifacts_test.go @@ -0,0 +1,29 @@ +package inspect + +import ( + "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" + "github.com/stretchr/testify/require" + "testing" +) + +func TestFilesArtifacts_sortFileNamesAndUuids(t *testing.T) { + var fileNamesAndUuids []*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid + + fileNameAndUuid1 := &kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid{ + FileName: "test-file-1", + FileUuid: "000-000-0", + } + + fileNameAndUuid2 := &kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid{ + FileName: "test-file-0", + FileUuid: "123-edf-0", + } + + fileNamesAndUuids = append(fileNamesAndUuids, fileNameAndUuid1) + fileNamesAndUuids = append(fileNamesAndUuids, fileNameAndUuid2) + + sortedFileNamesAndUuids := sortFileNamesAndUuids(fileNamesAndUuids) + require.Len(t, sortedFileNamesAndUuids, 2) + require.Equal(t, sortedFileNamesAndUuids[0], fileNameAndUuid2) + require.Equal(t, sortedFileNamesAndUuids[1], fileNameAndUuid1) +} diff --git a/cli/cli/commands/enclave/inspect/inspect.go b/cli/cli/commands/enclave/inspect/inspect.go index 28be84313e..2593095e56 100644 --- a/cli/cli/commands/enclave/inspect/inspect.go +++ b/cli/cli/commands/enclave/inspect/inspect.go @@ -46,10 +46,13 @@ const ( kurtosisBackendCtxKey = "kurtosis-backend" engineClientCtxKey = "engine-client" + + filesArtifactsHeader = "Files Artifacts" ) -var enclaveObjectPrintingFuncs = map[string]func(ctx context.Context, kurtosisBackend backend_interface.KurtosisBackend, enclaveInfo *kurtosis_engine_rpc_api_bindings.EnclaveInfo, showFullUuid bool, isAPIContainerRunning bool) error{ - "User Services": printUserServices, +var enclaveObjectPrintingFuncs = map[string]func(ctx context.Context, kurtosisCtx *kurtosis_context.KurtosisContext, kurtosisBackend backend_interface.KurtosisBackend, enclaveInfo *kurtosis_engine_rpc_api_bindings.EnclaveInfo, showFullUuid bool, isAPIContainerRunning bool) error{ + "User Services": printUserServices, + filesArtifactsHeader: printFilesArtifacts, } var EnclaveInspectCmd = &engine_consuming_kurtosis_command.EngineConsumingKurtosisCommand{ @@ -153,6 +156,11 @@ func PrintEnclaveInspect(ctx context.Context, kurtosisBackend backend_interface. headersWithPrintErrs := []string{} for _, header := range sortedEnclaveObjHeaders { + if header == filesArtifactsHeader && !isApiContainerRunning { + // can't fetch files artifact information if APIC isn't running + continue + } + printingFunc, found := enclaveObjectPrintingFuncs[header] if !found { return stacktrace.NewError("No printing function found for enclave object '%v'; this is a bug in Kurtosis!", header) @@ -163,7 +171,7 @@ func PrintEnclaveInspect(ctx context.Context, kurtosisBackend backend_interface. padStr := strings.Repeat(headerPadChar, numPadChars) fmt.Printf("%v %v %v\n", padStr, header, padStr) - if err := printingFunc(ctx, kurtosisBackend, enclaveInfo, showFullUuids, isApiContainerRunning); err != nil { + if err := printingFunc(ctx, kurtosisCtx, kurtosisBackend, enclaveInfo, showFullUuids, isApiContainerRunning); err != nil { logrus.Error(err) headersWithPrintErrs = append(headersWithPrintErrs, header) } diff --git a/cli/cli/commands/enclave/inspect/user_services.go b/cli/cli/commands/enclave/inspect/user_services.go index 119c8a0bf7..3833ddafc6 100644 --- a/cli/cli/commands/enclave/inspect/user_services.go +++ b/cli/cli/commands/enclave/inspect/user_services.go @@ -7,6 +7,7 @@ import ( "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" "github.com/kurtosis-tech/kurtosis/api/golang/core/lib/binding_constructors" "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rpc_api_bindings" + "github.com/kurtosis-tech/kurtosis/api/golang/engine/lib/kurtosis_context" "github.com/kurtosis-tech/kurtosis/cli/cli/helpers/enclave_liveness_validator" "github.com/kurtosis-tech/kurtosis/cli/cli/helpers/output_printers" "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_interface" @@ -39,7 +40,7 @@ var ( colorizeStopped = color.New(color.FgYellow).SprintFunc() ) -func printUserServices(ctx context.Context, kurtosisBackend backend_interface.KurtosisBackend, enclaveInfo *kurtosis_engine_rpc_api_bindings.EnclaveInfo, showFullUuids bool, isAPIContainerRunning bool) error { +func printUserServices(ctx context.Context, _ *kurtosis_context.KurtosisContext, kurtosisBackend backend_interface.KurtosisBackend, enclaveInfo *kurtosis_engine_rpc_api_bindings.EnclaveInfo, showFullUuids bool, isAPIContainerRunning bool) error { enclaveUuidStr := enclaveInfo.GetEnclaveUuid() enclaveId := enclave.EnclaveUUID(enclaveUuidStr) userServiceFilters := &service.ServiceFilters{ diff --git a/core/server/api_container/server/api_container_service.go b/core/server/api_container/server/api_container_service.go index c84e8cb081..9269df9c87 100644 --- a/core/server/api_container/server/api_container_service.go +++ b/core/server/api_container/server/api_container_service.go @@ -448,6 +448,19 @@ func (apicService ApiContainerService) RenderTemplatesToFilesArtifact(ctx contex return response, nil } +func (apicService ApiContainerService) ListFilesArtifactNamesAndUuids(_ context.Context, _ *emptypb.Empty) (*kurtosis_core_rpc_api_bindings.ListFilesArtifactNamesAndUuidsResponse, error) { + filesArtifactsNamesAndUuids := apicService.filesArtifactStore.GetFileNamesAndUuids() + var filesArtifactNamesAndUuids []*kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid + for _, nameAndUuid := range filesArtifactsNamesAndUuids { + fileNameAndUuidGrpcType := &kurtosis_core_rpc_api_bindings.FilesArtifactNameAndUuid{ + FileName: nameAndUuid.GetName(), + FileUuid: string(nameAndUuid.GetUuid()), + } + filesArtifactNamesAndUuids = append(filesArtifactNamesAndUuids, fileNameAndUuidGrpcType) + } + return &kurtosis_core_rpc_api_bindings.ListFilesArtifactNamesAndUuidsResponse{FileNamesAndUuids: filesArtifactNamesAndUuids}, nil +} + // ==================================================================================================== // // Private helper methods diff --git a/core/server/commons/enclave_data_directory/file_artifact_name_and_uuid.go b/core/server/commons/enclave_data_directory/file_artifact_name_and_uuid.go new file mode 100644 index 0000000000..955f3bcbea --- /dev/null +++ b/core/server/commons/enclave_data_directory/file_artifact_name_and_uuid.go @@ -0,0 +1,14 @@ +package enclave_data_directory + +type FileNameAndUuid struct { + uuid FilesArtifactUUID + name string +} + +func (nameAndUuid FileNameAndUuid) GetName() string { + return nameAndUuid.name +} + +func (nameAndUuid FileNameAndUuid) GetUuid() FilesArtifactUUID { + return nameAndUuid.uuid +} diff --git a/core/server/commons/enclave_data_directory/files_artifact_store.go b/core/server/commons/enclave_data_directory/files_artifact_store.go index 991dc7bd7c..a31c03f2af 100644 --- a/core/server/commons/enclave_data_directory/files_artifact_store.go +++ b/core/server/commons/enclave_data_directory/files_artifact_store.go @@ -145,6 +145,21 @@ func (store FilesArtifactStore) ListFiles() map[string]bool { return artifactNameSet } +func (store FilesArtifactStore) GetFileNamesAndUuids() []FileNameAndUuid { + store.mutex.RLock() + defer store.mutex.RUnlock() + var nameAndUuids []FileNameAndUuid + for artifactName, artifactUuid := range store.artifactNameToArtifactUuid { + nameAndUuid := FileNameAndUuid{ + uuid: artifactUuid, + name: artifactName, + } + nameAndUuids = append(nameAndUuids, nameAndUuid) + } + return nameAndUuids + +} + // CheckIfArtifactNameExists - It checks whether the FileArtifact with a name exists or not func (store FilesArtifactStore) CheckIfArtifactNameExists(artifactName string) bool { diff --git a/core/server/commons/enclave_data_directory/files_artifact_store_test.go b/core/server/commons/enclave_data_directory/files_artifact_store_test.go index 1d025665d2..30b8d2d39d 100644 --- a/core/server/commons/enclave_data_directory/files_artifact_store_test.go +++ b/core/server/commons/enclave_data_directory/files_artifact_store_test.go @@ -135,6 +135,29 @@ func TestFileStore_RemoveFileFailsForNonExistentId(t *testing.T) { require.NotNil(t, err) } +func TestFilesArtifactStore_GetFileNamesAndUuids(t *testing.T) { + fileStore := getTestFileStore(t) + testContent := "Long Live Kurtosis!" + otherTestContent := "Long Live Kurtosis, But Different!" + + //Write Both Files + reader := strings.NewReader(testContent) + testArtifact1 := "test-artifact-1" + uuid, err := fileStore.StoreFile(reader, testArtifact1) + require.Nil(t, err) + + reader = strings.NewReader(otherTestContent) + testArtifact2 := "test-artifact-2" + anotherUUID, err := fileStore.StoreFile(reader, testArtifact2) + require.Nil(t, err) + require.NotEqual(t, uuid, anotherUUID) + + fileNameAndUuids := fileStore.GetFileNamesAndUuids() + require.Len(t, fileNameAndUuids, 2) + require.Contains(t, fileNameAndUuids, FileNameAndUuid{uuid: uuid, name: testArtifact1}) + require.Contains(t, fileNameAndUuids, FileNameAndUuid{uuid: anotherUUID, name: testArtifact2}) +} + func getTestFileStore(t *testing.T) *FilesArtifactStore { absDirpath, err := ioutil.TempDir("", "") require.Nil(t, err) diff --git a/docs/docs/reference/sdk.md b/docs/docs/reference/sdk.md index 803f95fad0..077d993cad 100644 --- a/docs/docs/reference/sdk.md +++ b/docs/docs/reference/sdk.md @@ -340,7 +340,7 @@ Gets the Name and UUID of the current services in the enclave. * `serviceIdentifiers`: A map of objects containing a mapping of Name -> UUID for all the services inside the enclave -### `uploadFiles(String pathToUpload, String artifactName) -> FileArtifaceUUID, FileArtifactName, Error` +### `uploadFiles(String pathToUpload, String artifactName) -> FileArtifactUUID, FileArtifactName, Error` Takes a filepath or directory path that will be compressed and uploaded to the Kurtosis filestore for use with [ContainerConfig.filesArtifactMountpoints][containerconfig_filesartifactmountpoints]. If a directory is specified, the contents of the directory will be uploaded to the archive without additional nesting. Empty directories cannot be uploaded. @@ -372,7 +372,14 @@ Downloads a files-containing `.tgz` from the given URL to the Kurtosis engine, s Get all (active & deleted) historical [identifiers][identifier] for services for the enclave represented by the [EnclaveContext][enclavecontext]. **Returns** -* `serviceIdentifiers` The [ServiceIdentifiers][service-identifiers] which provides user-friendly ways to lookup service identifier information. +* `serviceIdentifiers`: The [ServiceIdentifiers][service-identifiers] which provides user-friendly ways to lookup service identifier information. + +### `getAllFilesArtifactNamesAndUuids() -> []FilesArtifactNameAndUuid filesArtifactNamesAndUuids` + +Get a list of all files artifacts that are registered with the enclave represented by the [EnclaveContext][enclavecontext] + +**Returns** +* `filesArtifactNameAndUuids`: A list of files artifact names and their corresponding uuids. ServiceIdentifiers -------------------