diff --git a/api/golang/engine/kurtosis_engine_rest_api_bindings/engine_types.gen.go b/api/golang/engine/kurtosis_engine_rest_api_bindings/engine_types.gen.go deleted file mode 100644 index a518805b7e..0000000000 --- a/api/golang/engine/kurtosis_engine_rest_api_bindings/engine_types.gen.go +++ /dev/null @@ -1,144 +0,0 @@ -// Package kurtosis_engine_rest_api_bindings provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_engine_rest_api_bindings - -import ( - "time" -) - -// Defines values for ApiContainerStatus. -const ( - ApiContainerStatusNONEXISTENT ApiContainerStatus = "NON_EXISTENT" - ApiContainerStatusRUNNING ApiContainerStatus = "RUNNING" - ApiContainerStatusSTOPPED ApiContainerStatus = "STOPPED" -) - -// Defines values for EnclaveContainersStatus. -const ( - EnclaveContainersStatusEMPTY EnclaveContainersStatus = "EMPTY" - EnclaveContainersStatusRUNNING EnclaveContainersStatus = "RUNNING" - EnclaveContainersStatusSTOPPED EnclaveContainersStatus = "STOPPED" -) - -// Defines values for EnclaveMode. -const ( - PRODUCTION EnclaveMode = "PRODUCTION" - TEST EnclaveMode = "TEST" -) - -// Defines values for EnclaveTargetStatus. -const ( - STOP EnclaveTargetStatus = "STOP" -) - -// Defines values for ResponseType. -const ( - ERROR ResponseType = "ERROR" - INFO ResponseType = "INFO" - WARNING ResponseType = "WARNING" -) - -// ApiContainerStatus defines model for ApiContainerStatus. -type ApiContainerStatus string - -// CreateEnclave defines model for CreateEnclave. -type CreateEnclave struct { - ApiContainerLogLevel *string `json:"api_container_log_level,omitempty"` - ApiContainerVersionTag *string `json:"api_container_version_tag,omitempty"` - EnclaveName *string `json:"enclave_name,omitempty"` - Mode *EnclaveMode `json:"mode,omitempty"` -} - -// DeletionSummary defines model for DeletionSummary. -type DeletionSummary struct { - RemovedEnclaveNameAndUuids *[]EnclaveNameAndUuid `json:"removed_enclave_name_and_uuids,omitempty"` -} - -// EnclaveAPIContainerHostMachineInfo defines model for EnclaveAPIContainerHostMachineInfo. -type EnclaveAPIContainerHostMachineInfo struct { - GrpcPortOnHostMachine int `json:"grpc_port_on_host_machine"` - IpOnHostMachine string `json:"ip_on_host_machine"` -} - -// EnclaveAPIContainerInfo defines model for EnclaveAPIContainerInfo. -type EnclaveAPIContainerInfo struct { - BridgeIpAddress string `json:"bridge_ip_address"` - ContainerId string `json:"container_id"` - GrpcPortInsideEnclave int `json:"grpc_port_inside_enclave"` - IpInsideEnclave string `json:"ip_inside_enclave"` -} - -// EnclaveContainersStatus defines model for EnclaveContainersStatus. -type EnclaveContainersStatus string - -// EnclaveIdentifiers defines model for EnclaveIdentifiers. -type EnclaveIdentifiers struct { - EnclaveUuid string `json:"enclave_uuid"` - Name string `json:"name"` - ShortenedUuid string `json:"shortened_uuid"` -} - -// EnclaveInfo defines model for EnclaveInfo. -type EnclaveInfo struct { - ApiContainerHostMachineInfo *EnclaveAPIContainerHostMachineInfo `json:"api_container_host_machine_info,omitempty"` - ApiContainerInfo *EnclaveAPIContainerInfo `json:"api_container_info,omitempty"` - ApiContainerStatus ApiContainerStatus `json:"api_container_status"` - ContainersStatus EnclaveContainersStatus `json:"containers_status"` - CreationTime Timestamp `json:"creation_time"` - EnclaveUuid string `json:"enclave_uuid"` - Mode EnclaveMode `json:"mode"` - Name string `json:"name"` - ShortenedUuid string `json:"shortened_uuid"` -} - -// EnclaveMode defines model for EnclaveMode. -type EnclaveMode string - -// EnclaveNameAndUuid defines model for EnclaveNameAndUuid. -type EnclaveNameAndUuid struct { - Name string `json:"name"` - Uuid string `json:"uuid"` -} - -// EnclaveTargetStatus defines model for EnclaveTargetStatus. -type EnclaveTargetStatus string - -// EngineInfo defines model for EngineInfo. -type EngineInfo struct { - EngineVersion string `json:"engine_version"` -} - -// ResponseInfo defines model for ResponseInfo. -type ResponseInfo struct { - Code uint32 `json:"code"` - Message string `json:"message"` - Type ResponseType `json:"type"` -} - -// ResponseType defines model for ResponseType. -type ResponseType string - -// Timestamp defines model for Timestamp. -type Timestamp = time.Time - -// EnclaveIdentifier defines model for enclave_identifier. -type EnclaveIdentifier = string - -// RemoveAll defines model for remove_all. -type RemoveAll = bool - -// NotOk defines model for NotOk. -type NotOk = ResponseInfo - -// DeleteEnclavesParams defines parameters for DeleteEnclaves. -type DeleteEnclavesParams struct { - // RemoveAll If true, remove all enclaves. Default is false - RemoveAll *RemoveAll `form:"remove_all,omitempty" json:"remove_all,omitempty"` -} - -// PostEnclavesJSONRequestBody defines body for PostEnclaves for application/json ContentType. -type PostEnclavesJSONRequestBody = CreateEnclave - -// PostEnclavesEnclaveIdentifierStatusJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStatus for application/json ContentType. -type PostEnclavesEnclaveIdentifierStatusJSONRequestBody = EnclaveTargetStatus diff --git a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go b/api/golang/http_rest/api_types/api_types.gen.go similarity index 64% rename from api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go rename to api/golang/http_rest/api_types/api_types.gen.go index 1c8893b959..4c09c02e09 100644 --- a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go +++ b/api/golang/http_rest/api_types/api_types.gen.go @@ -1,13 +1,28 @@ -// Package kurtosis_core_rest_api_bindings provides primitives to interact with the openapi HTTP API. +// Package api_types provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_core_rest_api_bindings +package api_types import ( + "bytes" + "compress/gzip" + "encoding/base64" "encoding/json" + "fmt" + "net/url" + "path" + "strings" + "time" "github.com/deepmap/oapi-codegen/pkg/runtime" - openapi_types "github.com/deepmap/oapi-codegen/pkg/types" + "github.com/getkin/kin-openapi/openapi3" +) + +// Defines values for ApiContainerStatus. +const ( + ApiContainerStatusNONEXISTENT ApiContainerStatus = "NON_EXISTENT" + ApiContainerStatusRUNNING ApiContainerStatus = "RUNNING" + ApiContainerStatusSTOPPED ApiContainerStatus = "STOPPED" ) // Defines values for Connect. @@ -23,6 +38,24 @@ const ( ContainerStatusUNKNOWN ContainerStatus = "UNKNOWN" ) +// Defines values for EnclaveContainersStatus. +const ( + EnclaveContainersStatusEMPTY EnclaveContainersStatus = "EMPTY" + EnclaveContainersStatusRUNNING EnclaveContainersStatus = "RUNNING" + EnclaveContainersStatusSTOPPED EnclaveContainersStatus = "STOPPED" +) + +// Defines values for EnclaveMode. +const ( + PRODUCTION EnclaveMode = "PRODUCTION" + TEST EnclaveMode = "TEST" +) + +// Defines values for EnclaveTargetStatus. +const ( + STOP EnclaveTargetStatus = "STOP" +) + // Defines values for HttpMethodAvailability. const ( GET HttpMethodAvailability = "GET" @@ -40,6 +73,14 @@ const ( NOINSTRUCTIONSCACHING KurtosisFeatureFlag = "NO_INSTRUCTIONS_CACHING" ) +// Defines values for LogLineOperator. +const ( + DOESCONTAINMATCHREGEX LogLineOperator = "DOES_CONTAIN_MATCH_REGEX" + DOESCONTAINTEXT LogLineOperator = "DOES_CONTAIN_TEXT" + DOESNOTCONTAINMATCHREGEX LogLineOperator = "DOES_NOT_CONTAIN_MATCH_REGEX" + DOESNOTCONTAINTEXT LogLineOperator = "DOES_NOT_CONTAIN_TEXT" +) + // Defines values for ResponseType. const ( ERROR ResponseType = "ERROR" @@ -67,6 +108,9 @@ const ( UDP TransportProtocol = "UDP" ) +// ApiContainerStatus defines model for ApiContainerStatus. +type ApiContainerStatus string + // Connect 0 - CONNECT // Best effort port forwarding // 1 - NO_CONNECT // Port forwarding disabled type Connect string @@ -89,6 +133,73 @@ type Container struct { // 2 - UNKNOWN type ContainerStatus string +// CreateEnclave defines model for CreateEnclave. +type CreateEnclave struct { + ApiContainerLogLevel *string `json:"api_container_log_level,omitempty"` + ApiContainerVersionTag *string `json:"api_container_version_tag,omitempty"` + EnclaveName *string `json:"enclave_name,omitempty"` + Mode *EnclaveMode `json:"mode,omitempty"` +} + +// DeletionSummary defines model for DeletionSummary. +type DeletionSummary struct { + RemovedEnclaveNameAndUuids *[]EnclaveNameAndUuid `json:"removed_enclave_name_and_uuids,omitempty"` +} + +// EnclaveAPIContainerHostMachineInfo defines model for EnclaveAPIContainerHostMachineInfo. +type EnclaveAPIContainerHostMachineInfo struct { + GrpcPortOnHostMachine int `json:"grpc_port_on_host_machine"` + IpOnHostMachine string `json:"ip_on_host_machine"` +} + +// EnclaveAPIContainerInfo defines model for EnclaveAPIContainerInfo. +type EnclaveAPIContainerInfo struct { + BridgeIpAddress string `json:"bridge_ip_address"` + ContainerId string `json:"container_id"` + GrpcPortInsideEnclave int `json:"grpc_port_inside_enclave"` + IpInsideEnclave string `json:"ip_inside_enclave"` +} + +// EnclaveContainersStatus defines model for EnclaveContainersStatus. +type EnclaveContainersStatus string + +// EnclaveIdentifiers defines model for EnclaveIdentifiers. +type EnclaveIdentifiers struct { + EnclaveUuid string `json:"enclave_uuid"` + Name string `json:"name"` + ShortenedUuid string `json:"shortened_uuid"` +} + +// EnclaveInfo defines model for EnclaveInfo. +type EnclaveInfo struct { + ApiContainerHostMachineInfo *EnclaveAPIContainerHostMachineInfo `json:"api_container_host_machine_info,omitempty"` + ApiContainerInfo *EnclaveAPIContainerInfo `json:"api_container_info,omitempty"` + ApiContainerStatus ApiContainerStatus `json:"api_container_status"` + ContainersStatus EnclaveContainersStatus `json:"containers_status"` + CreationTime Timestamp `json:"creation_time"` + EnclaveUuid string `json:"enclave_uuid"` + Mode EnclaveMode `json:"mode"` + Name string `json:"name"` + ShortenedUuid string `json:"shortened_uuid"` +} + +// EnclaveMode defines model for EnclaveMode. +type EnclaveMode string + +// EnclaveNameAndUuid defines model for EnclaveNameAndUuid. +type EnclaveNameAndUuid struct { + Name string `json:"name"` + Uuid string `json:"uuid"` +} + +// EnclaveTargetStatus defines model for EnclaveTargetStatus. +type EnclaveTargetStatus string + +// EngineInfo defines model for EngineInfo. +type EngineInfo struct { + EngineVersion string `json:"engine_version"` +} + // ExecCommand Exec Command type ExecCommand struct { CommandArgs []string `json:"command_args"` @@ -133,6 +244,21 @@ type ImageDownloadMode string // KurtosisFeatureFlag 0 - NO_INSTRUCTIONS_CACHING type KurtosisFeatureFlag string +// LogLine defines model for LogLine. +type LogLine struct { + Line []string `json:"line"` + Timestamp Timestamp `json:"timestamp"` +} + +// LogLineFilter defines model for LogLineFilter. +type LogLineFilter struct { + Operator LogLineOperator `json:"operator"` + TextPattern string `json:"text_pattern"` +} + +// LogLineOperator defines model for LogLineOperator. +type LogLineOperator string + // Port Shared Objects (Used By Multiple Endpoints) type Port struct { ApplicationProtocol *string `json:"application_protocol,omitempty"` @@ -269,6 +395,12 @@ type ServiceInfo struct { ShortenedUuid string `json:"shortened_uuid"` } +// ServiceLogs defines model for ServiceLogs. +type ServiceLogs struct { + NotFoundServiceUuidSet *[]string `json:"not_found_service_uuid_set,omitempty"` + ServiceLogsByServiceUuid *map[string]LogLine `json:"service_logs_by_service_uuid,omitempty"` +} + // ServiceStatus 0 - STOPPED // 1 - RUNNING // 2 - UNKNOWN @@ -406,6 +538,9 @@ type StoreWebFilesArtifact struct { Url string `json:"url"` } +// Timestamp defines model for Timestamp. +type Timestamp = time.Time + // TransportProtocol 0 - TCP // 1 - SCTP // 2 - UDP @@ -414,18 +549,27 @@ type TransportProtocol string // ArtifactIdentifier defines model for artifact_identifier. type ArtifactIdentifier = string -// EnclaveIdentifier The package identifier that will be executed +// ConjunctiveFilters defines model for conjunctive_filters. +type ConjunctiveFilters = []LogLineFilter + +// EnclaveIdentifier defines model for enclave_identifier. type EnclaveIdentifier = string // ExpectedResponse defines model for expected_response. type ExpectedResponse = string +// FollowLogs defines model for follow_logs. +type FollowLogs = bool + // HttpMethod defines model for http_method. type HttpMethod = HttpMethodAvailability // InitialDelayMilliseconds defines model for initial_delay_milliseconds. type InitialDelayMilliseconds = int32 +// NumLogLines defines model for num_log_lines. +type NumLogLines = int + // PackageId defines model for package_id. type PackageId = string @@ -435,6 +579,9 @@ type Path = string // PortNumber defines model for port_number. type PortNumber = int32 +// RemoveAll defines model for remove_all. +type RemoveAll = bool + // RequestBody defines model for request_body. type RequestBody = string @@ -444,71 +591,14 @@ type Retries = int32 // RetriesDelayMilliseconds defines model for retries_delay_milliseconds. type RetriesDelayMilliseconds = int32 +// ReturnAllLogs defines model for return_all_logs. +type ReturnAllLogs = bool + // ServiceIdentifier defines model for service_identifier. type ServiceIdentifier = string -// NotOk defines model for NotOk. -type NotOk = ResponseInfo - -// PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody defines parameters for PostEnclavesEnclaveIdentifierArtifactsLocalFile. -type PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody = openapi_types.File - -// GetEnclavesEnclaveIdentifierServicesParams defines parameters for GetEnclavesEnclaveIdentifierServices. -type GetEnclavesEnclaveIdentifierServicesParams struct { - // Services Select services to get information - Services *[]string `form:"services,omitempty" json:"services,omitempty"` -} - -// GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams defines parameters for GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability. -type GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams struct { - // HttpMethod The HTTP method used to check availability. Default is GET. - HttpMethod *HttpMethod `form:"http_method,omitempty" json:"http_method,omitempty"` - - // Path The path of the service to check. It mustn't start with the first slash. For instance `service/health` - Path *Path `form:"path,omitempty" json:"path,omitempty"` - - // InitialDelayMilliseconds The number of milliseconds to wait until executing the first HTTP call - InitialDelayMilliseconds *InitialDelayMilliseconds `form:"initial_delay_milliseconds,omitempty" json:"initial_delay_milliseconds,omitempty"` - - // Retries Max number of HTTP call attempts that this will execute until giving up and returning an error - Retries *Retries `form:"retries,omitempty" json:"retries,omitempty"` - - // RetriesDelayMilliseconds Number of milliseconds to wait between retries - RetriesDelayMilliseconds *RetriesDelayMilliseconds `form:"retries_delay_milliseconds,omitempty" json:"retries_delay_milliseconds,omitempty"` - - // ExpectedResponse If the endpoint returns this value, the service will be marked as available (e.g. Hello World). - ExpectedResponse *ExpectedResponse `form:"expected_response,omitempty" json:"expected_response,omitempty"` - - // RequestBody If the http_method is set to POST, this value will be send as the body of the availability request. - RequestBody *RequestBody `form:"request_body,omitempty" json:"request_body,omitempty"` -} - -// PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody defines parameters for PostEnclavesEnclaveIdentifierStarlarkPackages. -type PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody = openapi_types.File - -// PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsLocalFile for multipart/form-data ContentType. -type PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartRequestBody = PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody - -// PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsRemoteFile for application/json ContentType. -type PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody = StoreWebFilesArtifact - -// PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier for application/json ContentType. -type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody = StoreFilesArtifactFromService - -// PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesConnection for application/json ContentType. -type PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody = Connect - -// PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand for application/json ContentType. -type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody = ExecCommand - -// PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkPackages for multipart/form-data ContentType. -type PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartRequestBody = PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody - -// PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId for application/json ContentType. -type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody = RunStarlarkPackage - -// PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkScripts for application/json ContentType. -type PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody = RunStarlarkScript +// ServiceUuidSet defines model for service_uuid_set. +type ServiceUuidSet = []string // AsStarlarkInterpretationError returns the union data inside the StarlarkError_Error as a StarlarkInterpretationError func (t StarlarkError_Error) AsStarlarkInterpretationError() (StarlarkInterpretationError, error) { @@ -789,3 +879,143 @@ func (t *StarlarkRunResponseLine) UnmarshalJSON(b []byte) error { err := t.union.UnmarshalJSON(b) return err } + +// Base64 encoded, gzipped, json marshaled Swagger object +var swaggerSpec = []string{ + + "H4sIAAAAAAAC/+w8XW/jNrZ/hdC9wLQLTWb2AxcXeUsTZ8bYiW3YzqaLZqClpWObHYrUkpQz7iL//YIU", + "KVMSJctzd9uXvrSNeHh4vnh4vtx/RSnPC86AKRld/ysqsMA5KBDmLywU2eJUJSQDpsiWgNCfM5CpIIUi", + "nEXX0XoPyAEihnNAXKCyJFkUR0QDFFjtozjSS9F1EGccCfhnSQRk0bUSJcSRTPeQY32YOhZ6m1SCsF30", + "+hpHKWc/lyxV5ADJllBHrDnrnyWI4+mwEKiPnCjIzeb/FrCNrqP/encSx7sKTL77xHefCIN7sz96jR1J", + "WAh8NBQBSyk+wKCYHh+ndzGSey4UMMhQ9TcXVmRbpPaALKKw5AKnXCY4+FpAqiBLBMiCMwldKqeOjqzg", + "hCkkQJWCSaT2RKIDpiXEBkCCOJAU0AuhFG0A5Vh8gQxhifABE4o3FNB3cLW7Qh+BUo6euKDZ91eOsZaa", + "uoQNM7LllPKXhPJdr+Z9kACyDecUM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WnNezx24xM2v/i7gMQt1xH2SW/tqL1zIw41wG/jFDvnD1mhk0eHxpczC+PJb284y4A7Okw3F2CG9dys", + "3r3gua1q9A/5DrdEmhN0wZoXL0Va5ak9/0OKjeS0VIAqyOrn1F5Fs/paHVS383lBbDv/fFnMI2BgIs+I", + "5wk2DQmFXAsXgJ5gg5pzjyN7CZfLrxSBBvjj8hNSHLk2WPV7YjeBOUoqGu2ANNb+xFz9QGRYwVs7ft4h", + "tDvbFKyRrW8Xtj62ul0vXHHsbuEVxta3+i+9HMWRXvoc+E1lXCeqiiiq124WU7Q+FqaqUQ96R++v/nj1", + "XtPHC2C4INF19Oer91fvo+on/VpXr6//FwAA//99N4sZXEUAAA==", +} + +// GetSwagger returns the content of the embedded swagger specification file +// or error if failed to decode +func decodeSpec() ([]byte, error) { + zipped, err := base64.StdEncoding.DecodeString(strings.Join(swaggerSpec, "")) + if err != nil { + return nil, fmt.Errorf("error base64 decoding spec: %s", err) + } + zr, err := gzip.NewReader(bytes.NewReader(zipped)) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %s", err) + } + var buf bytes.Buffer + _, err = buf.ReadFrom(zr) + if err != nil { + return nil, fmt.Errorf("error decompressing spec: %s", err) + } + + return buf.Bytes(), nil +} + +var rawSpec = decodeSpecCached() + +// a naive cached of a decoded swagger spec +func decodeSpecCached() func() ([]byte, error) { + data, err := decodeSpec() + return func() ([]byte, error) { + return data, err + } +} + +// Constructs a synthetic filesystem for resolving external references when loading openapi specifications. +func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { + var res = make(map[string]func() ([]byte, error)) + if len(pathToFile) > 0 { + res[pathToFile] = rawSpec + } + + return res +} + +// GetSwagger returns the Swagger specification corresponding to the generated code +// in this file. The external references of Swagger specification are resolved. +// The logic of resolving external references is tightly connected to "import-mapping" feature. +// Externally referenced files must be embedded in the corresponding golang packages. +// Urls can be supported but this task was out of the scope. +func GetSwagger() (swagger *openapi3.T, err error) { + var resolvePath = PathToRawSpec("") + + loader := openapi3.NewLoader() + loader.IsExternalRefsAllowed = true + loader.ReadFromURIFunc = func(loader *openapi3.Loader, url *url.URL) ([]byte, error) { + var pathToFile = url.String() + pathToFile = path.Clean(pathToFile) + getSpec, ok := resolvePath[pathToFile] + if !ok { + err1 := fmt.Errorf("path not found: %s", pathToFile) + return nil, err1 + } + return getSpec() + } + var specData []byte + specData, err = rawSpec() + if err != nil { + return + } + swagger, err = loader.LoadFromData(specData) + if err != nil { + return + } + return +} diff --git a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go b/api/golang/http_rest/core_rest_api/api_container_server.gen.go similarity index 79% rename from api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go rename to api/golang/http_rest/core_rest_api/api_container_server.gen.go index 69382d8a28..3ef2171331 100644 --- a/api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go +++ b/api/golang/http_rest/core_rest_api/api_container_server.gen.go @@ -1,7 +1,7 @@ -// Package kurtosis_core_rest_api_bindings provides primitives to interact with the openapi HTTP API. +// Package core_rest_api provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_core_rest_api_bindings +package core_rest_api import ( "bytes" @@ -18,60 +18,125 @@ import ( "strings" "github.com/deepmap/oapi-codegen/pkg/runtime" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" "github.com/getkin/kin-openapi/openapi3" + externalRef0 "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" "github.com/labstack/echo/v4" ) +// NotOk defines model for NotOk. +type NotOk = externalRef0.ResponseInfo + +// PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody defines parameters for PostEnclavesEnclaveIdentifierArtifactsLocalFile. +type PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody = openapi_types.File + +// GetEnclavesEnclaveIdentifierServicesParams defines parameters for GetEnclavesEnclaveIdentifierServices. +type GetEnclavesEnclaveIdentifierServicesParams struct { + // Services Select services to get information + Services *[]string `form:"services,omitempty" json:"services,omitempty"` +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams defines parameters for GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability. +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams struct { + // HttpMethod The HTTP method used to check availability. Default is GET. + HttpMethod *externalRef0.HttpMethod `form:"http_method,omitempty" json:"http_method,omitempty"` + + // Path The path of the service to check. It mustn't start with the first slash. For instance `service/health` + Path *externalRef0.Path `form:"path,omitempty" json:"path,omitempty"` + + // InitialDelayMilliseconds The number of milliseconds to wait until executing the first HTTP call + InitialDelayMilliseconds *externalRef0.InitialDelayMilliseconds `form:"initial_delay_milliseconds,omitempty" json:"initial_delay_milliseconds,omitempty"` + + // Retries Max number of HTTP call attempts that this will execute until giving up and returning an error + Retries *externalRef0.Retries `form:"retries,omitempty" json:"retries,omitempty"` + + // RetriesDelayMilliseconds Number of milliseconds to wait between retries + RetriesDelayMilliseconds *externalRef0.RetriesDelayMilliseconds `form:"retries_delay_milliseconds,omitempty" json:"retries_delay_milliseconds,omitempty"` + + // ExpectedResponse If the endpoint returns this value, the service will be marked as available (e.g. Hello World). + ExpectedResponse *externalRef0.ExpectedResponse `form:"expected_response,omitempty" json:"expected_response,omitempty"` + + // RequestBody If the http_method is set to POST, this value will be send as the body of the availability request. + RequestBody *externalRef0.RequestBody `form:"request_body,omitempty" json:"request_body,omitempty"` +} + +// PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody defines parameters for PostEnclavesEnclaveIdentifierStarlarkPackages. +type PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody = openapi_types.File + +// PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsLocalFile for multipart/form-data ContentType. +type PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartRequestBody = PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody + +// PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsRemoteFile for application/json ContentType. +type PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody = externalRef0.StoreWebFilesArtifact + +// PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody defines body for PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier for application/json ContentType. +type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody = externalRef0.StoreFilesArtifactFromService + +// PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesConnection for application/json ContentType. +type PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody = externalRef0.Connect + +// PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody defines body for PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand for application/json ContentType. +type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody = externalRef0.ExecCommand + +// PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkPackages for multipart/form-data ContentType. +type PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartRequestBody = PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody + +// PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId for application/json ContentType. +type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody = externalRef0.RunStarlarkPackage + +// PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStarlarkScripts for application/json ContentType. +type PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody = externalRef0.RunStarlarkScript + // ServerInterface represents all server handlers. type ServerInterface interface { // (GET /enclaves/{enclave_identifier}/artifacts) - GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/local-file) - PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/remote-file) - PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/services/{service_identifier}) - PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error // (GET /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}) - GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error // (GET /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download) - GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error // (GET /enclaves/{enclave_identifier}/services) - GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error + GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error // (POST /enclaves/{enclave_identifier}/services/connection) - PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (GET /enclaves/{enclave_identifier}/services/history) - GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (GET /enclaves/{enclave_identifier}/services/{service_identifier}) - GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error + GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error // (POST /enclaves/{enclave_identifier}/services/{service_identifier}/command) - PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error // (GET /enclaves/{enclave_identifier}/services/{service_identifier}/endpoints/{port_number}/availability) - GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error + GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, portNumber externalRef0.PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error // (GET /enclaves/{enclave_identifier}/starlark) - GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/starlark/packages) - PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/starlark/packages/{package_id}) - PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId) error + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, packageId externalRef0.PackageId) error // (POST /enclaves/{enclave_identifier}/starlark/scripts) - PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error } // ServerInterfaceWrapper converts echo contexts to parameters. @@ -83,7 +148,7 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -99,7 +164,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifacts(ctx echo. func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -115,7 +180,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsLocalFile func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -131,7 +196,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsRemoteFil func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -139,7 +204,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesS } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier ServiceIdentifier + var serviceIdentifier externalRef0.ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -155,7 +220,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesS func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -163,7 +228,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId } // ------------- Path parameter "artifact_identifier" ------------- - var artifactIdentifier ArtifactIdentifier + var artifactIdentifier externalRef0.ArtifactIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, ctx.Param("artifact_identifier"), &artifactIdentifier) if err != nil { @@ -179,7 +244,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -187,7 +252,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId } // ------------- Path parameter "artifact_identifier" ------------- - var artifactIdentifier ArtifactIdentifier + var artifactIdentifier externalRef0.ArtifactIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, ctx.Param("artifact_identifier"), &artifactIdentifier) if err != nil { @@ -203,7 +268,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServices(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -228,7 +293,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServices(ctx echo.C func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -244,7 +309,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesConnection func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -260,7 +325,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesHistory(ctx func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -268,7 +333,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier ServiceIdentifier + var serviceIdentifier externalRef0.ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -284,7 +349,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -292,7 +357,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIde } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier ServiceIdentifier + var serviceIdentifier externalRef0.ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -308,7 +373,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIde func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -316,7 +381,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier ServiceIdentifier + var serviceIdentifier externalRef0.ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -324,7 +389,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "port_number" ------------- - var portNumber PortNumber + var portNumber externalRef0.PortNumber err = runtime.BindStyledParameterWithLocation("simple", false, "port_number", runtime.ParamLocationPath, ctx.Param("port_number"), &portNumber) if err != nil { @@ -391,7 +456,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -407,7 +472,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStarlark(ctx echo.C func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -423,7 +488,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackages(c func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -431,7 +496,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPa } // ------------- Path parameter "package_id" ------------- - var packageId PackageId + var packageId externalRef0.PackageId err = runtime.BindStyledParameterWithLocation("simple", false, "package_id", runtime.ParamLocationPath, ctx.Param("package_id"), &packageId) if err != nil { @@ -447,7 +512,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPa func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -506,17 +571,17 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } -type NotOkJSONResponse ResponseInfo +type NotOkJSONResponse externalRef0.ResponseInfo type GetEnclavesEnclaveIdentifierArtifactsRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsResponseObject interface { VisitGetEnclavesEnclaveIdentifierArtifactsResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierArtifacts200JSONResponse []FileArtifactReference +type GetEnclavesEnclaveIdentifierArtifacts200JSONResponse []externalRef0.FileArtifactReference func (response GetEnclavesEnclaveIdentifierArtifacts200JSONResponse) VisitGetEnclavesEnclaveIdentifierArtifactsResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -526,7 +591,7 @@ func (response GetEnclavesEnclaveIdentifierArtifacts200JSONResponse) VisitGetEnc } type GetEnclavesEnclaveIdentifierArtifactsdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -538,7 +603,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsdefaultJSONResponse) VisitGe } type PostEnclavesEnclaveIdentifierArtifactsLocalFileRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *multipart.Reader } @@ -546,7 +611,7 @@ type PostEnclavesEnclaveIdentifierArtifactsLocalFileResponseObject interface { VisitPostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse map[string]FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse map[string]externalRef0.FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -556,7 +621,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse) V } type PostEnclavesEnclaveIdentifierArtifactsLocalFiledefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -568,7 +633,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsLocalFiledefaultJSONRespons } type PostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody } @@ -576,7 +641,7 @@ type PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponseObject interface { VisitPostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse externalRef0.FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -586,7 +651,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse) } type PostEnclavesEnclaveIdentifierArtifactsRemoteFiledefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -598,8 +663,8 @@ func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFiledefaultJSONRespon } type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` Body *PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody } @@ -607,7 +672,7 @@ type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponseObje VisitPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse externalRef0.FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -617,7 +682,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier20 } type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -629,15 +694,15 @@ func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierde } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ArtifactIdentifier ArtifactIdentifier `json:"artifact_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ArtifactIdentifier externalRef0.ArtifactIdentifier `json:"artifact_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse []FileArtifactDescription +type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse []externalRef0.FileArtifactDescription func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -647,7 +712,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONRes } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -659,8 +724,8 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierdefaultJSO } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ArtifactIdentifier ArtifactIdentifier `json:"artifact_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ArtifactIdentifier externalRef0.ArtifactIdentifier `json:"artifact_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponseObject interface { @@ -687,7 +752,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload20 } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloaddefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -699,7 +764,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadde } type GetEnclavesEnclaveIdentifierServicesRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Params GetEnclavesEnclaveIdentifierServicesParams } @@ -707,7 +772,7 @@ type GetEnclavesEnclaveIdentifierServicesResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServices200JSONResponse map[string]ServiceInfo +type GetEnclavesEnclaveIdentifierServices200JSONResponse map[string]externalRef0.ServiceInfo func (response GetEnclavesEnclaveIdentifierServices200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -717,7 +782,7 @@ func (response GetEnclavesEnclaveIdentifierServices200JSONResponse) VisitGetEncl } type GetEnclavesEnclaveIdentifierServicesdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -729,7 +794,7 @@ func (response GetEnclavesEnclaveIdentifierServicesdefaultJSONResponse) VisitGet } type PostEnclavesEnclaveIdentifierServicesConnectionRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody } @@ -746,7 +811,7 @@ func (response PostEnclavesEnclaveIdentifierServicesConnection200Response) Visit } type PostEnclavesEnclaveIdentifierServicesConnectiondefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -758,14 +823,14 @@ func (response PostEnclavesEnclaveIdentifierServicesConnectiondefaultJSONRespons } type GetEnclavesEnclaveIdentifierServicesHistoryRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierServicesHistoryResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesHistoryResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse []ServiceIdentifiers +type GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse []externalRef0.ServiceIdentifiers func (response GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesHistoryResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -775,7 +840,7 @@ func (response GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse) Visit } type GetEnclavesEnclaveIdentifierServicesHistorydefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -787,15 +852,15 @@ func (response GetEnclavesEnclaveIdentifierServicesHistorydefaultJSONResponse) V } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse ServiceInfo +type GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse externalRef0.ServiceInfo func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -805,7 +870,7 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONRespo } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -817,8 +882,8 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifierdefaultJSONR } type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` Body *PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody } @@ -826,7 +891,7 @@ type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponseObject VisitPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse ExecCommandResult +type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse externalRef0.ExecCommandResult func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse) VisitPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -836,7 +901,7 @@ func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200J } type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommanddefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -848,9 +913,9 @@ func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommanddefa } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier ServiceIdentifier `json:"service_identifier"` - PortNumber PortNumber `json:"port_number"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` + PortNumber externalRef0.PortNumber `json:"port_number"` Params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams } @@ -867,14 +932,14 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPor } type GetEnclavesEnclaveIdentifierStarlarkRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierStarlarkResponseObject interface { VisitGetEnclavesEnclaveIdentifierStarlarkResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierStarlark200JSONResponse StarlarkDescription +type GetEnclavesEnclaveIdentifierStarlark200JSONResponse externalRef0.StarlarkDescription func (response GetEnclavesEnclaveIdentifierStarlark200JSONResponse) VisitGetEnclavesEnclaveIdentifierStarlarkResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -884,7 +949,7 @@ func (response GetEnclavesEnclaveIdentifierStarlark200JSONResponse) VisitGetEncl } type GetEnclavesEnclaveIdentifierStarlarkdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -896,7 +961,7 @@ func (response GetEnclavesEnclaveIdentifierStarlarkdefaultJSONResponse) VisitGet } type PostEnclavesEnclaveIdentifierStarlarkPackagesRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *multipart.Reader } @@ -913,7 +978,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackages200Response) VisitPo } type PostEnclavesEnclaveIdentifierStarlarkPackagesdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -925,8 +990,8 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesdefaultJSONResponse) } type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` - PackageId PackageId `json:"package_id"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + PackageId externalRef0.PackageId `json:"package_id"` Body *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody } @@ -934,7 +999,7 @@ type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponseObject interf VisitPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse []StarlarkRunResponseLine +type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse []externalRef0.StarlarkRunResponseLine func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse) VisitPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -963,7 +1028,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200Applicat } type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIddefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -975,7 +1040,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIddefaultJSON } type PostEnclavesEnclaveIdentifierStarlarkScriptsRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody } @@ -983,7 +1048,7 @@ type PostEnclavesEnclaveIdentifierStarlarkScriptsResponseObject interface { VisitPostEnclavesEnclaveIdentifierStarlarkScriptsResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse []StarlarkRunResponseLine +type PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse []externalRef0.StarlarkRunResponseLine func (response PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse) VisitPostEnclavesEnclaveIdentifierStarlarkScriptsResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -1012,7 +1077,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkScripts200ApplicationoctetSt } type PostEnclavesEnclaveIdentifierStarlarkScriptsdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -1089,7 +1154,7 @@ type strictHandler struct { } // GetEnclavesEnclaveIdentifierArtifacts operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1114,7 +1179,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, } // PostEnclavesEnclaveIdentifierArtifactsLocalFile operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsLocalFileRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1145,7 +1210,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx ech } // PostEnclavesEnclaveIdentifierArtifactsRemoteFile operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1176,7 +1241,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx ec } // PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1208,7 +1273,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceId } // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1234,7 +1299,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier } // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1260,7 +1325,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier } // GetEnclavesEnclaveIdentifierServices operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error { var request GetEnclavesEnclaveIdentifierServicesRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1286,7 +1351,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, } // PostEnclavesEnclaveIdentifierServicesConnection operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierServicesConnectionRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1317,7 +1382,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx ech } // GetEnclavesEnclaveIdentifierServicesHistory operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierServicesHistoryRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1342,7 +1407,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Co } // GetEnclavesEnclaveIdentifierServicesServiceIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { var request GetEnclavesEnclaveIdentifierServicesServiceIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1368,7 +1433,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(c } // PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { var request PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1400,7 +1465,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierC } // GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, portNumber externalRef0.PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error { var request GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1428,7 +1493,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEn } // GetEnclavesEnclaveIdentifierStarlark operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierStarlarkRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1453,7 +1518,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, } // PostEnclavesEnclaveIdentifierStarlarkPackages operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierStarlarkPackagesRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1484,7 +1549,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo. } // PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, packageId externalRef0.PackageId) error { var request PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1516,7 +1581,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId( } // PostEnclavesEnclaveIdentifierStarlarkScripts operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierStarlarkScriptsRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1549,73 +1614,60 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.C // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w8e2/bOJ5fhdAd0JmFG3e7i8Uh/6Vp0hrbOkbsbO4wKbS09LPNKUVqSSqpp8h3P/Bl", - "UxYly2naZGfnn2nGIvl7P/n4mmS8KDkDpmRy/DUpscAFKBDm/7BQZIEzlZIcmCILAkL/nIPMBCkV4Sw5", - "TmYrQH4gYrgAxAWqKpIng4ToASVWq2SQ6E/JcXTNQSLgXxURkCfHSlQwSGS2ggJrYGpd6mlSCcKWyf39", - "IAGWUXwLO0hFQEUGdkFqklXi7DNeAtougNQKK3RHKEVzQPAFskqBpjSC5pcSMgV5KkCWnElowhgtkFoB", - "ApaXnDCFBKhKMInUikh0i2kFAzNAgrglGWzgFlh8hhxh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ger returns the content of the embedded swagger specification file @@ -1655,6 +1707,14 @@ func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { res[pathToFile] = rawSpec } + pathPrefix := path.Dir(pathToFile) + + for rawPath, rawFunc := range externalRef0.PathToRawSpec(path.Join(pathPrefix, "./api_types.yaml")) { + if _, ok := res[rawPath]; ok { + // it is not possible to compare functions in golang, so always overwrite the old value + } + res[rawPath] = rawFunc + } return res } diff --git a/api/golang/engine/kurtosis_engine_rest_api_bindings/engine_server.gen.go b/api/golang/http_rest/engine_rest_api/engine_server.gen.go similarity index 85% rename from api/golang/engine/kurtosis_engine_rest_api_bindings/engine_server.gen.go rename to api/golang/http_rest/engine_rest_api/engine_server.gen.go index 696e31e5c8..f10c17b9c2 100644 --- a/api/golang/engine/kurtosis_engine_rest_api_bindings/engine_server.gen.go +++ b/api/golang/http_rest/engine_rest_api/engine_server.gen.go @@ -1,7 +1,7 @@ -// Package kurtosis_engine_rest_api_bindings provides primitives to interact with the openapi HTTP API. +// Package engine_rest_api provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_engine_rest_api_bindings +package engine_rest_api import ( "bytes" @@ -17,9 +17,25 @@ import ( "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/getkin/kin-openapi/openapi3" + externalRef0 "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" "github.com/labstack/echo/v4" ) +// NotOk defines model for NotOk. +type NotOk = externalRef0.ResponseInfo + +// DeleteEnclavesParams defines parameters for DeleteEnclaves. +type DeleteEnclavesParams struct { + // RemoveAll If true, remove all enclaves. Default is false + RemoveAll *externalRef0.RemoveAll `form:"remove_all,omitempty" json:"remove_all,omitempty"` +} + +// PostEnclavesJSONRequestBody defines body for PostEnclaves for application/json ContentType. +type PostEnclavesJSONRequestBody = externalRef0.CreateEnclave + +// PostEnclavesEnclaveIdentifierStatusJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStatus for application/json ContentType. +type PostEnclavesEnclaveIdentifierStatusJSONRequestBody = externalRef0.EnclaveTargetStatus + // ServerInterface represents all server handlers. type ServerInterface interface { // Delete Enclaves @@ -36,16 +52,16 @@ type ServerInterface interface { GetEnclavesHistorical(ctx echo.Context) error // Destroy Enclave // (DELETE /enclaves/{enclave_identifier}) - DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // Get Enclave Info // (GET /enclaves/{enclave_identifier}) - GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // Get enclave status // (GET /enclaves/{enclave_identifier}/status) - GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // Set enclave status // (POST /enclaves/{enclave_identifier}/status) - PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error // Get Engine Info // (GET /engine/info) GetEngineInfo(ctx echo.Context) error @@ -105,7 +121,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesHistorical(ctx echo.Context) error { func (w *ServerInterfaceWrapper) DeleteEnclavesEnclaveIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -121,7 +137,7 @@ func (w *ServerInterfaceWrapper) DeleteEnclavesEnclaveIdentifier(ctx echo.Contex func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -137,7 +153,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifier(ctx echo.Context) func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -153,7 +169,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStatus(ctx echo.Con func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStatus(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -214,7 +230,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } -type NotOkJSONResponse ResponseInfo +type NotOkJSONResponse externalRef0.ResponseInfo type DeleteEnclavesRequestObject struct { Params DeleteEnclavesParams @@ -224,7 +240,7 @@ type DeleteEnclavesResponseObject interface { VisitDeleteEnclavesResponse(w http.ResponseWriter) error } -type DeleteEnclaves200JSONResponse DeletionSummary +type DeleteEnclaves200JSONResponse externalRef0.DeletionSummary func (response DeleteEnclaves200JSONResponse) VisitDeleteEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -234,7 +250,7 @@ func (response DeleteEnclaves200JSONResponse) VisitDeleteEnclavesResponse(w http } type DeleteEnclavesdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -252,7 +268,7 @@ type GetEnclavesResponseObject interface { VisitGetEnclavesResponse(w http.ResponseWriter) error } -type GetEnclaves200JSONResponse map[string]EnclaveInfo +type GetEnclaves200JSONResponse map[string]externalRef0.EnclaveInfo func (response GetEnclaves200JSONResponse) VisitGetEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -262,7 +278,7 @@ func (response GetEnclaves200JSONResponse) VisitGetEnclavesResponse(w http.Respo } type GetEnclavesdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -281,7 +297,7 @@ type PostEnclavesResponseObject interface { VisitPostEnclavesResponse(w http.ResponseWriter) error } -type PostEnclaves200JSONResponse EnclaveInfo +type PostEnclaves200JSONResponse externalRef0.EnclaveInfo func (response PostEnclaves200JSONResponse) VisitPostEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -291,7 +307,7 @@ func (response PostEnclaves200JSONResponse) VisitPostEnclavesResponse(w http.Res } type PostEnclavesdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -309,7 +325,7 @@ type GetEnclavesHistoricalResponseObject interface { VisitGetEnclavesHistoricalResponse(w http.ResponseWriter) error } -type GetEnclavesHistorical200JSONResponse []EnclaveIdentifiers +type GetEnclavesHistorical200JSONResponse []externalRef0.EnclaveIdentifiers func (response GetEnclavesHistorical200JSONResponse) VisitGetEnclavesHistoricalResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -319,7 +335,7 @@ func (response GetEnclavesHistorical200JSONResponse) VisitGetEnclavesHistoricalR } type GetEnclavesHistoricaldefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -331,7 +347,7 @@ func (response GetEnclavesHistoricaldefaultJSONResponse) VisitGetEnclavesHistori } type DeleteEnclavesEnclaveIdentifierRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type DeleteEnclavesEnclaveIdentifierResponseObject interface { @@ -347,7 +363,7 @@ func (response DeleteEnclavesEnclaveIdentifier200Response) VisitDeleteEnclavesEn } type DeleteEnclavesEnclaveIdentifierdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -359,14 +375,14 @@ func (response DeleteEnclavesEnclaveIdentifierdefaultJSONResponse) VisitDeleteEn } type GetEnclavesEnclaveIdentifierRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifier200JSONResponse EnclaveInfo +type GetEnclavesEnclaveIdentifier200JSONResponse externalRef0.EnclaveInfo func (response GetEnclavesEnclaveIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -376,7 +392,7 @@ func (response GetEnclavesEnclaveIdentifier200JSONResponse) VisitGetEnclavesEncl } type GetEnclavesEnclaveIdentifierdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -388,14 +404,14 @@ func (response GetEnclavesEnclaveIdentifierdefaultJSONResponse) VisitGetEnclaves } type GetEnclavesEnclaveIdentifierStatusRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierStatusResponseObject interface { VisitGetEnclavesEnclaveIdentifierStatusResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierStatus200JSONResponse EnclaveContainersStatus +type GetEnclavesEnclaveIdentifierStatus200JSONResponse externalRef0.EnclaveContainersStatus func (response GetEnclavesEnclaveIdentifierStatus200JSONResponse) VisitGetEnclavesEnclaveIdentifierStatusResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -405,7 +421,7 @@ func (response GetEnclavesEnclaveIdentifierStatus200JSONResponse) VisitGetEnclav } type GetEnclavesEnclaveIdentifierStatusdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -417,7 +433,7 @@ func (response GetEnclavesEnclaveIdentifierStatusdefaultJSONResponse) VisitGetEn } type PostEnclavesEnclaveIdentifierStatusRequestObject struct { - EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierStatusJSONRequestBody } @@ -434,7 +450,7 @@ func (response PostEnclavesEnclaveIdentifierStatus200Response) VisitPostEnclaves } type PostEnclavesEnclaveIdentifierStatusdefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -452,7 +468,7 @@ type GetEngineInfoResponseObject interface { VisitGetEngineInfoResponse(w http.ResponseWriter) error } -type GetEngineInfo200JSONResponse EngineInfo +type GetEngineInfo200JSONResponse externalRef0.EngineInfo func (response GetEngineInfo200JSONResponse) VisitGetEngineInfoResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -462,7 +478,7 @@ func (response GetEngineInfo200JSONResponse) VisitGetEngineInfoResponse(w http.R } type GetEngineInfodefaultJSONResponse struct { - Body ResponseInfo + Body externalRef0.ResponseInfo StatusCode int } @@ -618,7 +634,7 @@ func (sh *strictHandler) GetEnclavesHistorical(ctx echo.Context) error { } // DeleteEnclavesEnclaveIdentifier operation middleware -func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request DeleteEnclavesEnclaveIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -643,7 +659,7 @@ func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, encla } // GetEnclavesEnclaveIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -668,7 +684,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveI } // GetEnclavesEnclaveIdentifierStatus operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierStatusRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -693,7 +709,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, en } // PostEnclavesEnclaveIdentifierStatus operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierStatusRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -749,27 +765,24 @@ func (sh *strictHandler) GetEngineInfo(ctx echo.Context) error { // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/9RYXW/qOBP+K9G872W2sOfccddt2R4uCghS7a6qKnLjAXw2sVPbqRZV/PeVE+eLOJDu", - "aZHOHeDxfDzzzHiGN4hEkgqOXCuYvEFKJElQo8y/IY9i8ooho8g12zCU5leKKpIs1UxwmMDDw+zW99RO", - "SI0cqVd8F9LjJEFPbDy9Q88qAh+YuZMSvQMfjARMXFZ8kPiSMYkUJlpm6IOKdpgQY17vU3NLacn4Fg4H", - "I5uIVwxJHHfdm228XIFXCHkkjktv1JV3ixuSxdpjytuQWFUOvmQo97WHDQMOT56FiJFwOBS+qFRwhTl+", - "c6EXf5sPkeAauTYfSZrGLCLGvdF3ZXx8a6j8v8QNTOB/ozoto+JUjVZW9YxvRGHsKBMc/0kx0kg9lFLI", - "HBt72ei+TtmN4JowjnKtic5sjrMEJo+wepjPZ/M78GEdLJbL6S34MF/Mw+mfs3UwnQfw5B9D78ONRKJx", - "arNr+CNFilKzIn6SsjAqTYax2IYxvmLsyKJ/JPuKUjHBQ022TumSM0WCHAKJoHgOUOv3vRE1WFkl4vk7", - "RtooucUYDbjrLEmI3HcDLIhBw6Y7IeE0zDJGcwmmMVEDHZmTBK85fcgYhdodIiXZu/2z966Xsyqx34TS", - "9yTaMV7wpOPyVqZRmAqpQ8HDnVA6TArxBoyMa9yiNCZYekKuVYNlvT667vgn7D4Ni8wdzrNkdIshS0NC", - "qUSlnGyoicWoU6D2jnHFKJYZ7QWlV6wHk5YHLg0nfPAdUZ4ArUJMDavy6f0y+MtZ3lbhrGrMqpuAkvqG", - "8U5oe0u0ejP67h5B2LJk9Xa0nMDFTaB232kSM2T2woDSPVWCneb2H/W6lakqx6fUOXp/syzUQDV9DDO6", - "zFOQt2yWnO28AUtQaZKkzV7ey6B39/JLk86FZE+ejoGy0Z2g7b2NvizhYLoOwIflanH7cBPMFvNTpdt8", - "UjrU7wVpGDQWi3NlFxC5Rd1tRaYB9bi+7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"P2nkhNd1K2yztcpRk6iS5bmIbJ5cSNRRqjZRii+YeiAP9mxfUBuhZER847VuGlyh6THIVIKHqq/zvrWm", + "trDaifr2HWOyTq4wRYvEqsgyrnfjAqsuJlE/nYjLJCoKkTgLQZiZIxO54xleyuShEAl06XCt+c6fX33u", + "UwObWRGnouZZkcH8Eb4+3N0t7m4ggNX9l+Xy+goCuL5d3v8DT8EYtdrhoqWNGdfc1GpL9EI/2ZOW0VNn", + "yz5JH4eRar8jL0/TuLipPjCUW2Uoyni8FRIjUR84oleXy0UL+2dl6LZyURFpf5p/0q/fmWl7/CN3l7lo", + "/dRTUQbQejFHupmaMOvLct9xVGQHqXYvMjTEs7xP3skJejN5zz10PiQn+rQPVF3dD8b2nusN0pjKlsAT", + "rN00o+dhq33X7NNjyh/Y+9IcXBqjgHHdu7XSGSeYQyEkffwArSMhCTeoXZ/RGL7x9616cNz1dW9t9ytx", + "DroYQZXZuCB7riEoCUrtuwpRdrlcQAAtdjC7+OtiZpNTOUqeC5jDx4vZxQwCpz9c/WEjBSrhkCK5MixE", + "bgoWCcyri6W5N4073omkR3/RnUnYEw/l055A+DCbvZs82L//PAphVcQxGrMuUtakAc7IqaCpAG3GYaVn", + "nKxoLtkaHdbCUwawQRqjeIPUg/CXUOBJIuwrni4H03zEBmq2tGesTg/VDdIAp1wZD1BLZYZIPRdo6G+V", + "7N5tVIZKsByS0crl8oRzOujEeYCv6mVdwUHH/HArDCktYu6k7qHZ/dxZ/yJGbxGbfY03FptnG96u+N4c", + "D8B8HX/Mlcfv1lG1b162nm/JqaV7jtVoSKtdN3eHV+NZEfhd6dzbo6yOe2gGw05Bv7kFq0Yb/haNGKv/", + "8zWlLpmZ9rvj8BV3crjf//r0Sf/jL9HTt2LlaUXFECuUw0Y/TxOh/UI56bi2Uc66Nty3QhO2/D8AAP//", + "ZD3EVgAVAAA=", } // GetSwagger returns the content of the embedded swagger specification file @@ -809,6 +822,14 @@ func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { res[pathToFile] = rawSpec } + pathPrefix := path.Dir(pathToFile) + + for rawPath, rawFunc := range externalRef0.PathToRawSpec(path.Join(pathPrefix, "./api_types.yaml")) { + if _, ok := res[rawPath]; ok { + // it is not possible to compare functions in golang, so always overwrite the old value + } + res[rawPath] = rawFunc + } return res } diff --git a/api/golang/websocket/kurtosis_websocket_api_bindings/websocket_server.gen.go b/api/golang/http_rest/websocket_api/websocket_server.gen.go similarity index 68% rename from api/golang/websocket/kurtosis_websocket_api_bindings/websocket_server.gen.go rename to api/golang/http_rest/websocket_api/websocket_server.gen.go index 12d2fe8446..a488333d55 100644 --- a/api/golang/websocket/kurtosis_websocket_api_bindings/websocket_server.gen.go +++ b/api/golang/http_rest/websocket_api/websocket_server.gen.go @@ -1,7 +1,7 @@ -// Package kurtosis_websocket_api_bindings provides primitives to interact with the openapi HTTP API. +// Package websocket_api provides primitives to interact with the openapi HTTP API. // // Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_websocket_api_bindings +package websocket_api import ( "bytes" @@ -15,17 +15,35 @@ import ( "github.com/deepmap/oapi-codegen/pkg/runtime" "github.com/getkin/kin-openapi/openapi3" + externalRef0 "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" "github.com/labstack/echo/v4" ) +// GetEnclavesEnclaveIdentifierLogsParams defines parameters for GetEnclavesEnclaveIdentifierLogs. +type GetEnclavesEnclaveIdentifierLogsParams struct { + ServiceUuidSet externalRef0.ServiceUuidSet `form:"service_uuid_set" json:"service_uuid_set"` + FollowLogs *externalRef0.FollowLogs `form:"follow_logs,omitempty" json:"follow_logs,omitempty"` + ConjunctiveFilters *externalRef0.ConjunctiveFilters `form:"conjunctive_filters,omitempty" json:"conjunctive_filters,omitempty"` + ReturnAllLogs *externalRef0.ReturnAllLogs `form:"return_all_logs,omitempty" json:"return_all_logs,omitempty"` + NumLogLines *externalRef0.NumLogLines `form:"num_log_lines,omitempty" json:"num_log_lines,omitempty"` +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams defines parameters for GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs. +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams struct { + FollowLogs *externalRef0.FollowLogs `form:"follow_logs,omitempty" json:"follow_logs,omitempty"` + ConjunctiveFilters *externalRef0.ConjunctiveFilters `form:"conjunctive_filters,omitempty" json:"conjunctive_filters,omitempty"` + ReturnAllLogs *externalRef0.ReturnAllLogs `form:"return_all_logs,omitempty" json:"return_all_logs,omitempty"` + NumLogLines *externalRef0.NumLogLines `form:"num_log_lines,omitempty" json:"num_log_lines,omitempty"` +} + // ServerInterface represents all server handlers. type ServerInterface interface { // Get Service Logs // (GET /enclaves/{enclave_identifier}/logs) - GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierLogsParams) error + GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierLogsParams) error // Get Service Logs - // (GET /enclaves/{enclave_identifier}/services/{service_uuid}/logs) - GetEnclavesEnclaveIdentifierServicesServiceUuidLogs(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceUuid ServiceUuid, params GetEnclavesEnclaveIdentifierServicesServiceUuidLogsParams) error + // (GET /enclaves/{enclave_identifier}/services/{service_identifier}/logs) + GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error } // ServerInterfaceWrapper converts echo contexts to parameters. @@ -37,7 +55,7 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -86,27 +104,27 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierLogs(ctx echo.Conte return err } -// GetEnclavesEnclaveIdentifierServicesServiceUuidLogs converts echo context to params. -func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceUuidLogs(ctx echo.Context) error { +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs converts echo context to params. +func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier EnclaveIdentifier + var enclaveIdentifier externalRef0.EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter enclave_identifier: %s", err)) } - // ------------- Path parameter "service_uuid" ------------- - var serviceUuid ServiceUuid + // ------------- Path parameter "service_identifier" ------------- + var serviceIdentifier externalRef0.ServiceIdentifier - err = runtime.BindStyledParameterWithLocation("simple", false, "service_uuid", runtime.ParamLocationPath, ctx.Param("service_uuid"), &serviceUuid) + err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { - return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter service_uuid: %s", err)) + return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("Invalid format for parameter service_identifier: %s", err)) } // Parameter object where we will unmarshal all parameters from the context - var params GetEnclavesEnclaveIdentifierServicesServiceUuidLogsParams + var params GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams // ------------- Optional query parameter "follow_logs" ------------- err = runtime.BindQueryParameter("form", true, false, "follow_logs", ctx.QueryParams(), ¶ms.FollowLogs) @@ -136,7 +154,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceUuid } // Invoke the callback with all the unmarshalled arguments - err = w.Handler.GetEnclavesEnclaveIdentifierServicesServiceUuidLogs(ctx, enclaveIdentifier, serviceUuid, params) + err = w.Handler.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx, enclaveIdentifier, serviceIdentifier, params) return err } @@ -169,26 +187,24 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } router.GET(baseURL+"/enclaves/:enclave_identifier/logs", wrapper.GetEnclavesEnclaveIdentifierLogs) - router.GET(baseURL+"/enclaves/:enclave_identifier/services/:service_uuid/logs", wrapper.GetEnclavesEnclaveIdentifierServicesServiceUuidLogs) + router.GET(baseURL+"/enclaves/:enclave_identifier/services/:service_identifier/logs", wrapper.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs) } // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xWUW+jOBD+K2juHrmQu3vjrWpzvUjZptqm2kpVhRwYEnfBpvaQ3Sjiv69sQwIJTVjt", - "Q1/2iWBmvvlm5ptxdhDLvJACBWkId1AwxXIkVPYtluK1FDHxDUYpz5pjLiCEtxLVFnwQLEcIe0190PEa", - "c2Z9CHPr/KfCFEL4IzgEDpyZDmZyNeMC/7P+UPlA28KAM6XYFqrKBxRxxjYY8QQF8ZSjMpgJ6ljxgrg0", - "zB4fpze+p9dSEQpMPPculWeoejL1aI1eDQS+y6ZgtD4k0xPFB4VvJVeYQEiqxHZuNUtNiouVpZnKLJPf", - "okyu3i1Y26QHbCllhkxYNFHmxi7KuMB38bpGPYhcEK5MWSuTC5VKRCzLznI8NrvAU6Pa8BijsuTJHrJb", - "2Y7Jz9W07RpppPdIn9idC7OX5VG8E+lVjZe1roVqJ0bJAhVx15msPh2K6wPxHDWxvLg0HIu9oetgk9Kz", - "C9pGetmHkctXjMnE6c7WCXHzm5FUA0d03pibDPA7RQUjQiX6W9cmuw905HiG87zFDUWZG5ib+eQhup7f", - "La6md9Fi8rQA353dzRe9583Zp6vF9f/R58nt5KnPpf35QOnQvgenrlk9Nd0iCklRKkthdNcj1sGaaLzN", - "0EXLbXQ8WCxJuFl2LLvvxB/QuFa4ps5VT+UXbVWmUuWMIISEEf5lZAYnlTEoXKTS5scpM9++4FLL+CuS", - "d3U/BR82qLRb0ePR36OxiSMLFKzgEMK/o/FoDL7dFzaZoN7COtid7uMqaPbWyhXXyYpLMU0ghFukSe1d", - "P6d715nbZO2b7rm/dAeToOdGqPyLXicqGODTvhcGmPfduwPcjjf7AJfuBVO9mLHWhRTaae+f8bj+y0Ao", - "bEtYUWQ8tk0JXrW0u+Gwec9ptT1kVlndC/6hjGPUOi0zr6Hgbogyz5nauv57NYhXo/iXBFU3Swe7dtt+", - "QWg1AV0/H0uefJD2fuvu43RXVT8CAAD//zaixr1kCwAA", + "H4sIAAAAAAAC/+xVTYvbMBD9K0Lt0cRpe/Ot0A8COSxslx5KMYo8TrSVR15plDYE//ciWdk4iTfrpZRe", + "ejJ2Zt68mfdmsufSNK1BQHK82PNWWNEAgY1v0uC9R0lqC2Wt9OGzQl7wBw92xzOOogFejIZm3MkNNCLm", + "EDQx+bWFmhf8VX4snPdhLl+a9VIhfIr5vMs47doALqwVO951GQeUWmyhVBUgqVqBDZgVOGlVS8oEZnd3", + "iw8ZcxtjCRAq1r8bywJVZmpGG2AJiGd9N62gzbGZkSoZt/DglYWKF2Q9DHtLLB1ZhetIszZam5+lNusn", + "BzYMGQFbGaNBYERD34S4UiuEJ/FOg0YQFRKsw1i70At5i6XQ+irH87BneDqwWyWvi/NlAyzFsWPcQRVp", + "kIRCsIw2gtKnphFYBT29rtgKGPwC6QkqpnBcvhEeL5PvAOC9qkoH9NR8LuKulXncgLN6Fy7vDlkx+rav", + "sUwytda0YEn1RkBDZW08huojlCdWPDYcVC5XuxO0ACCqSgUBhb45qT9hmQflzOoeJMUJn3/pgpC1iWQV", + "6fDbV1g5I38Asfc3C57xLVjXe2g+ezObB1zTAopW8YK/m81nc55FI0Rmedphl+8vt7nLD65f95MKPYnQ", + "4KLiBf8M9DFlp+fiMXXZ78HwTn4bn8MxJB+5J132bNaFpBNyhldlQvjY1Z6Qdn4XJqScnqfue9gU1xp0", + "vZHezufpD4cAoySibbWSUZT83gXd94Nluma84cZEZ51eoFsvJThXe80OFPql900j7K7XnyUQllCy5wyV", + "xHL5/vL6/IHdEg2Xnv/Uhy/L+u/Ev+PErvsdAAD//xARwii0CQAA", } // GetSwagger returns the content of the embedded swagger specification file @@ -228,6 +244,14 @@ func PathToRawSpec(pathToFile string) map[string]func() ([]byte, error) { res[pathToFile] = rawSpec } + pathPrefix := path.Dir(pathToFile) + + for rawPath, rawFunc := range externalRef0.PathToRawSpec(path.Join(pathPrefix, "./api_types.yaml")) { + if _, ok := res[rawPath]; ok { + // it is not possible to compare functions in golang, so always overwrite the old value + } + res[rawPath] = rawFunc + } return res } diff --git a/api/golang/websocket/kurtosis_websocket_api_bindings/websocket_types.gen.go b/api/golang/websocket/kurtosis_websocket_api_bindings/websocket_types.gen.go deleted file mode 100644 index 1fe2468af6..0000000000 --- a/api/golang/websocket/kurtosis_websocket_api_bindings/websocket_types.gen.go +++ /dev/null @@ -1,78 +0,0 @@ -// Package kurtosis_websocket_api_bindings provides primitives to interact with the openapi HTTP API. -// -// Code generated by github.com/deepmap/oapi-codegen version (devel) DO NOT EDIT. -package kurtosis_websocket_api_bindings - -import ( - "time" -) - -// Defines values for LogLineOperator. -const ( - DOESCONTAINMATCHREGEX LogLineOperator = "DOES_CONTAIN_MATCH_REGEX" - DOESCONTAINTEXT LogLineOperator = "DOES_CONTAIN_TEXT" - DOESNOTCONTAINMATCHREGEX LogLineOperator = "DOES_NOT_CONTAIN_MATCH_REGEX" - DOESNOTCONTAINTEXT LogLineOperator = "DOES_NOT_CONTAIN_TEXT" -) - -// LogLine defines model for LogLine. -type LogLine struct { - Line []string `json:"line"` - Timestamp Timestamp `json:"timestamp"` -} - -// LogLineFilter defines model for LogLineFilter. -type LogLineFilter struct { - Operator LogLineOperator `json:"operator"` - TextPattern string `json:"text_pattern"` -} - -// LogLineOperator defines model for LogLineOperator. -type LogLineOperator string - -// ServiceLogs defines model for ServiceLogs. -type ServiceLogs struct { - NotFoundServiceUuidSet *[]string `json:"not_found_service_uuid_set,omitempty"` - ServiceLogsByServiceUuid *map[string]LogLine `json:"service_logs_by_service_uuid,omitempty"` -} - -// Timestamp defines model for Timestamp. -type Timestamp = time.Time - -// ConjunctiveFilters defines model for conjunctive_filters. -type ConjunctiveFilters = []LogLineFilter - -// EnclaveIdentifier defines model for enclave_identifier. -type EnclaveIdentifier = string - -// FollowLogs defines model for follow_logs. -type FollowLogs = bool - -// NumLogLines defines model for num_log_lines. -type NumLogLines = int - -// ReturnAllLogs defines model for return_all_logs. -type ReturnAllLogs = bool - -// ServiceUuid defines model for service_uuid. -type ServiceUuid = string - -// ServiceUuidSet defines model for service_uuid_set. -type ServiceUuidSet = []string - -// GetEnclavesEnclaveIdentifierLogsParams defines parameters for GetEnclavesEnclaveIdentifierLogs. -type GetEnclavesEnclaveIdentifierLogsParams struct { - ServiceUuidSet ServiceUuidSet `form:"service_uuid_set" json:"service_uuid_set"` - FollowLogs *FollowLogs `form:"follow_logs,omitempty" json:"follow_logs,omitempty"` - ConjunctiveFilters *ConjunctiveFilters `form:"conjunctive_filters,omitempty" json:"conjunctive_filters,omitempty"` - ReturnAllLogs *ReturnAllLogs `form:"return_all_logs,omitempty" json:"return_all_logs,omitempty"` - NumLogLines *NumLogLines `form:"num_log_lines,omitempty" json:"num_log_lines,omitempty"` -} - -// GetEnclavesEnclaveIdentifierServicesServiceUuidLogsParams defines parameters for GetEnclavesEnclaveIdentifierServicesServiceUuidLogs. -type GetEnclavesEnclaveIdentifierServicesServiceUuidLogsParams struct { - FollowLogs *FollowLogs `form:"follow_logs,omitempty" json:"follow_logs,omitempty"` - ConjunctiveFilters *ConjunctiveFilters `form:"conjunctive_filters,omitempty" json:"conjunctive_filters,omitempty"` - ReturnAllLogs *ReturnAllLogs `form:"return_all_logs,omitempty" json:"return_all_logs,omitempty"` - NumLogLines *NumLogLines `form:"num_log_lines,omitempty" json:"num_log_lines,omitempty"` -} diff --git a/api/openapi/core/server.cfg.yaml b/api/openapi/core/server.cfg.yaml deleted file mode 100644 index a7f63cab68..0000000000 --- a/api/openapi/core/server.cfg.yaml +++ /dev/null @@ -1,6 +0,0 @@ -package: kurtosis_core_rest_api_bindings -generate: - embedded-spec: true - echo-server: true - strict-server: true -output: api/golang/core/kurtosis_core_rest_api_bindings/api_container_server.gen.go \ No newline at end of file diff --git a/api/openapi/core/types.cfg.yaml b/api/openapi/core/types.cfg.yaml deleted file mode 100644 index bd0c20d926..0000000000 --- a/api/openapi/core/types.cfg.yaml +++ /dev/null @@ -1,4 +0,0 @@ -package: kurtosis_core_rest_api_bindings -generate: - models: true -output: api/golang/core/kurtosis_core_rest_api_bindings/api_container_types.gen.go \ No newline at end of file diff --git a/api/openapi/engine/engine_service.yaml b/api/openapi/engine/engine_service.yaml deleted file mode 100644 index 96d8c586c4..0000000000 --- a/api/openapi/engine/engine_service.yaml +++ /dev/null @@ -1,337 +0,0 @@ -openapi: 3.0.0 - -info: - title: Engine API - version: 0.1.0 - -paths: - /engine/info: - get: - summary: Get Engine Info - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/EngineInfo' - - /enclaves: - get: - summary: Get Enclaves - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - type: object - additionalProperties: - $ref: '#/components/schemas/EnclaveInfo' - - post: - summary: Create Enclave - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/CreateEnclave' - responses: - - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/EnclaveInfo' - - delete: - summary: Delete Enclaves - parameters: - - $ref: '#/components/parameters/remove_all' - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/DeletionSummary' - - /enclaves/historical: - get: - summary: Get Historical Enclaves - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - type: array - items: - $ref: '#/components/schemas/EnclaveIdentifiers' - - /enclaves/{enclave_identifier}: - get: - summary: Get Enclave Info - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/EnclaveInfo' - - delete: - summary: Destroy Enclave - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - - /enclaves/{enclave_identifier}/status: - get: - summary: Get enclave status - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - content: - application/json: - schema: - $ref: '#/components/schemas/EnclaveContainersStatus' - post: - summary: Set enclave status - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - required: true - content: - application/json: - schema: - $ref: '#/components/schemas/EnclaveTargetStatus' - responses: - default: - $ref: '#/components/responses/NotOk' - '200': - description: Successful response - -# ========================================================================================================================= -# ========================================================================================================================= -# > > > > > > > > > > > > > > > > > > > > > > > > Data Models < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < -# ========================================================================================================================= -# ========================================================================================================================= - -components: - - responses: - - NotOk: - description: Unexpected error - content: - application/json: - schema: - $ref: '#/components/schemas/ResponseInfo' - required: true - - parameters: - - enclave_identifier: - name: enclave_identifier - in: path - required: true - description: UUID, shortened UUID, or name of the enclave - schema: - type: string - - remove_all: - name: remove_all - in: query - required: false - description: If true, remove all enclaves. Default is false - schema: - type: boolean - - schemas: - - ResponseType: - type: string - enum: - - ERROR - - INFO - - WARNING - - ResponseInfo: - type: object - properties: - type: - $ref: '#/components/schemas/ResponseType' - message: - type: string - code: - type: integer - format: uint32 - required: - - type - - message - - code - - EngineInfo: - type: object - properties: - engine_version: - type: string - required: - - engine_version - - CreateEnclave: - type: object - properties: - enclave_name: - type: string - api_container_version_tag: - type: string - api_container_log_level: - type: string - mode: - $ref: '#/components/schemas/EnclaveMode' - - EnclaveMode: - type: string - enum: - - TEST - - PRODUCTION - - EnclaveContainersStatus: - type: string - enum: - - RUNNING - - STOPPED - - EMPTY - - EnclaveTargetStatus: - type: string - enum: - - STOP - - ApiContainerStatus: - type: string - enum: - - RUNNING - - STOPPED - - NON_EXISTENT - - EnclaveInfo: - type: object - properties: - enclave_uuid: - type: string - name: - type: string - shortened_uuid: - type: string - containers_status: - $ref: '#/components/schemas/EnclaveContainersStatus' - api_container_status: - $ref: '#/components/schemas/ApiContainerStatus' - api_container_info: - $ref: '#/components/schemas/EnclaveAPIContainerInfo' - api_container_host_machine_info: - $ref: '#/components/schemas/EnclaveAPIContainerHostMachineInfo' - creation_time: - $ref: '#/components/schemas/Timestamp' - mode: - $ref: '#/components/schemas/EnclaveMode' - required: - - enclave_uuid - - name - - shortened_uuid - - containers_status - - api_container_status - - creation_time - - mode - - EnclaveAPIContainerInfo: - type: object - properties: - container_id: - type: string - ip_inside_enclave: - type: string - grpc_port_inside_enclave: - type: integer - bridge_ip_address: - type: string - required: - - container_id - - ip_inside_enclave - - grpc_port_inside_enclave - - bridge_ip_address - - EnclaveAPIContainerHostMachineInfo: - type: object - properties: - ip_on_host_machine: - type: string - grpc_port_on_host_machine: - type: integer - required: - - ip_on_host_machine - - grpc_port_on_host_machine - - EnclaveIdentifiers: - type: object - properties: - enclave_uuid: - type: string - name: - type: string - shortened_uuid: - type: string - required: - - enclave_uuid - - name - - shortened_uuid - - EnclaveNameAndUuid: - type: object - properties: - name: - type: string - uuid: - type: string - required: - - name - - uuid - - DeletionSummary: - type: object - properties: - removed_enclave_name_and_uuids: - type: array - items: - $ref: '#/components/schemas/EnclaveNameAndUuid' - - Timestamp: - type: string - format: date-time \ No newline at end of file diff --git a/api/openapi/engine/server.cfg.yaml b/api/openapi/engine/server.cfg.yaml deleted file mode 100644 index 96a9e3afba..0000000000 --- a/api/openapi/engine/server.cfg.yaml +++ /dev/null @@ -1,6 +0,0 @@ -package: kurtosis_engine_rest_api_bindings -generate: - embedded-spec: true - echo-server: true - strict-server: true -output: api/golang/engine/kurtosis_engine_rest_api_bindings/engine_server.gen.go \ No newline at end of file diff --git a/api/openapi/engine/types.cfg.yaml b/api/openapi/engine/types.cfg.yaml deleted file mode 100644 index 9e4f8fc94c..0000000000 --- a/api/openapi/engine/types.cfg.yaml +++ /dev/null @@ -1,4 +0,0 @@ -package: kurtosis_engine_rest_api_bindings -generate: - models: true -output: api/golang/engine/kurtosis_engine_rest_api_bindings/engine_types.gen.go \ No newline at end of file diff --git a/api/openapi/generators/api_types.cfg.yaml b/api/openapi/generators/api_types.cfg.yaml new file mode 100644 index 0000000000..356a925593 --- /dev/null +++ b/api/openapi/generators/api_types.cfg.yaml @@ -0,0 +1,7 @@ +package: api_types +generate: + models: true + embedded-spec: true +output: api/golang/http_rest/api_types/api_types.gen.go +output-options: + skip-prune: true \ No newline at end of file diff --git a/api/openapi/generators/core_server.cfg.yaml b/api/openapi/generators/core_server.cfg.yaml new file mode 100644 index 0000000000..5a6004103f --- /dev/null +++ b/api/openapi/generators/core_server.cfg.yaml @@ -0,0 +1,9 @@ +package: core_rest_api +generate: + embedded-spec: true + echo-server: true + strict-server: true + models: true +import-mapping: + ./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types +output: api/golang/http_rest/core_rest_api/api_container_server.gen.go \ No newline at end of file diff --git a/api/openapi/generators/engine_server.cfg.yaml b/api/openapi/generators/engine_server.cfg.yaml new file mode 100644 index 0000000000..911a2f5467 --- /dev/null +++ b/api/openapi/generators/engine_server.cfg.yaml @@ -0,0 +1,9 @@ +package: engine_rest_api +generate: + embedded-spec: true + echo-server: true + strict-server: true + models: true +import-mapping: + ./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types +output: api/golang/http_rest/engine_rest_api/engine_server.gen.go \ No newline at end of file diff --git a/api/openapi/generators/websocket_server.cfg.yaml b/api/openapi/generators/websocket_server.cfg.yaml new file mode 100644 index 0000000000..cba2dd4142 --- /dev/null +++ b/api/openapi/generators/websocket_server.cfg.yaml @@ -0,0 +1,9 @@ +package: websocket_api +generate: + embedded-spec: true + echo-server: true + strict-server: false + models: true +import-mapping: + ./api_types.yaml: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types +output: api/golang/http_rest/websocket_api/websocket_server.gen.go \ No newline at end of file diff --git a/api/openapi/scripts/build.sh b/api/openapi/scripts/build.sh index 75edfbaafa..1e3ae859b9 100755 --- a/api/openapi/scripts/build.sh +++ b/api/openapi/scripts/build.sh @@ -6,11 +6,9 @@ script_dirpath="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" api_root_dirpath="$(dirname "${script_dirpath}")" echo "Generating data models for REST API " -oapi-codegen --config="$api_root_dirpath/engine/types.cfg.yaml" "$api_root_dirpath/engine/engine_service.yaml" -oapi-codegen --config="$api_root_dirpath/core/types.cfg.yaml" "$api_root_dirpath/core/core_service.yaml" -oapi-codegen --config="$api_root_dirpath/websocket/types.cfg.yaml" "$api_root_dirpath/websocket/websocket_service.yaml" +oapi-codegen --config="$api_root_dirpath/generators/api_types.cfg.yaml" "$api_root_dirpath/specs/api_types.yaml" echo "Generating server code for REST API " -oapi-codegen --config="$api_root_dirpath/engine/server.cfg.yaml" "$api_root_dirpath/engine/engine_service.yaml" -oapi-codegen --config="$api_root_dirpath/core/server.cfg.yaml" "$api_root_dirpath/core/core_service.yaml" -oapi-codegen --config="$api_root_dirpath/websocket/server.cfg.yaml" "$api_root_dirpath/websocket/websocket_service.yaml" \ No newline at end of file +oapi-codegen --config="$api_root_dirpath/generators/engine_server.cfg.yaml" "$api_root_dirpath/specs/engine_service.yaml" +oapi-codegen --config="$api_root_dirpath/generators/core_server.cfg.yaml" "$api_root_dirpath/specs/core_service.yaml" +oapi-codegen --config="$api_root_dirpath/generators/websocket_server.cfg.yaml" "$api_root_dirpath/specs/websocket_service.yaml" \ No newline at end of file diff --git a/api/openapi/core/core_service.yaml b/api/openapi/specs/api_types.yaml similarity index 63% rename from api/openapi/core/core_service.yaml rename to api/openapi/specs/api_types.yaml index 13a2fc7d18..0ed532b06a 100644 --- a/api/openapi/core/core_service.yaml +++ b/api/openapi/specs/api_types.yaml @@ -1,322 +1,10 @@ openapi: 3.0.0 info: - title: Enclave API - description: API to manipulate the enclaves + title: API Types version: 0.1.0 -paths: - - /enclaves/{enclave_identifier}/starlark: - get: - description: Get last Starlark run - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - $ref: "#/components/schemas/StarlarkDescription" - - /enclaves/{enclave_identifier}/starlark/packages: - post: - description: Uploads a Starlark package. This step is required before the package can be executed with RunStarlarkPackage - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - $ref: "#/components/requestBodies/fileUploadBody" - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Success - - /enclaves/{enclave_identifier}/starlark/packages/{package_id}: - post: - description: Executes a Starlark script on the user's behalf - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/package_id' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/RunStarlarkPackage" - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/octet-stream: - schema: - type: string - format: binary - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/StarlarkRunResponseLine" - - /enclaves/{enclave_identifier}/starlark/scripts: - post: - description: Executes a Starlark script on the user's behalf - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/RunStarlarkScript" - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/octet-stream: - schema: - type: string - format: binary - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/StarlarkRunResponseLine" - - /enclaves/{enclave_identifier}/services/{service_identifier}: - get: - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/service_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - $ref: "#/components/schemas/ServiceInfo" - - /enclaves/{enclave_identifier}/services/history: - get: - description: Returns information about all existing & historical services - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/ServiceIdentifiers" - - /enclaves/{enclave_identifier}/services: - get: - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - in: query - name: services - schema: - type: array - items: - type: string - description: Select services to get information - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: object - additionalProperties: - $ref: "#/components/schemas/ServiceInfo" - - /enclaves/{enclave_identifier}/services/{service_identifier}/command: - post: - description: Executes the given command inside a running container - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/service_identifier' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/ExecCommand" - description: Exec Command - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - $ref: "#/components/schemas/ExecCommandResult" - - /enclaves/{enclave_identifier}/services/{service_identifier}/endpoints/{port_number}/availability: - get: - description: Block until the given HTTP endpoint returns available, calling it through a HTTP request - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/service_identifier' - - $ref: '#/components/parameters/port_number' - - $ref: '#/components/parameters/http_method' - - $ref: '#/components/parameters/path' - - $ref: '#/components/parameters/initial_delay_milliseconds' - - $ref: '#/components/parameters/retries' - - $ref: '#/components/parameters/retries_delay_milliseconds' - - $ref: '#/components/parameters/expected_response' - - $ref: '#/components/parameters/request_body' - responses: - "200": - description: Success - - /enclaves/{enclave_identifier}/artifacts: - get: - description: List all files artifacts - parameters: - - $ref: '#/components/parameters/enclave_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/FileArtifactReference" - - /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}: - get: - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/artifact_identifier' - description: Inspect the content of a file artifact - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: array - items: - $ref: "#/components/schemas/FileArtifactDescription" - - /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download: - get: - description: Downloads a files artifact from the Kurtosis File System - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/artifact_identifier' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/octet-stream: - schema: - type: string - format: binary - - /enclaves/{enclave_identifier}/artifacts/local-file: - post: - description: Uploads a files artifact to the Kurtosis File System - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - $ref: "#/components/requestBodies/fileUploadBody" - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: object - additionalProperties: - $ref: "#/components/schemas/FileArtifactReference" - - /enclaves/{enclave_identifier}/artifacts/remote-file: - post: - description: Tells the API container to download a files artifact from the web to the Kurtosis File System - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/StoreWebFilesArtifact" - description: Store Web Files Artifact - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - $ref: "#/components/schemas/FileArtifactReference" - - /enclaves/{enclave_identifier}/artifacts/services/{service_identifier}: - post: - description: Tells the API container to copy a files artifact from a service to the Kurtosis File System - parameters: - - $ref: '#/components/parameters/enclave_identifier' - - $ref: '#/components/parameters/service_identifier' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/StoreFilesArtifactFromService" - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - $ref: "#/components/schemas/FileArtifactReference" - - /enclaves/{enclave_identifier}/services/connection: - post: - description: User services port forwarding - parameters: - - $ref: '#/components/parameters/enclave_identifier' - requestBody: - content: - application/json: - schema: - $ref: "#/components/schemas/Connect" - required: true - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request +paths: {} # Specs for types only # ========================================================================================================================= # ========================================================================================================================= @@ -326,26 +14,25 @@ paths: components: - responses: + requestBodies: - NotOk: - description: Unexpected error + fileUploadBody: content: - application/json: + multipart/form-data: schema: - $ref: '#/components/schemas/ResponseInfo' - required: true + type: string + format: binary parameters: enclave_identifier: - in: path name: enclave_identifier + in: path + required: true + description: UUID, shortened UUID, or name of the enclave schema: type: string - description: The package identifier that will be executed - required: true - + service_identifier: in: path name: service_identifier @@ -353,7 +40,24 @@ components: type: string description: The service identifier of the container that the command should be executed in required: true + + service_uuid_set: + name: service_uuid_set + in: query + required: true + schema: + type: array + items: + type: string + remove_all: + name: remove_all + in: query + required: false + description: If true, remove all enclaves. Default is false + schema: + type: boolean + port_number: in: path name: port_number @@ -431,14 +135,35 @@ components: description: The package identifier that will be executed required: true - requestBodies: + follow_logs: + name: follow_logs + in: query + required: false + schema: + type: boolean - fileUploadBody: - content: - multipart/form-data: - schema: - type: string - format: binary + conjunctive_filters: + name: conjunctive_filters + in: query + required: false + schema: + type: array + items: + $ref: "#/components/schemas/LogLineFilter" + + return_all_logs: + name: return_all_logs + in: query + required: false + schema: + type: boolean + + num_log_lines: + name: num_log_lines + in: query + required: false + schema: + type: integer schemas: @@ -464,6 +189,146 @@ components: - message - code + EngineInfo: + type: object + properties: + engine_version: + type: string + required: + - engine_version + + CreateEnclave: + type: object + properties: + enclave_name: + type: string + api_container_version_tag: + type: string + api_container_log_level: + type: string + mode: + $ref: '#/components/schemas/EnclaveMode' + + EnclaveMode: + type: string + enum: + - TEST + - PRODUCTION + + EnclaveContainersStatus: + type: string + enum: + - RUNNING + - STOPPED + - EMPTY + + EnclaveTargetStatus: + type: string + enum: + - STOP + + ApiContainerStatus: + type: string + enum: + - RUNNING + - STOPPED + - NON_EXISTENT + + EnclaveInfo: + type: object + properties: + enclave_uuid: + type: string + name: + type: string + shortened_uuid: + type: string + containers_status: + $ref: '#/components/schemas/EnclaveContainersStatus' + api_container_status: + $ref: '#/components/schemas/ApiContainerStatus' + api_container_info: + $ref: '#/components/schemas/EnclaveAPIContainerInfo' + api_container_host_machine_info: + $ref: '#/components/schemas/EnclaveAPIContainerHostMachineInfo' + creation_time: + $ref: '#/components/schemas/Timestamp' + mode: + $ref: '#/components/schemas/EnclaveMode' + required: + - enclave_uuid + - name + - shortened_uuid + - containers_status + - api_container_status + - creation_time + - mode + + EnclaveAPIContainerInfo: + type: object + properties: + container_id: + type: string + ip_inside_enclave: + type: string + grpc_port_inside_enclave: + type: integer + bridge_ip_address: + type: string + required: + - container_id + - ip_inside_enclave + - grpc_port_inside_enclave + - bridge_ip_address + + EnclaveAPIContainerHostMachineInfo: + type: object + properties: + ip_on_host_machine: + type: string + grpc_port_on_host_machine: + type: integer + required: + - ip_on_host_machine + - grpc_port_on_host_machine + + EnclaveIdentifiers: + type: object + properties: + enclave_uuid: + type: string + name: + type: string + shortened_uuid: + type: string + required: + - enclave_uuid + - name + - shortened_uuid + + EnclaveNameAndUuid: + type: object + properties: + name: + type: string + uuid: + type: string + required: + - name + - uuid + + DeletionSummary: + type: object + properties: + removed_enclave_name_and_uuids: + type: array + items: + $ref: '#/components/schemas/EnclaveNameAndUuid' + + Timestamp: + type: string + format: date-time + Port: type: object properties: @@ -1032,3 +897,47 @@ components: 0 - STOPPED 1 - RUNNING 2 - UNKNOWN + + ServiceLogs: + type: object + properties: + service_logs_by_service_uuid: + type: object + additionalProperties: + $ref: "#/components/schemas/LogLine" + not_found_service_uuid_set: + type: array + items: + type: string + + LogLine: + type: object + properties: + line: + type: array + items: + type: string + timestamp: + $ref: "#/components/schemas/Timestamp" + required: + - line + - timestamp + + LogLineFilter: + type: object + properties: + operator: + $ref: "#/components/schemas/LogLineOperator" + text_pattern: + type: string + required: + - operator + - text_pattern + + LogLineOperator: + type: string + enum: + - DOES_CONTAIN_TEXT + - DOES_NOT_CONTAIN_TEXT + - DOES_CONTAIN_MATCH_REGEX + - DOES_NOT_CONTAIN_MATCH_REGEX diff --git a/api/openapi/specs/core_service.yaml b/api/openapi/specs/core_service.yaml new file mode 100644 index 0000000000..d4b04095aa --- /dev/null +++ b/api/openapi/specs/core_service.yaml @@ -0,0 +1,331 @@ +openapi: 3.0.0 + +info: + title: Enclave API + description: API to manipulate the enclaves + version: 0.1.0 + +paths: + + /enclaves/{enclave_identifier}/starlark: + get: + description: Get last Starlark run + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/StarlarkDescription" + + /enclaves/{enclave_identifier}/starlark/packages: + post: + description: Uploads a Starlark package. This step is required before the package can be executed with RunStarlarkPackage + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + $ref: "./api_types.yaml#/components/requestBodies/fileUploadBody" + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Success + + /enclaves/{enclave_identifier}/starlark/packages/{package_id}: + post: + description: Executes a Starlark script on the user's behalf + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/package_id' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/RunStarlarkPackage" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + type: array + items: + $ref: "./api_types.yaml#/components/schemas/StarlarkRunResponseLine" + + /enclaves/{enclave_identifier}/starlark/scripts: + post: + description: Executes a Starlark script on the user's behalf + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/RunStarlarkScript" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/octet-stream: + schema: + type: string + format: binary + application/json: + schema: + type: array + items: + $ref: "./api_types.yaml#/components/schemas/StarlarkRunResponseLine" + + /enclaves/{enclave_identifier}/services/{service_identifier}: + get: + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/service_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/ServiceInfo" + + /enclaves/{enclave_identifier}/services/history: + get: + description: Returns information about all existing & historical services + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: array + items: + $ref: "./api_types.yaml#/components/schemas/ServiceIdentifiers" + + /enclaves/{enclave_identifier}/services: + get: + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - in: query + name: services + schema: + type: array + items: + type: string + description: Select services to get information + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: object + additionalProperties: + $ref: "./api_types.yaml#/components/schemas/ServiceInfo" + + /enclaves/{enclave_identifier}/services/{service_identifier}/command: + post: + description: Executes the given command inside a running container + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/service_identifier' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/ExecCommand" + description: Exec Command + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/ExecCommandResult" + + /enclaves/{enclave_identifier}/services/{service_identifier}/endpoints/{port_number}/availability: + get: + description: Block until the given HTTP endpoint returns available, calling it through a HTTP request + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/service_identifier' + - $ref: './api_types.yaml#/components/parameters/port_number' + - $ref: './api_types.yaml#/components/parameters/http_method' + - $ref: './api_types.yaml#/components/parameters/path' + - $ref: './api_types.yaml#/components/parameters/initial_delay_milliseconds' + - $ref: './api_types.yaml#/components/parameters/retries' + - $ref: './api_types.yaml#/components/parameters/retries_delay_milliseconds' + - $ref: './api_types.yaml#/components/parameters/expected_response' + - $ref: './api_types.yaml#/components/parameters/request_body' + responses: + "200": + description: Success + + /enclaves/{enclave_identifier}/artifacts: + get: + description: List all files artifacts + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: array + items: + $ref: "./api_types.yaml#/components/schemas/FileArtifactReference" + + /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}: + get: + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/artifact_identifier' + description: Inspect the content of a file artifact + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: array + items: + $ref: "./api_types.yaml#/components/schemas/FileArtifactDescription" + + /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download: + get: + description: Downloads a files artifact from the Kurtosis File System + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/artifact_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/octet-stream: + schema: + type: string + format: binary + + /enclaves/{enclave_identifier}/artifacts/local-file: + post: + description: Uploads a files artifact to the Kurtosis File System + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + $ref: "./api_types.yaml#/components/requestBodies/fileUploadBody" + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: object + additionalProperties: + $ref: "./api_types.yaml#/components/schemas/FileArtifactReference" + + /enclaves/{enclave_identifier}/artifacts/remote-file: + post: + description: Tells the API container to download a files artifact from the web to the Kurtosis File System + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/StoreWebFilesArtifact" + description: Store Web Files Artifact + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/FileArtifactReference" + + /enclaves/{enclave_identifier}/artifacts/services/{service_identifier}: + post: + description: Tells the API container to copy a files artifact from a service to the Kurtosis File System + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + - $ref: './api_types.yaml#/components/parameters/service_identifier' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/StoreFilesArtifactFromService" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/FileArtifactReference" + + /enclaves/{enclave_identifier}/services/connection: + post: + description: User services port forwarding + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/Connect" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + +components: + + responses: + + NotOk: + description: Unexpected error + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/ResponseInfo' + required: true diff --git a/api/openapi/specs/engine_service.yaml b/api/openapi/specs/engine_service.yaml new file mode 100644 index 0000000000..4b9c517f88 --- /dev/null +++ b/api/openapi/specs/engine_service.yaml @@ -0,0 +1,149 @@ +openapi: 3.0.0 + +info: + title: Engine API + version: 0.1.0 + +paths: + /engine/info: + get: + summary: Get Engine Info + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/EngineInfo' + + /enclaves: + get: + summary: Get Enclaves + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + type: object + additionalProperties: + $ref: './api_types.yaml#/components/schemas/EnclaveInfo' + + post: + summary: Create Enclave + requestBody: + required: true + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/CreateEnclave' + responses: + + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/EnclaveInfo' + + delete: + summary: Delete Enclaves + parameters: + - $ref: './api_types.yaml#/components/parameters/remove_all' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/DeletionSummary' + + /enclaves/historical: + get: + summary: Get Historical Enclaves + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + type: array + items: + $ref: './api_types.yaml#/components/schemas/EnclaveIdentifiers' + + /enclaves/{enclave_identifier}: + get: + summary: Get Enclave Info + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/EnclaveInfo' + + delete: + summary: Destroy Enclave + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + + /enclaves/{enclave_identifier}/status: + get: + summary: Get enclave status + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/EnclaveContainersStatus' + post: + summary: Set enclave status + parameters: + - $ref: './api_types.yaml#/components/parameters/enclave_identifier' + requestBody: + required: true + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/EnclaveTargetStatus' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + +components: + + responses: + + NotOk: + description: Unexpected error + content: + application/json: + schema: + $ref: './api_types.yaml#/components/schemas/ResponseInfo' + required: true \ No newline at end of file diff --git a/api/openapi/specs/websocket_service.yaml b/api/openapi/specs/websocket_service.yaml new file mode 100644 index 0000000000..0eef058677 --- /dev/null +++ b/api/openapi/specs/websocket_service.yaml @@ -0,0 +1,42 @@ +openapi: 3.0.0 + +info: + title: Websocket API + version: 0.1.0 + +paths: + /enclaves/{enclave_identifier}/logs: + get: + summary: Get Service Logs + parameters: + - $ref: "./api_types.yaml#/components/parameters/enclave_identifier" + - $ref: "./api_types.yaml#/components/parameters/service_uuid_set" + - $ref: "./api_types.yaml#/components/parameters/follow_logs" + - $ref: "./api_types.yaml#/components/parameters/conjunctive_filters" + - $ref: "./api_types.yaml#/components/parameters/return_all_logs" + - $ref: "./api_types.yaml#/components/parameters/num_log_lines" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/ServiceLogs" + + /enclaves/{enclave_identifier}/services/{service_identifier}/logs: + get: + summary: Get Service Logs + parameters: + - $ref: "./api_types.yaml#/components/parameters/enclave_identifier" + - $ref: "./api_types.yaml#/components/parameters/service_identifier" + - $ref: "./api_types.yaml#/components/parameters/follow_logs" + - $ref: "./api_types.yaml#/components/parameters/conjunctive_filters" + - $ref: "./api_types.yaml#/components/parameters/return_all_logs" + - $ref: "./api_types.yaml#/components/parameters/num_log_lines" + responses: + "200": + description: Successful response + content: + application/json: + schema: + $ref: "./api_types.yaml#/components/schemas/ServiceLogs" diff --git a/api/openapi/websocket/server.cfg.yaml b/api/openapi/websocket/server.cfg.yaml deleted file mode 100644 index 5eecf6f51f..0000000000 --- a/api/openapi/websocket/server.cfg.yaml +++ /dev/null @@ -1,6 +0,0 @@ -package: kurtosis_websocket_api_bindings -generate: - embedded-spec: true - echo-server: true - strict-server: false -output: api/golang/websocket/kurtosis_websocket_api_bindings/websocket_server.gen.go \ No newline at end of file diff --git a/api/openapi/websocket/types.cfg.yaml b/api/openapi/websocket/types.cfg.yaml deleted file mode 100644 index edb2290ad1..0000000000 --- a/api/openapi/websocket/types.cfg.yaml +++ /dev/null @@ -1,4 +0,0 @@ -package: kurtosis_websocket_api_bindings -generate: - models: true -output: api/golang/websocket/kurtosis_websocket_api_bindings/websocket_types.gen.go \ No newline at end of file diff --git a/api/openapi/websocket/websocket_service.yaml b/api/openapi/websocket/websocket_service.yaml deleted file mode 100644 index fb35ae77cf..0000000000 --- a/api/openapi/websocket/websocket_service.yaml +++ /dev/null @@ -1,154 +0,0 @@ -openapi: 3.0.0 - -info: - title: Websocket API - version: 0.1.0 - -paths: - /enclaves/{enclave_identifier}/logs: - get: - summary: Get Service Logs - parameters: - - $ref: "#/components/parameters/enclave_identifier" - - $ref: "#/components/parameters/service_uuid_set" - - $ref: "#/components/parameters/follow_logs" - - $ref: "#/components/parameters/conjunctive_filters" - - $ref: "#/components/parameters/return_all_logs" - - $ref: "#/components/parameters/num_log_lines" - responses: - "200": - description: Successful response - content: - application/json: - schema: - $ref: "#/components/schemas/ServiceLogs" - - /enclaves/{enclave_identifier}/services/{service_uuid}/logs: - get: - summary: Get Service Logs - parameters: - - $ref: "#/components/parameters/enclave_identifier" - - $ref: "#/components/parameters/service_uuid" - - $ref: "#/components/parameters/follow_logs" - - $ref: "#/components/parameters/conjunctive_filters" - - $ref: "#/components/parameters/return_all_logs" - - $ref: "#/components/parameters/num_log_lines" - responses: - "200": - description: Successful response - content: - application/json: - schema: - $ref: "#/components/schemas/ServiceLogs" - -# ========================================================================================================================= -# ========================================================================================================================= -# > > > > > > > > > > > > > > > > > > > > > > > > Data Models < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < -# ========================================================================================================================= -# ========================================================================================================================= - -components: - parameters: - enclave_identifier: - name: enclave_identifier - in: path - required: true - description: UUID, shortened UUID, or name of the enclave - schema: - type: string - - service_uuid: - name: service_uuid - in: path - required: true - schema: - type: string - - service_uuid_set: - name: service_uuid_set - in: query - required: true - schema: - type: array - items: - type: string - - follow_logs: - name: follow_logs - in: query - required: false - schema: - type: boolean - - conjunctive_filters: - name: conjunctive_filters - in: query - required: false - schema: - type: array - items: - $ref: "#/components/schemas/LogLineFilter" - - return_all_logs: - name: return_all_logs - in: query - required: false - schema: - type: boolean - - num_log_lines: - name: num_log_lines - in: query - required: false - schema: - type: integer - - schemas: - - ServiceLogs: - type: object - properties: - service_logs_by_service_uuid: - type: object - additionalProperties: - $ref: "#/components/schemas/LogLine" - not_found_service_uuid_set: - type: array - items: - type: string - - LogLine: - type: object - properties: - line: - type: array - items: - type: string - timestamp: - $ref: "#/components/schemas/Timestamp" - required: - - line - - timestamp - - LogLineFilter: - type: object - properties: - operator: - $ref: "#/components/schemas/LogLineOperator" - text_pattern: - type: string - required: - - operator - - text_pattern - - LogLineOperator: - type: string - enum: - - DOES_CONTAIN_TEXT - - DOES_NOT_CONTAIN_TEXT - - DOES_CONTAIN_MATCH_REGEX - - DOES_NOT_CONTAIN_MATCH_REGEX - - Timestamp: - type: string - format: date-time diff --git a/engine/server/engine/main.go b/engine/server/engine/main.go index 599f6c9627..2c63f8fe94 100644 --- a/engine/server/engine/main.go +++ b/engine/server/engine/main.go @@ -17,10 +17,10 @@ import ( "strings" "time" - enclaveApi "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rest_api_bindings" - engineApi "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rest_api_bindings" "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rpc_api_bindings/kurtosis_engine_rpc_api_bindingsconnect" - loggingApi "github.com/kurtosis-tech/kurtosis/api/golang/websocket/kurtosis_websocket_api_bindings" + enclaveApi "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/core_rest_api" + engineApi "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/engine_rest_api" + loggingApi "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/websocket_api" connect_server "github.com/kurtosis-tech/kurtosis/connect-server" "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/backend_creator" "github.com/kurtosis-tech/kurtosis/container-engine-lib/lib/backend_impls/docker/docker_kurtosis_backend/consts" diff --git a/engine/server/engine/server/enclave_rest_api_handler.go b/engine/server/engine/server/enclave_rest_api_handler.go index 6204a64359..fecacbd173 100644 --- a/engine/server/engine/server/enclave_rest_api_handler.go +++ b/engine/server/engine/server/enclave_rest_api_handler.go @@ -20,8 +20,9 @@ import ( "google.golang.org/grpc/credentials/insecure" "google.golang.org/protobuf/types/known/emptypb" - api "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rest_api_bindings" rpc_api "github.com/kurtosis-tech/kurtosis/api/golang/core/kurtosis_core_rpc_api_bindings" + api_type "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" + api "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/core_rest_api" ) type enclaveRuntime struct { @@ -107,8 +108,8 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierArtifacts(ctx context results := utils.MapList( artifacts.FileNamesAndUuids, - func(x *rpc_api.FilesArtifactNameAndUuid) api.FileArtifactReference { - return api.FileArtifactReference{ + func(x *rpc_api.FilesArtifactNameAndUuid) api_type.FileArtifactReference { + return api_type.FileArtifactReference{ Name: x.FileName, Uuid: x.FileUuid, } @@ -126,7 +127,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierArtifactsLocalFile(c } logrus.Infof("Uploading file artifact to enclave %s", enclave_identifier) - uploaded_artifacts := map[string]api.FileArtifactReference{} + uploaded_artifacts := map[string]api_type.FileArtifactReference{} for { // Get next part (file) from the the multipart POST request part, err := request.Body.NextPart() @@ -159,7 +160,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierArtifactsLocalFile(c // The response is nil when a file artifact with the same has already been uploaded // TODO (edgar) Is this the expected behavior? If so, we should be explicit about it. if response != nil { - artifact_response := api.FileArtifactReference{ + artifact_response := api_type.FileArtifactReference{ Name: response.Name, Uuid: response.Uuid, } @@ -189,7 +190,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierArtifactsRemoteFile( return nil, stacktrace.NewError("Can't start file upload gRPC call with enclave %s", enclave_identifier) } - artifact_response := api.FileArtifactReference{ + artifact_response := api_type.FileArtifactReference{ Uuid: stored_artifact.Uuid, Name: request.Body.Name, } @@ -217,7 +218,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierArtifactsServicesSer return nil, stacktrace.NewError("Can't start file upload gRPC call with enclave %s", enclave_identifier) } - artifact_response := api.FileArtifactReference{ + artifact_response := api_type.FileArtifactReference{ Uuid: stored_artifact.Uuid, Name: request.Body.Name, } @@ -248,9 +249,9 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierArtifactsArtifactIden artifact_content_list := utils.MapList( stored_artifact.FileDescriptions, - func(x *rpc_api.FileArtifactContentsFileDescription) api.FileArtifactDescription { + func(x *rpc_api.FileArtifactContentsFileDescription) api_type.FileArtifactDescription { size := int64(x.Size) - return api.FileArtifactDescription{ + return api_type.FileArtifactDescription{ Path: x.Path, Size: size, TextPreview: x.TextPreview, @@ -333,8 +334,8 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierServicesHistory(ctx c return nil, stacktrace.NewError("Can't list services using gRPC call with enclave %s", enclave_identifier) } - response := utils.MapList(services.AllIdentifiers, func(service *rpc_api.ServiceIdentifiers) api.ServiceIdentifiers { - return api.ServiceIdentifiers{ + response := utils.MapList(services.AllIdentifiers, func(service *rpc_api.ServiceIdentifiers) api_type.ServiceIdentifiers { + return api_type.ServiceIdentifiers{ ServiceUuid: service.ServiceUuid, ShortenedUuid: service.ShortenedUuid, Name: service.Name, @@ -413,7 +414,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierServicesServiceIdent return nil, stacktrace.NewError("Can't execute commands using gRPC call with enclave %s", enclave_identifier) } - response := api.ExecCommandResult{ + response := api_type.ExecCommandResult{ ExitCode: exec_result.ExitCode, LogOutput: exec_result.LogOutput, } @@ -425,7 +426,7 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdenti enclave_identifier := request.EnclaveIdentifier service_identifier := request.ServiceIdentifier port_number := request.PortNumber - endpoint_method := utils.DerefWith(request.Params.HttpMethod, api.GET) + endpoint_method := utils.DerefWith(request.Params.HttpMethod, api_type.GET) apiContainerClient, errConn := manager.GetGrpcClientForEnclaveUUID(enclave_identifier) if errConn != nil { return nil, errConn @@ -436,7 +437,7 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdenti var err error switch endpoint_method { - case api.GET: + case api_type.GET: waitForHttpGetEndpointAvailabilityArgs := rpc_api.WaitForHttpGetEndpointAvailabilityArgs{ ServiceIdentifier: service_identifier, Port: uint32(port_number), @@ -447,7 +448,7 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdenti BodyText: request.Params.ExpectedResponse, } _, err = (*apiContainerClient).WaitForHttpGetEndpointAvailability(ctx, &waitForHttpGetEndpointAvailabilityArgs) - case api.POST: + case api_type.POST: waitForHttpPostEndpointAvailabilityArgs := rpc_api.WaitForHttpPostEndpointAvailabilityArgs{ ServiceIdentifier: service_identifier, Port: uint32(port_number), @@ -488,7 +489,7 @@ func (manager *enclaveRuntime) GetEnclavesEnclaveIdentifierStarlark(ctx context. flags := utils.MapList(starlark_result.ExperimentalFeatures, toHttpFeatureFlag) policy := toHttpRestartPolicy(starlark_result.RestartPolicy) - response := api.StarlarkDescription{ + response := api_type.StarlarkDescription{ ExperimentalFeatures: flags, MainFunctionName: starlark_result.MainFunctionName, PackageId: starlark_result.PackageId, @@ -558,7 +559,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierStarlarkPackagesPack logrus.Infof("Run Starlark package on enclave %s", enclave_identifier) package_id := request.PackageId - flags := utils.MapList(utils.DerefWith(request.Body.ExperimentalFeatures, []api.KurtosisFeatureFlag{}), toGrpcFeatureFlag) + flags := utils.MapList(utils.DerefWith(request.Body.ExperimentalFeatures, []api_type.KurtosisFeatureFlag{}), toGrpcFeatureFlag) // The gRPC always expect a JSON object even though it's marked as optional, so we need to default to `{}`` jsonParams := utils.DerefWith(request.Body.Params, map[string]interface{}{}) jsonBlob, err := json.Marshal(jsonParams) @@ -620,7 +621,7 @@ func (manager *enclaveRuntime) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx } logrus.Infof("Run Starlark script on enclave %s", enclave_identifier) - flags := utils.MapList(utils.DerefWith(request.Body.ExperimentalFeatures, []api.KurtosisFeatureFlag{}), toGrpcFeatureFlag) + flags := utils.MapList(utils.DerefWith(request.Body.ExperimentalFeatures, []api_type.KurtosisFeatureFlag{}), toGrpcFeatureFlag) jsonString := utils.MapPointer(request.Body.Params, func(v map[string]interface{}) string { jsonBlob, err := json.Marshal(v) if err != nil { @@ -693,18 +694,18 @@ func getGrpcClientConn(enclaveInfo types.EnclaveInfo, connectOnHostMachine bool) return grpcConnection, nil } -func (manager enclaveRuntime) GetApiClientOrResponseError(enclave_uuid string) (*rpc_api.ApiContainerServiceClient, *api.ResponseInfo) { +func (manager enclaveRuntime) GetApiClientOrResponseError(enclave_uuid string) (*rpc_api.ApiContainerServiceClient, *api_type.ResponseInfo) { client, err := manager.GetGrpcClientForEnclaveUUID(enclave_uuid) if err != nil { - return nil, &api.ResponseInfo{ - Type: api.ERROR, + return nil, &api_type.ResponseInfo{ + Type: api_type.ERROR, Message: "Couldn't retrieve connection with enclave", Code: http.StatusInternalServerError, } } if client == nil { - return nil, &api.ResponseInfo{ - Type: api.INFO, + return nil, &api_type.ResponseInfo{ + Type: api_type.INFO, Message: fmt.Sprintf("enclave '%s' not found", enclave_uuid), Code: http.StatusNotFound, } @@ -726,59 +727,59 @@ func (manager enclaveRuntime) GetGrpcClientForEnclaveUUID(enclave_uuid string) ( return &client, nil } -func toGrpcConnect(conn api.Connect) rpc_api.Connect { +func toGrpcConnect(conn api_type.Connect) rpc_api.Connect { switch conn { - case api.CONNECT: + case api_type.CONNECT: return rpc_api.Connect_CONNECT - case api.NOCONNECT: + case api_type.NOCONNECT: return rpc_api.Connect_NO_CONNECT default: panic(fmt.Sprintf("Missing conversion of Connect Enum value: %s", conn)) } } -func toHttpContainerStatus(status rpc_api.Container_Status) api.ContainerStatus { +func toHttpContainerStatus(status rpc_api.Container_Status) api_type.ContainerStatus { switch status { case rpc_api.Container_RUNNING: - return api.ContainerStatusRUNNING + return api_type.ContainerStatusRUNNING case rpc_api.Container_STOPPED: - return api.ContainerStatusSTOPPED + return api_type.ContainerStatusSTOPPED case rpc_api.Container_UNKNOWN: - return api.ContainerStatusUNKNOWN + return api_type.ContainerStatusUNKNOWN default: panic(fmt.Sprintf("Missing conversion of Container Status Enum value: %s", status)) } } -func toHttpTransportProtocol(protocol rpc_api.Port_TransportProtocol) api.TransportProtocol { +func toHttpTransportProtocol(protocol rpc_api.Port_TransportProtocol) api_type.TransportProtocol { switch protocol { case rpc_api.Port_TCP: - return api.TCP + return api_type.TCP case rpc_api.Port_UDP: - return api.UDP + return api_type.UDP case rpc_api.Port_SCTP: - return api.SCTP + return api_type.SCTP default: panic(fmt.Sprintf("Missing conversion of Transport Protocol Enum value: %s", protocol)) } } -func toHttpServiceStatus(status rpc_api.ServiceStatus) api.ServiceStatus { +func toHttpServiceStatus(status rpc_api.ServiceStatus) api_type.ServiceStatus { switch status { case rpc_api.ServiceStatus_RUNNING: - return api.ServiceStatusRUNNING + return api_type.ServiceStatusRUNNING case rpc_api.ServiceStatus_STOPPED: - return api.ServiceStatusSTOPPED + return api_type.ServiceStatusSTOPPED case rpc_api.ServiceStatus_UNKNOWN: - return api.ServiceStatusUNKNOWN + return api_type.ServiceStatusUNKNOWN default: panic(fmt.Sprintf("Missing conversion of Service Status Enum value: %s", status)) } } -func toHttpContainer(container *rpc_api.Container) api.Container { +func toHttpContainer(container *rpc_api.Container) api_type.Container { status := toHttpContainerStatus(container.Status) - return api.Container{ + return api_type.Container{ CmdArgs: container.CmdArgs, EntrypointArgs: container.EntrypointArgs, EnvVars: container.EnvVars, @@ -787,9 +788,9 @@ func toHttpContainer(container *rpc_api.Container) api.Container { } } -func toHttpPorts(port *rpc_api.Port) api.Port { +func toHttpPorts(port *rpc_api.Port) api_type.Port { protocol := toHttpTransportProtocol(port.TransportProtocol) - return api.Port{ + return api_type.Port{ ApplicationProtocol: &port.MaybeApplicationProtocol, WaitTimeout: &port.MaybeWaitTimeout, Number: int32(port.Number), @@ -797,12 +798,12 @@ func toHttpPorts(port *rpc_api.Port) api.Port { } } -func toHttpServiceInfo(service *rpc_api.ServiceInfo) api.ServiceInfo { +func toHttpServiceInfo(service *rpc_api.ServiceInfo) api_type.ServiceInfo { container := toHttpContainer(service.Container) serviceStatus := toHttpServiceStatus(service.ServiceStatus) publicPorts := utils.MapMapValues(service.MaybePublicPorts, toHttpPorts) privatePorts := utils.MapMapValues(service.PrivatePorts, toHttpPorts) - return api.ServiceInfo{ + return api_type.ServiceInfo{ Container: container, PublicIpAddr: &service.MaybePublicIpAddr, PublicPorts: &publicPorts, @@ -815,40 +816,40 @@ func toHttpServiceInfo(service *rpc_api.ServiceInfo) api.ServiceInfo { } } -func toHttpFeatureFlag(flag rpc_api.KurtosisFeatureFlag) api.KurtosisFeatureFlag { +func toHttpFeatureFlag(flag rpc_api.KurtosisFeatureFlag) api_type.KurtosisFeatureFlag { switch flag { case rpc_api.KurtosisFeatureFlag_NO_INSTRUCTIONS_CACHING: - return api.NOINSTRUCTIONSCACHING + return api_type.NOINSTRUCTIONSCACHING default: panic(fmt.Sprintf("Missing conversion of Feature Flag Enum value: %s", flag)) } } -func toHttpRestartPolicy(policy rpc_api.RestartPolicy) api.RestartPolicy { +func toHttpRestartPolicy(policy rpc_api.RestartPolicy) api_type.RestartPolicy { switch policy { case rpc_api.RestartPolicy_ALWAYS: - return api.RestartPolicyALWAYS + return api_type.RestartPolicyALWAYS case rpc_api.RestartPolicy_NEVER: - return api.RestartPolicyNEVER + return api_type.RestartPolicyNEVER default: panic(fmt.Sprintf("Missing conversion of Restart Policy Enum value: %s", policy)) } } -func toGrpcFeatureFlag(flag api.KurtosisFeatureFlag) rpc_api.KurtosisFeatureFlag { +func toGrpcFeatureFlag(flag api_type.KurtosisFeatureFlag) rpc_api.KurtosisFeatureFlag { switch flag { - case api.NOINSTRUCTIONSCACHING: + case api_type.NOINSTRUCTIONSCACHING: return rpc_api.KurtosisFeatureFlag_NO_INSTRUCTIONS_CACHING default: panic(fmt.Sprintf("Missing conversion of Feature Flag Enum value: %s", flag)) } } -func toGrpcImageDownloadMode(flag api.ImageDownloadMode) rpc_api.ImageDownloadMode { +func toGrpcImageDownloadMode(flag api_type.ImageDownloadMode) rpc_api.ImageDownloadMode { switch flag { - case api.ImageDownloadModeALWAYS: + case api_type.ImageDownloadModeALWAYS: return rpc_api.ImageDownloadMode_always - case api.ImageDownloadModeMISSING: + case api_type.ImageDownloadModeMISSING: return rpc_api.ImageDownloadMode_missing default: panic(fmt.Sprintf("Missing conversion of Image Download Mode Enum value: %s", flag)) diff --git a/engine/server/engine/server/engine_rest_api_handler.go b/engine/server/engine/server/engine_rest_api_handler.go index 4e2a544abd..d7ddebe174 100644 --- a/engine/server/engine/server/engine_rest_api_handler.go +++ b/engine/server/engine/server/engine_rest_api_handler.go @@ -12,7 +12,8 @@ import ( "github.com/kurtosis-tech/stacktrace" "github.com/sirupsen/logrus" - api "github.com/kurtosis-tech/kurtosis/api/golang/engine/kurtosis_engine_rest_api_bindings" + api_type "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" + api "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/engine_rest_api" ) type EngineRuntime struct { @@ -39,7 +40,7 @@ func (engine EngineRuntime) DeleteEnclaves(ctx context.Context, request api.Dele } } removedApiResponse := utils.MapList(removedEnclaveUuidsAndNames, toHttpApiEnclaveNameAndUuid) - return api.DeleteEnclaves200JSONResponse(api.DeletionSummary{RemovedEnclaveNameAndUuids: &removedApiResponse}), nil + return api.DeleteEnclaves200JSONResponse(api_type.DeletionSummary{RemovedEnclaveNameAndUuids: &removedApiResponse}), nil } // Get Enclaves @@ -49,7 +50,7 @@ func (engine EngineRuntime) GetEnclaves(ctx context.Context, request api.GetEncl if err != nil { return nil, stacktrace.Propagate(err, "An error occurred getting info for enclaves") } - response := utils.MapMapValues(infoForEnclaves, func(enclave *types.EnclaveInfo) api.EnclaveInfo { return toHttpApiEnclaveInfo(*enclave) }) + response := utils.MapMapValues(infoForEnclaves, func(enclave *types.EnclaveInfo) api_type.EnclaveInfo { return toHttpApiEnclaveInfo(*enclave) }) return api.GetEnclaves200JSONResponse(response), nil } @@ -67,7 +68,7 @@ func (engine EngineRuntime) PostEnclaves(ctx context.Context, request api.PostEn } isProduction := false - if *request.Body.Mode == api.PRODUCTION { + if *request.Body.Mode == api_type.PRODUCTION { isProduction = true } @@ -153,7 +154,7 @@ func (engine EngineRuntime) PostEnclavesEnclaveIdentifierStatus(ctx context.Cont targetState := request.Body switch *targetState { - case api.STOP: + case api_type.STOP: if err := engine.MetricsClient.TrackStopEnclave(enclaveIdentifier); err != nil { logrus.Warnf("An error occurred while logging the stop enclave event for enclave '%v'", enclaveIdentifier) } @@ -172,7 +173,7 @@ func (engine EngineRuntime) PostEnclavesEnclaveIdentifierStatus(ctx context.Cont // Get Engine Info // (GET /engine/info) func (engine EngineRuntime) GetEngineInfo(ctx context.Context, request api.GetEngineInfoRequestObject) (api.GetEngineInfoResponseObject, error) { - result := api.EngineInfo{EngineVersion: engine.ImageVersionTag} + result := api_type.EngineInfo{EngineVersion: engine.ImageVersionTag} return api.GetEngineInfo200JSONResponse(result), nil } @@ -180,35 +181,35 @@ func (engine EngineRuntime) GetEngineInfo(ctx context.Context, request api.GetEn // ============================================== Helper Functions ============================================================================= // ============================================================================================================================================= -func toHttpApiEnclaveContainersStatus(status types.EnclaveContainersStatus) api.EnclaveContainersStatus { +func toHttpApiEnclaveContainersStatus(status types.EnclaveContainersStatus) api_type.EnclaveContainersStatus { switch status { case types.EnclaveContainersStatus_EMPTY: - return api.EnclaveContainersStatusEMPTY + return api_type.EnclaveContainersStatusEMPTY case types.EnclaveContainersStatus_STOPPED: - return api.EnclaveContainersStatusSTOPPED + return api_type.EnclaveContainersStatusSTOPPED case types.EnclaveContainersStatus_RUNNING: - return api.EnclaveContainersStatusRUNNING + return api_type.EnclaveContainersStatusRUNNING default: panic(fmt.Sprintf("Undefined mapping of value: %s", status)) } } -func toHttpApiContainerStatus(status types.ContainerStatus) api.ApiContainerStatus { +func toHttpApiContainerStatus(status types.ContainerStatus) api_type.ApiContainerStatus { switch status { case types.ContainerStatus_NONEXISTENT: - return api.ApiContainerStatusNONEXISTENT + return api_type.ApiContainerStatusNONEXISTENT case types.ContainerStatus_STOPPED: - return api.ApiContainerStatusSTOPPED + return api_type.ApiContainerStatusSTOPPED case types.ContainerStatus_RUNNING: - return api.ApiContainerStatusRUNNING + return api_type.ApiContainerStatusRUNNING default: panic(fmt.Sprintf("Undefined mapping of value: %s", status)) } } -func toHttpApiEnclaveAPIContainerInfo(info types.EnclaveAPIContainerInfo) api.EnclaveAPIContainerInfo { +func toHttpApiEnclaveAPIContainerInfo(info types.EnclaveAPIContainerInfo) api_type.EnclaveAPIContainerInfo { port := int(info.GrpcPortInsideEnclave) - return api.EnclaveAPIContainerInfo{ + return api_type.EnclaveAPIContainerInfo{ ContainerId: info.ContainerId, IpInsideEnclave: info.IpInsideEnclave, GrpcPortInsideEnclave: port, @@ -216,27 +217,27 @@ func toHttpApiEnclaveAPIContainerInfo(info types.EnclaveAPIContainerInfo) api.En } } -func toHttpApiApiContainerHostMachineInfo(info types.EnclaveAPIContainerHostMachineInfo) api.EnclaveAPIContainerHostMachineInfo { +func toHttpApiApiContainerHostMachineInfo(info types.EnclaveAPIContainerHostMachineInfo) api_type.EnclaveAPIContainerHostMachineInfo { port := int(info.GrpcPortOnHostMachine) - return api.EnclaveAPIContainerHostMachineInfo{ + return api_type.EnclaveAPIContainerHostMachineInfo{ IpOnHostMachine: info.IpOnHostMachine, GrpcPortOnHostMachine: port, } } -func toHttpApiEnclaveMode(mode types.EnclaveMode) api.EnclaveMode { +func toHttpApiEnclaveMode(mode types.EnclaveMode) api_type.EnclaveMode { switch mode { case types.EnclaveMode_PRODUCTION: - return api.PRODUCTION + return api_type.PRODUCTION case types.EnclaveMode_TEST: - return api.TEST + return api_type.TEST default: panic(fmt.Sprintf("Undefined mapping of value: %s", mode)) } } -func toHttpApiEnclaveInfo(info types.EnclaveInfo) api.EnclaveInfo { - return api.EnclaveInfo{ +func toHttpApiEnclaveInfo(info types.EnclaveInfo) api_type.EnclaveInfo { + return api_type.EnclaveInfo{ EnclaveUuid: info.EnclaveUuid, ShortenedUuid: info.ShortenedUuid, Name: info.Name, @@ -249,29 +250,29 @@ func toHttpApiEnclaveInfo(info types.EnclaveInfo) api.EnclaveInfo { } } -func toHttpApiEnclaveIdentifiers(identifier *types.EnclaveIdentifiers) api.EnclaveIdentifiers { - return api.EnclaveIdentifiers{ +func toHttpApiEnclaveIdentifiers(identifier *types.EnclaveIdentifiers) api_type.EnclaveIdentifiers { + return api_type.EnclaveIdentifiers{ EnclaveUuid: identifier.EnclaveUuid, Name: identifier.Name, ShortenedUuid: identifier.ShortenedUuid, } } -func toHttpApiEnclaveNameAndUuid(identifier *types.EnclaveNameAndUuid) api.EnclaveNameAndUuid { - return api.EnclaveNameAndUuid{ +func toHttpApiEnclaveNameAndUuid(identifier *types.EnclaveNameAndUuid) api_type.EnclaveNameAndUuid { + return api_type.EnclaveNameAndUuid{ Uuid: identifier.Uuid, Name: identifier.Name, } } -func toHttpEnclaveContainersStatus(status types.EnclaveContainersStatus) api.EnclaveContainersStatus { +func toHttpEnclaveContainersStatus(status types.EnclaveContainersStatus) api_type.EnclaveContainersStatus { switch status { case types.EnclaveContainersStatus_STOPPED: - return api.EnclaveContainersStatusSTOPPED + return api_type.EnclaveContainersStatusSTOPPED case types.EnclaveContainersStatus_RUNNING: - return api.EnclaveContainersStatusRUNNING + return api_type.EnclaveContainersStatusRUNNING case types.EnclaveContainersStatus_EMPTY: - return api.EnclaveContainersStatusEMPTY + return api_type.EnclaveContainersStatusEMPTY default: panic(fmt.Sprintf("Undefined mapping of value: %s", status)) } diff --git a/engine/server/engine/server/websocket_api_handler.go b/engine/server/engine/server/websocket_api_handler.go index 35d0b9a3d9..3fd6e64561 100644 --- a/engine/server/engine/server/websocket_api_handler.go +++ b/engine/server/engine/server/websocket_api_handler.go @@ -20,7 +20,8 @@ import ( "golang.org/x/exp/slices" "golang.org/x/net/websocket" - api "github.com/kurtosis-tech/kurtosis/api/golang/websocket/kurtosis_websocket_api_bindings" + api_type "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" + api "github.com/kurtosis-tech/kurtosis/api/golang/http_rest/websocket_api" ) type WebSocketRuntime struct { @@ -62,7 +63,7 @@ type LogStreamer struct { notFoundServiceUuids []string } -func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier api.EnclaveIdentifier, params api.GetEnclavesEnclaveIdentifierLogsParams) error { +func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, params api.GetEnclavesEnclaveIdentifierLogsParams) error { streamer, err := engine.getLogStreamer( ctx, enclaveIdentifier, @@ -85,8 +86,8 @@ func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context } -func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierServicesServiceUuidLogs(ctx echo.Context, enclaveIdentifier api.EnclaveIdentifier, serviceUuid api.ServiceUuid, params api.GetEnclavesEnclaveIdentifierServicesServiceUuidLogsParams) error { - serviceUuidStrSet := []user_service.ServiceUUID{user_service.ServiceUUID(serviceUuid)} +func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, serviceIdentifier api_type.ServiceIdentifier, params api.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error { + serviceUuidStrSet := []user_service.ServiceUUID{user_service.ServiceUUID(serviceIdentifier)} streamer, err := engine.getLogStreamer( ctx, enclaveIdentifier, @@ -110,12 +111,12 @@ func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierServicesServiceUuidLo func (engine WebSocketRuntime) getLogStreamer( ctx echo.Context, - enclaveIdentifier api.EnclaveIdentifier, + enclaveIdentifier api_type.EnclaveIdentifier, serviceUuidList []user_service.ServiceUUID, maybeShouldFollowLogs *bool, maybeShouldReturnAllLogs *bool, maybeNumLogLines *uint32, - maybeFilters *[]api.LogLineFilter, + maybeFilters *[]api_type.LogLineFilter, ) (*LogStreamer, error) { enclaveUuid, err := engine.EnclaveManager.GetEnclaveUuidForEnclaveIdentifier(context.Background(), enclaveIdentifier) if err != nil { @@ -127,7 +128,7 @@ func (engine WebSocketRuntime) getLogStreamer( shouldFollowLogs := utils.DerefWith(maybeShouldFollowLogs, false) shouldReturnAllLogs := utils.DerefWith(maybeShouldReturnAllLogs, false) numLogLines := utils.DerefWith(maybeNumLogLines, 100) - filters := utils.DerefWith(maybeFilters, []api.LogLineFilter{}) + filters := utils.DerefWith(maybeFilters, []api_type.LogLineFilter{}) context := ctx.Request().Context() for _, serviceUuidStr := range serviceUuidList { @@ -310,7 +311,7 @@ func (service *WebSocketRuntime) getEnclaveCreationTime(ctx context.Context, enc } func fromHttpLogLineFilters( - logLineFilters []api.LogLineFilter, + logLineFilters []api_type.LogLineFilter, ) (logline.ConjunctiveLogLineFilters, error) { var conjunctiveLogLineFilters logline.ConjunctiveLogLineFilters @@ -319,13 +320,13 @@ func fromHttpLogLineFilters( operator := logLineFilter.Operator filterTextPattern := logLineFilter.TextPattern switch operator { - case api.DOESCONTAINTEXT: + case api_type.DOESCONTAINTEXT: filter = logline.NewDoesContainTextLogLineFilter(filterTextPattern) - case api.DOESNOTCONTAINTEXT: + case api_type.DOESNOTCONTAINTEXT: filter = logline.NewDoesNotContainTextLogLineFilter(filterTextPattern) - case api.DOESCONTAINMATCHREGEX: + case api_type.DOESCONTAINMATCHREGEX: filter = logline.NewDoesContainMatchRegexLogLineFilter(filterTextPattern) - case api.DOESNOTCONTAINMATCHREGEX: + case api_type.DOESNOTCONTAINMATCHREGEX: filter = logline.NewDoesNotContainMatchRegexLogLineFilter(filterTextPattern) default: return nil, stacktrace.NewError("Unrecognized log line filter operator '%v' in GRPC filter '%v'; this is a bug in Kurtosis", operator, logLineFilter) @@ -340,8 +341,8 @@ func newLogsResponseHttp( requestedServiceUuids []user_service.ServiceUUID, serviceLogsByServiceUuid map[user_service.ServiceUUID][]logline.LogLine, initialNotFoundServiceUuids []string, -) *api.ServiceLogs { - serviceLogLinesByUuid := make(map[string]api.LogLine, len(serviceLogsByServiceUuid)) +) *api_type.ServiceLogs { + serviceLogLinesByUuid := make(map[string]api_type.LogLine, len(serviceLogsByServiceUuid)) notFoundServiceUuids := make([]string, len(initialNotFoundServiceUuids)) for _, serviceUuid := range requestedServiceUuids { serviceUuidStr := string(serviceUuid) @@ -354,7 +355,7 @@ func newLogsResponseHttp( // there is no new log lines but is a found UUID, so it has to be included in the service logs map if !found && !isInNotFoundUuidList { - serviceLogLinesByUuid[serviceUuidStr] = api.LogLine{ + serviceLogLinesByUuid[serviceUuidStr] = api_type.LogLine{ Line: []string{}, Timestamp: time.Now(), } @@ -364,14 +365,14 @@ func newLogsResponseHttp( serviceLogLinesByUuid[serviceUuidStr] = logLines } - response := &api.ServiceLogs{ + response := &api_type.ServiceLogs{ NotFoundServiceUuidSet: ¬FoundServiceUuids, ServiceLogsByServiceUuid: &serviceLogLinesByUuid, } return response } -func newHttpBindingsLogLineFromLogLines(logLines []logline.LogLine) api.LogLine { +func newHttpBindingsLogLineFromLogLines(logLines []logline.LogLine) api_type.LogLine { logLinesStr := make([]string, len(logLines)) var logTimestamp time.Time @@ -380,6 +381,6 @@ func newHttpBindingsLogLineFromLogLines(logLines []logline.LogLine) api.LogLine logTimestamp = logLine.GetTimestamp() } - return api.LogLine{Line: logLinesStr, Timestamp: logTimestamp} + return api_type.LogLine{Line: logLinesStr, Timestamp: logTimestamp} }