From 0a7a7961fe9f2bbf1a0cf58faa188e93b241877e Mon Sep 17 00:00:00 2001 From: lostbean Date: Wed, 29 Nov 2023 18:47:25 -0300 Subject: [PATCH] Merge OpenAPI specs --- .../http_rest/api_types/api_types.gen.go | 257 ++++---- .../core_rest_api/api_container_server.gen.go | 427 ++++++------- .../engine_rest_api/engine_server.gen.go | 133 ++-- .../websocket_api/websocket_server.gen.go | 91 ++- api/openapi/generators/api_types.cfg.yaml | 3 - api/openapi/generators/core_server.cfg.yaml | 11 +- api/openapi/generators/engine_server.cfg.yaml | 11 +- .../generators/websocket_server.cfg.yaml | 11 +- api/openapi/scripts/build.sh | 8 +- api/openapi/specs/core_service.yaml | 321 ---------- api/openapi/specs/engine_service.yaml | 149 ----- .../{api_types.yaml => kurtosis_api.yaml} | 575 +++++++++++++++++- api/openapi/specs/websocket_service.yaml | 72 --- .../engine/server/websocket_api_handler.go | 5 +- 14 files changed, 981 insertions(+), 1093 deletions(-) delete mode 100644 api/openapi/specs/core_service.yaml delete mode 100644 api/openapi/specs/engine_service.yaml rename api/openapi/specs/{api_types.yaml => kurtosis_api.yaml} (56%) delete mode 100644 api/openapi/specs/websocket_service.yaml diff --git a/api/golang/http_rest/api_types/api_types.gen.go b/api/golang/http_rest/api_types/api_types.gen.go index 3d92ea53b1..4264dddf25 100644 --- a/api/golang/http_rest/api_types/api_types.gen.go +++ b/api/golang/http_rest/api_types/api_types.gen.go @@ -4,18 +4,11 @@ package api_types import ( - "bytes" - "compress/gzip" - "encoding/base64" "encoding/json" - "fmt" - "net/url" - "path" - "strings" "time" "github.com/deepmap/oapi-codegen/pkg/runtime" - "github.com/getkin/kin-openapi/openapi3" + openapi_types "github.com/deepmap/oapi-codegen/pkg/types" ) // Defines values for ApiContainerStatus. @@ -622,6 +615,110 @@ type ServiceUuidSet = []string // StarlarkExecutionUuid defines model for starlark_execution_uuid. type StarlarkExecutionUuid = string +// 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"` +} + +// PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody defines parameters for PostEnclavesEnclaveIdentifierArtifactsLocalFile. +type PostEnclavesEnclaveIdentifierArtifactsLocalFileMultipartBody = openapi_types.File + +// 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"` +} + +// 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"` +} + +// GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams defines parameters for GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs. +type GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams 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"` +} + +// PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody defines parameters for PostEnclavesEnclaveIdentifierStarlarkPackages. +type PostEnclavesEnclaveIdentifierStarlarkPackagesMultipartBody = openapi_types.File + +// PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams defines parameters for PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId. +type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams struct { + // RetrieveLogsAsync If false, block http response until all logs are available. Default is true + RetrieveLogsAsync *RetrieveLogsAsync `form:"retrieve_logs_async,omitempty" json:"retrieve_logs_async,omitempty"` +} + +// PostEnclavesEnclaveIdentifierStarlarkScriptsParams defines parameters for PostEnclavesEnclaveIdentifierStarlarkScripts. +type PostEnclavesEnclaveIdentifierStarlarkScriptsParams struct { + // RetrieveLogsAsync If false, block http response until all logs are available. Default is true + RetrieveLogsAsync *RetrieveLogsAsync `form:"retrieve_logs_async,omitempty" json:"retrieve_logs_async,omitempty"` +} + +// PostEnclavesJSONRequestBody defines body for PostEnclaves for application/json ContentType. +type PostEnclavesJSONRequestBody = CreateEnclave + +// 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 + +// PostEnclavesEnclaveIdentifierStatusJSONRequestBody defines body for PostEnclavesEnclaveIdentifierStatus for application/json ContentType. +type PostEnclavesEnclaveIdentifierStatusJSONRequestBody = EnclaveTargetStatus + // AsStarlarkInterpretationError returns the union data inside the StarlarkError_Error as a StarlarkInterpretationError func (t StarlarkError_Error) AsStarlarkInterpretationError() (StarlarkInterpretationError, error) { var body StarlarkInterpretationError @@ -963,147 +1060,3 @@ 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/+xcX2/jOJL/KoTugJ5ZqNO9f3A49FsmcbqN7diG7WxmMWloaalsc0KRGpJy2rPIdz+Q", - "IiXKomS5b3fmZV9mOhJZrPqxqlisKvmfUcrzgjNgSkYf/hkVWOAcFAjzFxaKbHGqEpIBU2RLQOjHGchU", - "kEIRzqIP0XoPyA1EDOeAuEBlSbIojogeUGC1j+JIv4o+BGnGkYBfSiIgiz4oUUIcyXQPOdaLqWOhp0kl", - "CNtFr69xlHL2c8lSRQ6QbAl1zJq1filBHJvFQkN94kRBbib/t4Bt9CH6r3cNHO+qYfLdZ777TBjcmfnR", - "a+xYwkLgo+EIWErxAQZheniY3sZI7rlQwCBD1d9cWMi2SO0BWUJh5AKrXAYcfC0gVZAlAmTBmYQul1PH", - "R1ZwwhQSoErBJFJ7ItEB0xJiM0CCOJAU0AuhFG0A5Vg8Q4awRPiACc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BKNH2EiePoOSequM85BKAM41E3FU", - "CF6AUBZUQzsJbBkNMlXzbC4+lzHXWXtAZ0Nnl9Odn3onNpDzzc+Qqs7EYWm70+PohjOm/9lB4j16i27m", - "s9nkZo3evUM/gFQItlsdMpm4acvFCxYZYbsn9kf0Fs3miTd80R6CMiK1/9ZG4hTMjjZq5aYGlapWUnPz", - "byGc5lmChfXWI52J5kCJo7k4ftPkQ3LANvGQZUTDhemixVYfkQZ2kutAvHIogfGyNseh69ap9QbUSD9u", - "rdaVPm5Q9KTr0ZVTb9HVGestUKUV1ougJ/Yn9BY9zP46mz/OPCVofEvjb9yooC4IwAomNv/Q0QdckKQ+", - "MKtrFxyABjFujz2AkNpQFN4FR7usRu+W5TyDcxtm+b7XQ19DanELFDSWqzLPtRPvCFiF81nis5Nglhn/", - "IEfniiwjM5zDNcsetG8JHbod/uy868W01oVPXKp7nO4Jgynb8i7LO1GkibkzcZbsuVRJXg0P3YHjiBQD", - "43r8ZWBOPLDul3GShcXZCJLpO3SR4CwTIMMG3yhW0N/73BEmSQZuR3tB6R3Wg0mLgxCFAR7igJQDoNWI", - "yXFhxOR+sf570LwtwWkduMnuBjjV7zlKXZgW8qouqznyGG6tZOl2qAzgElagtt/xFTMhdsII0x0ywY5z", - "+0a6YWLjzqZAcOmbhRxJpk/DNC19FBiXTfKznndNcpAK54Xvy3s16GJf/lsrXQjJnn06BcpKN6C291Z6", - "Z8LryUpHaYvl/PbhZj2dz4ZM1z9SOqrfC9I4aCwW58xujcUOVNcVaQfUw/qu9/QC886FB2O2rzU+yOZX", - "SG+qK3z4AoLc29MLhb34Xxy1do4Gj8wZDpcgS6oCuHwlKkmtppzNDMWRjsV4qYoycNW4lrLMQaKH9d3b", - "/0XAUp5VV7kzUNcstMiHBLojFK5tRe/WX/tUrHCme4HVHgmgWJGDyW9XKWzaVBSjgFpJ8mugdLUiv9Z1", - "NE0iRoShzVGZ7JwP5P/8JQikgq8qKQQcCLwEoEQbogx5+KqQzR/EiGw9linlL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BamSticauEGp5Gilb", - "X/uJr0GiZ4yHc3j46G0KTL/E/fTP8WXuHmoBqf1Bv885EeRhSLJlye4II3IP2eQQNEVR6gikGpJAeIy2", - "jpIlskxTkHJb0rMW2XQbnTlVOpTPYhBg+AwC4U9g6uRZ89nJ5+pDkosOkWXJXJ3y5FpSHyDe0IXgO9e3", - "fNL8ZN8k4ZM8LYUAphKpoKiHjL+ItaZfVi7nOvTU8+S3+KAu322SYdbOKkEbrTP7v/R+ymBctDvwKdXY", - "oNXp3euXMDOuS+asUi6b3zu4NFRvju/RofZFgbmv0GPndM+XC1Zr+7KxEx+x+WT4Aha3vL1vpzeXjnke", - "6gG/z8HQWX/IJBweHR5fzrwYz/7phLMCuKXDfHMBpmHR9SveCZ7bzE5/o/NwWajdRRjM+/FSpNVdvecX", - "bTaS01IBqkZWv8fgZXWrp9VCdUsDL4htaTifGvQYGOhKNPA8wqaFUMi1cAHoETao3fs5sp5yOX6lCDQB", - "PCw/I8WRKwVWP0jgulBHoaLJDqCx9rsG69Mqwwre2hb8DqPd/q5gnnB9s7A5wtXNeuEShLcLLzm4vtF/", - "6ddRHOlXX+LQ18fu/FZEUf3uejFF62NhMjt1s3v0/uqPV+81f7wAhgsSfYj+fPX+6n1U/SaI3qvX1/8L", - "AAD//6YRv9ydSQAA", -} - -// 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/http_rest/core_rest_api/api_container_server.gen.go b/api/golang/http_rest/core_rest_api/api_container_server.gen.go index 897a8f3dae..208fac2985 100644 --- a/api/golang/http_rest/core_rest_api/api_container_server.gen.go +++ b/api/golang/http_rest/core_rest_api/api_container_server.gen.go @@ -18,137 +18,61 @@ 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/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 - -// PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams defines parameters for PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId. -type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams struct { - // RetrieveLogsAsync If false, block http response until all logs are available. Default is true - RetrieveLogsAsync *externalRef0.RetrieveLogsAsync `form:"retrieve_logs_async,omitempty" json:"retrieve_logs_async,omitempty"` -} - -// PostEnclavesEnclaveIdentifierStarlarkScriptsParams defines parameters for PostEnclavesEnclaveIdentifierStarlarkScripts. -type PostEnclavesEnclaveIdentifierStarlarkScriptsParams struct { - // RetrieveLogsAsync If false, block http response until all logs are available. Default is true - RetrieveLogsAsync *externalRef0.RetrieveLogsAsync `form:"retrieve_logs_async,omitempty" json:"retrieve_logs_async,omitempty"` -} - -// 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 externalRef0.EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/local-file) - PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/remote-file) - PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/artifacts/services/{service_identifier}) - PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error + PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error // (GET /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}) - GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error // (GET /enclaves/{enclave_identifier}/artifacts/{artifact_identifier}/download) - GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error + GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error // (GET /enclaves/{enclave_identifier}/services) - GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error + GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error // (POST /enclaves/{enclave_identifier}/services/connection) - PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (GET /enclaves/{enclave_identifier}/services/history) - GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (GET /enclaves/{enclave_identifier}/services/{service_identifier}) - GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error + GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error // (POST /enclaves/{enclave_identifier}/services/{service_identifier}/command) - PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error + PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error // (GET /enclaves/{enclave_identifier}/services/{service_identifier}/endpoints/{port_number}/availability) - GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, portNumber externalRef0.PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error + GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error // (GET /enclaves/{enclave_identifier}/starlark) - GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/starlark/packages) - PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // (POST /enclaves/{enclave_identifier}/starlark/packages/{package_id}) - PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, packageId externalRef0.PackageId, params PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams) error + PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams) error // (POST /enclaves/{enclave_identifier}/starlark/scripts) - PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params PostEnclavesEnclaveIdentifierStarlarkScriptsParams) error + PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params PostEnclavesEnclaveIdentifierStarlarkScriptsParams) error } // ServerInterfaceWrapper converts echo contexts to parameters. @@ -160,7 +84,7 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -176,7 +100,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifacts(ctx echo. func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -192,7 +116,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsLocalFile func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -208,7 +132,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsRemoteFil func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -216,7 +140,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesS } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier externalRef0.ServiceIdentifier + var serviceIdentifier ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -232,7 +156,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierArtifactsServicesS func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -240,7 +164,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId } // ------------- Path parameter "artifact_identifier" ------------- - var artifactIdentifier externalRef0.ArtifactIdentifier + var artifactIdentifier ArtifactIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, ctx.Param("artifact_identifier"), &artifactIdentifier) if err != nil { @@ -256,7 +180,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -264,7 +188,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId } // ------------- Path parameter "artifact_identifier" ------------- - var artifactIdentifier externalRef0.ArtifactIdentifier + var artifactIdentifier ArtifactIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "artifact_identifier", runtime.ParamLocationPath, ctx.Param("artifact_identifier"), &artifactIdentifier) if err != nil { @@ -280,7 +204,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierArtifactsArtifactId func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServices(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -305,7 +229,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -321,7 +245,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesConnection func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -337,7 +261,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesHistory(ctx func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -345,7 +269,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier externalRef0.ServiceIdentifier + var serviceIdentifier ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -361,7 +285,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -369,7 +293,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIde } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier externalRef0.ServiceIdentifier + var serviceIdentifier ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -385,7 +309,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierServicesServiceIde func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -393,7 +317,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier externalRef0.ServiceIdentifier + var serviceIdentifier ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -401,7 +325,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "port_number" ------------- - var portNumber externalRef0.PortNumber + var portNumber PortNumber err = runtime.BindStyledParameterWithLocation("simple", false, "port_number", runtime.ParamLocationPath, ctx.Param("port_number"), &portNumber) if err != nil { @@ -468,7 +392,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -484,7 +408,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -500,7 +424,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackages(c func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -508,7 +432,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPa } // ------------- Path parameter "package_id" ------------- - var packageId externalRef0.PackageId + var packageId PackageId err = runtime.BindStyledParameterWithLocation("simple", false, "package_id", runtime.ParamLocationPath, ctx.Param("package_id"), &packageId) if err != nil { @@ -533,7 +457,7 @@ func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkPackagesPa func (w *ServerInterfaceWrapper) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -601,17 +525,17 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } -type NotOkJSONResponse externalRef0.ResponseInfo +type NotOkJSONResponse ResponseInfo type GetEnclavesEnclaveIdentifierArtifactsRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsResponseObject interface { VisitGetEnclavesEnclaveIdentifierArtifactsResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierArtifacts200JSONResponse []externalRef0.FileArtifactReference +type GetEnclavesEnclaveIdentifierArtifacts200JSONResponse []FileArtifactReference func (response GetEnclavesEnclaveIdentifierArtifacts200JSONResponse) VisitGetEnclavesEnclaveIdentifierArtifactsResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -621,7 +545,7 @@ func (response GetEnclavesEnclaveIdentifierArtifacts200JSONResponse) VisitGetEnc } type GetEnclavesEnclaveIdentifierArtifactsdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -633,7 +557,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsdefaultJSONResponse) VisitGe } type PostEnclavesEnclaveIdentifierArtifactsLocalFileRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Body *multipart.Reader } @@ -641,7 +565,7 @@ type PostEnclavesEnclaveIdentifierArtifactsLocalFileResponseObject interface { VisitPostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse map[string]externalRef0.FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse map[string]FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsLocalFileResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -651,7 +575,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsLocalFile200JSONResponse) V } type PostEnclavesEnclaveIdentifierArtifactsLocalFiledefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -663,7 +587,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsLocalFiledefaultJSONRespons } type PostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierArtifactsRemoteFileJSONRequestBody } @@ -671,7 +595,7 @@ type PostEnclavesEnclaveIdentifierArtifactsRemoteFileResponseObject interface { VisitPostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse externalRef0.FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsRemoteFileResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -681,7 +605,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFile200JSONResponse) } type PostEnclavesEnclaveIdentifierArtifactsRemoteFiledefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -693,8 +617,8 @@ func (response PostEnclavesEnclaveIdentifierArtifactsRemoteFiledefaultJSONRespon } type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier ServiceIdentifier `json:"service_identifier"` Body *PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierJSONRequestBody } @@ -702,7 +626,7 @@ type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponseObje VisitPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse externalRef0.FileArtifactReference +type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse FileArtifactReference func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier200JSONResponse) VisitPostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -712,7 +636,7 @@ func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier20 } type PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -724,15 +648,15 @@ func (response PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierde } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ArtifactIdentifier externalRef0.ArtifactIdentifier `json:"artifact_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ArtifactIdentifier ArtifactIdentifier `json:"artifact_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse []externalRef0.FileArtifactDescription +type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse []FileArtifactDescription func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -742,7 +666,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier200JSONRes } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -754,8 +678,8 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierdefaultJSO } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ArtifactIdentifier externalRef0.ArtifactIdentifier `json:"artifact_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ArtifactIdentifier ArtifactIdentifier `json:"artifact_identifier"` } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadResponseObject interface { @@ -782,7 +706,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload20 } type GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloaddefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -794,7 +718,7 @@ func (response GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadde } type GetEnclavesEnclaveIdentifierServicesRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Params GetEnclavesEnclaveIdentifierServicesParams } @@ -802,7 +726,7 @@ type GetEnclavesEnclaveIdentifierServicesResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServices200JSONResponse map[string]externalRef0.ServiceInfo +type GetEnclavesEnclaveIdentifierServices200JSONResponse map[string]ServiceInfo func (response GetEnclavesEnclaveIdentifierServices200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -812,7 +736,7 @@ func (response GetEnclavesEnclaveIdentifierServices200JSONResponse) VisitGetEncl } type GetEnclavesEnclaveIdentifierServicesdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -824,7 +748,7 @@ func (response GetEnclavesEnclaveIdentifierServicesdefaultJSONResponse) VisitGet } type PostEnclavesEnclaveIdentifierServicesConnectionRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierServicesConnectionJSONRequestBody } @@ -841,7 +765,7 @@ func (response PostEnclavesEnclaveIdentifierServicesConnection200Response) Visit } type PostEnclavesEnclaveIdentifierServicesConnectiondefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -853,14 +777,14 @@ func (response PostEnclavesEnclaveIdentifierServicesConnectiondefaultJSONRespons } type GetEnclavesEnclaveIdentifierServicesHistoryRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierServicesHistoryResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesHistoryResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse []externalRef0.ServiceIdentifiers +type GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse []ServiceIdentifiers func (response GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesHistoryResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -870,7 +794,7 @@ func (response GetEnclavesEnclaveIdentifierServicesHistory200JSONResponse) Visit } type GetEnclavesEnclaveIdentifierServicesHistorydefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -882,15 +806,15 @@ func (response GetEnclavesEnclaveIdentifierServicesHistorydefaultJSONResponse) V } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier ServiceIdentifier `json:"service_identifier"` } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse externalRef0.ServiceInfo +type GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse ServiceInfo func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierServicesServiceIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -900,7 +824,7 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifier200JSONRespo } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -912,8 +836,8 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifierdefaultJSONR } type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier ServiceIdentifier `json:"service_identifier"` Body *PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandJSONRequestBody } @@ -921,7 +845,7 @@ type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponseObject VisitPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse externalRef0.ExecCommandResult +type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse ExecCommandResult func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200JSONResponse) VisitPostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -931,7 +855,7 @@ func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand200J } type PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommanddefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -943,9 +867,9 @@ func (response PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommanddefa } type GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - ServiceIdentifier externalRef0.ServiceIdentifier `json:"service_identifier"` - PortNumber externalRef0.PortNumber `json:"port_number"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + ServiceIdentifier ServiceIdentifier `json:"service_identifier"` + PortNumber PortNumber `json:"port_number"` Params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams } @@ -962,14 +886,14 @@ func (response GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPor } type GetEnclavesEnclaveIdentifierStarlarkRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierStarlarkResponseObject interface { VisitGetEnclavesEnclaveIdentifierStarlarkResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierStarlark200JSONResponse externalRef0.StarlarkDescription +type GetEnclavesEnclaveIdentifierStarlark200JSONResponse StarlarkDescription func (response GetEnclavesEnclaveIdentifierStarlark200JSONResponse) VisitGetEnclavesEnclaveIdentifierStarlarkResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -979,7 +903,7 @@ func (response GetEnclavesEnclaveIdentifierStarlark200JSONResponse) VisitGetEncl } type GetEnclavesEnclaveIdentifierStarlarkdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -991,7 +915,7 @@ func (response GetEnclavesEnclaveIdentifierStarlarkdefaultJSONResponse) VisitGet } type PostEnclavesEnclaveIdentifierStarlarkPackagesRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Body *multipart.Reader } @@ -1008,7 +932,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackages200Response) VisitPo } type PostEnclavesEnclaveIdentifierStarlarkPackagesdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -1020,8 +944,8 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesdefaultJSONResponse) } type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` - PackageId externalRef0.PackageId `json:"package_id"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` + PackageId PackageId `json:"package_id"` Params PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams Body *PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdJSONRequestBody } @@ -1030,7 +954,7 @@ type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponseObject interf VisitPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse externalRef0.StarlarkRunResponse +type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse StarlarkRunResponse func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResponse) VisitPostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -1040,7 +964,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId200JSONResp } type PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIddefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -1052,7 +976,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIddefaultJSON } type PostEnclavesEnclaveIdentifierStarlarkScriptsRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Params PostEnclavesEnclaveIdentifierStarlarkScriptsParams Body *PostEnclavesEnclaveIdentifierStarlarkScriptsJSONRequestBody } @@ -1061,7 +985,7 @@ type PostEnclavesEnclaveIdentifierStarlarkScriptsResponseObject interface { VisitPostEnclavesEnclaveIdentifierStarlarkScriptsResponse(w http.ResponseWriter) error } -type PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse externalRef0.StarlarkRunResponse +type PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse StarlarkRunResponse func (response PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse) VisitPostEnclavesEnclaveIdentifierStarlarkScriptsResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -1071,7 +995,7 @@ func (response PostEnclavesEnclaveIdentifierStarlarkScripts200JSONResponse) Visi } type PostEnclavesEnclaveIdentifierStarlarkScriptsdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -1148,7 +1072,7 @@ type strictHandler struct { } // GetEnclavesEnclaveIdentifierArtifacts operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1173,7 +1097,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifacts(ctx echo.Context, } // PostEnclavesEnclaveIdentifierArtifactsLocalFile operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsLocalFileRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1204,7 +1128,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsLocalFile(ctx ech } // PostEnclavesEnclaveIdentifierArtifactsRemoteFile operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsRemoteFileRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1235,7 +1159,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsRemoteFile(ctx ec } // PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { var request PostEnclavesEnclaveIdentifierArtifactsServicesServiceIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1267,7 +1191,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierArtifactsServicesServiceId } // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1293,7 +1217,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier } // GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, artifactIdentifier externalRef0.ArtifactIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownload(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, artifactIdentifier ArtifactIdentifier) error { var request GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifierDownloadRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1319,7 +1243,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierArtifactsArtifactIdentifier } // GetEnclavesEnclaveIdentifierServices operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierServicesParams) error { var request GetEnclavesEnclaveIdentifierServicesRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1345,7 +1269,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServices(ctx echo.Context, } // PostEnclavesEnclaveIdentifierServicesConnection operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierServicesConnectionRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1376,7 +1300,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesConnection(ctx ech } // GetEnclavesEnclaveIdentifierServicesHistory operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierServicesHistoryRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1401,7 +1325,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesHistory(ctx echo.Co } // GetEnclavesEnclaveIdentifierServicesServiceIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { var request GetEnclavesEnclaveIdentifierServicesServiceIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1427,7 +1351,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifier(c } // PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommand(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier) error { var request PostEnclavesEnclaveIdentifierServicesServiceIdentifierCommandRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1459,7 +1383,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierServicesServiceIdentifierC } // GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, portNumber externalRef0.PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailability(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, portNumber PortNumber, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityParams) error { var request GetEnclavesEnclaveIdentifierServicesServiceIdentifierEndpointsPortNumberAvailabilityRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1487,7 +1411,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierServicesServiceIdentifierEn } // GetEnclavesEnclaveIdentifierStarlark operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierStarlarkRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1512,7 +1436,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierStarlark(ctx echo.Context, } // PostEnclavesEnclaveIdentifierStarlarkPackages operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierStarlarkPackagesRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1543,7 +1467,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackages(ctx echo. } // PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, packageId externalRef0.PackageId, params PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, packageId PackageId, params PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdParams) error { var request PostEnclavesEnclaveIdentifierStarlarkPackagesPackageIdRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1576,7 +1500,7 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkPackagesPackageId( } // PostEnclavesEnclaveIdentifierStarlarkScripts operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, params PostEnclavesEnclaveIdentifierStarlarkScriptsParams) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params PostEnclavesEnclaveIdentifierStarlarkScriptsParams) error { var request PostEnclavesEnclaveIdentifierStarlarkScriptsRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -1610,60 +1534,77 @@ func (sh *strictHandler) PostEnclavesEnclaveIdentifierStarlarkScripts(ctx echo.C // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+w7a2/bttp/hdD7At0G184uGA7yLb0bp0uNJEUPsBQaLT22uVCkRlJJvMD//YA3i7Io", - "WUnTJNvZl6aJyIfP/UreJBkvSs6AKZkc3iQlFrgABcL8hoUiC5yplOTAFFkQEPrPOchMkFIRzpLD5GwF", - "yC9EDBeAuEBVRfJklBC9oMRqlYwS/Sk5jMIcJQL+qIiAPDlUooJRIrMVFFgfptal3iaVIGyZbDajBFhG", - "8SX0IvXx4/TVCMkVFwoY5Mj+zoVDcIHUCpADFMczcsot0bwuIVOQpwJkyZmENpZTj0decsIUEqAqwSRS", - "KyLRJaYVjMwCCeKSZICuCKVoDqjA4gJyhCXCl5hQPKeAvoHxcozeAaUcfeKC5t+OPWF/VCDWAWUtxPoJ", - "WSlVpgWoFc/j0n93djZDdgGqJORIcZStILvw6BFK1HqMXsECV1QhItHb12dd6IXHhYj9v4BFcpj836TW", - "2In9KifvlCp/MVuOghMN9oQRRTBNc6B4nRaEUiIh4yyXcWJYVcxBaBUJ12qSrjBRqGKKUATXkFWKsKUR", - "z4IIqSwXMkxpB109iIRkLr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ye3nU", - "93Lj5aMEUctr5+ro7TIgr1ov62OfcOrub9YOz1IeXZ4rIhUX684IcOLeRwXmhvCcV7bRA9dEmknOeXVw", - "8MPPyEIjGaYosL7be5J3Dqu/TAsoMpx+UpnA3krozk7/yZUkX6kUaPjmJyvKSVbfmo87ZzvSAFvfLskl", - "sO2zDDf6xn7cW5e+d3PaLdUILu3/vYrW8L1CRDl2Xiw8XP3afqXwhFXXv8mVk5vgId9m0nj31xWnXpin", - "U/axVK3Z5mlb663v9v3UaHt9mOjCWPBquULY7vKsGN2HT3ztSZtxoewjtaPma8bHMoj9u8JHlQOWh2+J", - "h0DHajVkXc9T3gG7/YO/4UvveFD7ofegI4MnnV1BLGqzA83OzaU7jectKESxVPV1P1Gx22m+P+IpZGxD", - "ZvSNns2j+kSH0MTdspBDxnK71zLH6GxFJJIKSnvFywYY/5YhfPmQYdZ4eGkefkdemNwu4jc3yyc+zOuw", - "pQcS8OSmvlCzGZCoBeK23xG3V90rCeKZRHNYYbr4MoG5n9OHys2CK0WDfXLz/fLXSuUipvDAQ4fY9aWn", - "4aLs8fKRdfbUYfEwmvpIuufehfzNVW+z+W8AAAD//1aISs4OSQAA", + "H4sIAAAAAAAC/+x8a2/bOLrwXyH0vkBnFmrcnV0sDvotk6ZtsG1iOM7mHEwKLS09tjmlSS1JJfUU+e8H", + "vEmURcly2qbpwXyZaSxenvuND/k5yfmm5AyYksnLz0mJBd6AAmH+wkKRJc5VRgpgiiwJCP1zATIXpFSE", + "s+RlMl8D8gMRwxtAXKCqIkWSJkQPKLFaJ2miPyUvo2umiYD/VERAkbxUooI0kfkaNlhvpralniaVIGyV", + "3N+nCbCc4lsYBOrq6uxViuSaCwUMCmT/5sIBuERqDcgtFIczssuBYH4qIVdQZAJkyZmELpRnHo6i5IQp", + "JEBVgkmk1kSiW0wrSM0ACeKW5IDuCKVoAWiDxUcoEJYI32JC8YIC+gmOVkfoLVDK0TUXtPj5yCP2nwrE", + "NsCsA9gwImulymwDas2LOPffzudTZAegSkKBFEf5GvKPHjxCidoeoVewxBVViEj05nTeB164XQjY/xew", + "TF4m/2/SSOzEfpWTt0qV782U42BHAz1hRBFMswIo3mYbQimRkHNWyDgyrNosQGgRCcdqlO4wUahiilAE", + "nyCvFGErw54lEVJZKuSY0h68BgAJ0VxyscHKjFd/+yVJPUMIU7ACYXAqcf4Rr7RsxnFw31Eju0itsarl", + "x4IPPRoarH6YxJtlegBSa691Xpi9kByhM4U2lVTsmUJSYaHhVOuAspJiuT5Cr7lAhEmFWQ7o326ZyRow", + "Vet/9xDdYTYINRcqs1zvAZ4L5cUiKtk9ZAzWHaLjGIbr2SBVtuDFtteMBIqjVUyC0uBOLy7naWBRaiGQ", + "wIwJ0VP1up4/IWbIbdynqy24hsksQAkCEaV7jz8FSldrEcJKwaZU0oquQcCA7oTXaeKK3Go1rEqEWeEM", + "qP4BMwRCcNELuIXmcEaYeaOsyfmwJVmAugNgqAFlANCvYTXsUreQUb6SGZZblkdlaYmphBQtKM8/GqFC", + "3lE4mmvu6DUQFtB4oJZ910I+iFEbjIjoLDingJmB3On63jDEm5bA7jmhzjlTmDBvCO1Pm42WGbnmFS1C", + "s4gIi6t0BI5DLGSjyL/ywunCklC4KinHxa9OtzWowJT+56aiipRYqInm7/MCK7NuhO0LwrAhcmdPu6vl", + "n9nxnKuLjzsb4bKkJMealJPfpabn55Ged+aWPmNLblHcCcSYDzecPhp+2sl67WPN/0uFBcXi46l1q5y9", + "46uIQl1JQMQYNSM1a8EZryTdIi9SNpryi1gZvSUYXcNC8vwjKKlDQCPSUgnAG02jNCkFL0EoxxGzdiYd", + "SFm9nJHXLlA1zCbGPAy4zt6RXU0k3WNRveD91jvxQy0RfPE75KozcRjb7vQ0OeGM6X92KPECPUcnF+fn", + "pydzNJmgX0EqBMul9p7GhS65uMOiIGx1w/6KnqPziywYPm0PQQWR2qroGARYtdGwutFJmjRTAxA9aQyI", + "VttNStOicL4pMiwsI4mCjYzQtl4RC4G3iUk5lNiaGP1Bk2+zW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CdcOXREGE9c9d39//78BAAD//8v6pDubYQAA", } // GetSwagger returns the content of the embedded swagger specification file @@ -1703,14 +1644,6 @@ 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/http_rest/engine_rest_api/engine_server.gen.go b/api/golang/http_rest/engine_rest_api/engine_server.gen.go index f10c17b9c2..61553f5ce2 100644 --- a/api/golang/http_rest/engine_rest_api/engine_server.gen.go +++ b/api/golang/http_rest/engine_rest_api/engine_server.gen.go @@ -17,25 +17,10 @@ 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/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 @@ -52,16 +37,16 @@ type ServerInterface interface { GetEnclavesHistorical(ctx echo.Context) error // Destroy Enclave // (DELETE /enclaves/{enclave_identifier}) - DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // Get Enclave Info // (GET /enclaves/{enclave_identifier}) - GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // Get enclave status // (GET /enclaves/{enclave_identifier}/status) - GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // Set enclave status // (POST /enclaves/{enclave_identifier}/status) - PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error + PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error // Get Engine Info // (GET /engine/info) GetEngineInfo(ctx echo.Context) error @@ -121,7 +106,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -137,7 +122,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -153,7 +138,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -169,7 +154,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 externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -230,7 +215,7 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL } -type NotOkJSONResponse externalRef0.ResponseInfo +type NotOkJSONResponse ResponseInfo type DeleteEnclavesRequestObject struct { Params DeleteEnclavesParams @@ -240,7 +225,7 @@ type DeleteEnclavesResponseObject interface { VisitDeleteEnclavesResponse(w http.ResponseWriter) error } -type DeleteEnclaves200JSONResponse externalRef0.DeletionSummary +type DeleteEnclaves200JSONResponse DeletionSummary func (response DeleteEnclaves200JSONResponse) VisitDeleteEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -250,7 +235,7 @@ func (response DeleteEnclaves200JSONResponse) VisitDeleteEnclavesResponse(w http } type DeleteEnclavesdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -268,7 +253,7 @@ type GetEnclavesResponseObject interface { VisitGetEnclavesResponse(w http.ResponseWriter) error } -type GetEnclaves200JSONResponse map[string]externalRef0.EnclaveInfo +type GetEnclaves200JSONResponse map[string]EnclaveInfo func (response GetEnclaves200JSONResponse) VisitGetEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -278,7 +263,7 @@ func (response GetEnclaves200JSONResponse) VisitGetEnclavesResponse(w http.Respo } type GetEnclavesdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -297,7 +282,7 @@ type PostEnclavesResponseObject interface { VisitPostEnclavesResponse(w http.ResponseWriter) error } -type PostEnclaves200JSONResponse externalRef0.EnclaveInfo +type PostEnclaves200JSONResponse EnclaveInfo func (response PostEnclaves200JSONResponse) VisitPostEnclavesResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -307,7 +292,7 @@ func (response PostEnclaves200JSONResponse) VisitPostEnclavesResponse(w http.Res } type PostEnclavesdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -325,7 +310,7 @@ type GetEnclavesHistoricalResponseObject interface { VisitGetEnclavesHistoricalResponse(w http.ResponseWriter) error } -type GetEnclavesHistorical200JSONResponse []externalRef0.EnclaveIdentifiers +type GetEnclavesHistorical200JSONResponse []EnclaveIdentifiers func (response GetEnclavesHistorical200JSONResponse) VisitGetEnclavesHistoricalResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -335,7 +320,7 @@ func (response GetEnclavesHistorical200JSONResponse) VisitGetEnclavesHistoricalR } type GetEnclavesHistoricaldefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -347,7 +332,7 @@ func (response GetEnclavesHistoricaldefaultJSONResponse) VisitGetEnclavesHistori } type DeleteEnclavesEnclaveIdentifierRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type DeleteEnclavesEnclaveIdentifierResponseObject interface { @@ -363,7 +348,7 @@ func (response DeleteEnclavesEnclaveIdentifier200Response) VisitDeleteEnclavesEn } type DeleteEnclavesEnclaveIdentifierdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -375,14 +360,14 @@ func (response DeleteEnclavesEnclaveIdentifierdefaultJSONResponse) VisitDeleteEn } type GetEnclavesEnclaveIdentifierRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierResponseObject interface { VisitGetEnclavesEnclaveIdentifierResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifier200JSONResponse externalRef0.EnclaveInfo +type GetEnclavesEnclaveIdentifier200JSONResponse EnclaveInfo func (response GetEnclavesEnclaveIdentifier200JSONResponse) VisitGetEnclavesEnclaveIdentifierResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -392,7 +377,7 @@ func (response GetEnclavesEnclaveIdentifier200JSONResponse) VisitGetEnclavesEncl } type GetEnclavesEnclaveIdentifierdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -404,14 +389,14 @@ func (response GetEnclavesEnclaveIdentifierdefaultJSONResponse) VisitGetEnclaves } type GetEnclavesEnclaveIdentifierStatusRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` } type GetEnclavesEnclaveIdentifierStatusResponseObject interface { VisitGetEnclavesEnclaveIdentifierStatusResponse(w http.ResponseWriter) error } -type GetEnclavesEnclaveIdentifierStatus200JSONResponse externalRef0.EnclaveContainersStatus +type GetEnclavesEnclaveIdentifierStatus200JSONResponse EnclaveContainersStatus func (response GetEnclavesEnclaveIdentifierStatus200JSONResponse) VisitGetEnclavesEnclaveIdentifierStatusResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -421,7 +406,7 @@ func (response GetEnclavesEnclaveIdentifierStatus200JSONResponse) VisitGetEnclav } type GetEnclavesEnclaveIdentifierStatusdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -433,7 +418,7 @@ func (response GetEnclavesEnclaveIdentifierStatusdefaultJSONResponse) VisitGetEn } type PostEnclavesEnclaveIdentifierStatusRequestObject struct { - EnclaveIdentifier externalRef0.EnclaveIdentifier `json:"enclave_identifier"` + EnclaveIdentifier EnclaveIdentifier `json:"enclave_identifier"` Body *PostEnclavesEnclaveIdentifierStatusJSONRequestBody } @@ -450,7 +435,7 @@ func (response PostEnclavesEnclaveIdentifierStatus200Response) VisitPostEnclaves } type PostEnclavesEnclaveIdentifierStatusdefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -468,7 +453,7 @@ type GetEngineInfoResponseObject interface { VisitGetEngineInfoResponse(w http.ResponseWriter) error } -type GetEngineInfo200JSONResponse externalRef0.EngineInfo +type GetEngineInfo200JSONResponse EngineInfo func (response GetEngineInfo200JSONResponse) VisitGetEngineInfoResponse(w http.ResponseWriter) error { w.Header().Set("Content-Type", "application/json") @@ -478,7 +463,7 @@ func (response GetEngineInfo200JSONResponse) VisitGetEngineInfoResponse(w http.R } type GetEngineInfodefaultJSONResponse struct { - Body externalRef0.ResponseInfo + Body ResponseInfo StatusCode int } @@ -634,7 +619,7 @@ func (sh *strictHandler) GetEnclavesHistorical(ctx echo.Context) error { } // DeleteEnclavesEnclaveIdentifier operation middleware -func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request DeleteEnclavesEnclaveIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -659,7 +644,7 @@ func (sh *strictHandler) DeleteEnclavesEnclaveIdentifier(ctx echo.Context, encla } // GetEnclavesEnclaveIdentifier operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -684,7 +669,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifier(ctx echo.Context, enclaveI } // GetEnclavesEnclaveIdentifierStatus operation middleware -func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request GetEnclavesEnclaveIdentifierStatusRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -709,7 +694,7 @@ func (sh *strictHandler) GetEnclavesEnclaveIdentifierStatus(ctx echo.Context, en } // PostEnclavesEnclaveIdentifierStatus operation middleware -func (sh *strictHandler) PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier) error { +func (sh *strictHandler) PostEnclavesEnclaveIdentifierStatus(ctx echo.Context, enclaveIdentifier EnclaveIdentifier) error { var request PostEnclavesEnclaveIdentifierStatusRequestObject request.EnclaveIdentifier = enclaveIdentifier @@ -765,24 +750,30 @@ func (sh *strictHandler) GetEngineInfo(ctx echo.Context) error { // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/9RXTW/bOBD9K8TsHoXI2958yzZB6kNSo04OiyAQWGlssyuRCjkK1gj03xekvi2qdtrY", - "QG+2NJyPN/OGT68QqyxXEiUZmL9CzjXPkFC7fyjjlL9gJBKUJNYCtX2aoIm1yEkoCXN4eFhcBcxslSaU", - "mLDqv9JM8gyZWjPaIqsdQQDCnsk5bSEAawFzX5QAND4XQmMCc9IFBmDiLWbchqddbk8Z0kJuoCytbaZe", - "MOJpOk5vsWbOAauMGE/TJhtzwa5wzYuUmDBszVPTJvhcoN51GfYCeDL5plSKXEJZ5WJyJQ06/O4UffnX", - "/oiVJJRkf/I8T0XMbXrhd2NzfO25/FPjGubwR9i1JazemvBr7Xoh16oKttcJif/lGBMmDLVW2mFTH7a+", - "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/yJGbxGbfY03FptnG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AAAP//wQWlse4dAAA=", } // GetSwagger returns the content of the embedded swagger specification file @@ -822,14 +813,6 @@ 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/http_rest/websocket_api/websocket_server.gen.go b/api/golang/http_rest/websocket_api/websocket_server.gen.go index 259b50c29d..47261a4eae 100644 --- a/api/golang/http_rest/websocket_api/websocket_server.gen.go +++ b/api/golang/http_rest/websocket_api/websocket_server.gen.go @@ -15,41 +15,21 @@ 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/kurtosis-tech/kurtosis/api/golang/http_rest/api_types" "github.com/labstack/echo/v4" ) -// NotOk defines model for NotOk. -type NotOk = externalRef0.ResponseInfo - -// 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 externalRef0.EnclaveIdentifier, params GetEnclavesEnclaveIdentifierLogsParams) error + GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, params GetEnclavesEnclaveIdentifierLogsParams) error // Get Service Logs // (GET /enclaves/{enclave_identifier}/services/{service_identifier}/logs) - GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, serviceIdentifier externalRef0.ServiceIdentifier, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error + GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, serviceIdentifier ServiceIdentifier, params GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error // (GET /enclaves/{enclave_identifier}/starlark/executions/{starlark_execution_uuid}/logs) - GetEnclavesEnclaveIdentifierStarlarkExecutionsStarlarkExecutionUuidLogs(ctx echo.Context, enclaveIdentifier externalRef0.EnclaveIdentifier, starlarkExecutionUuid externalRef0.StarlarkExecutionUuid) error + GetEnclavesEnclaveIdentifierStarlarkExecutionsStarlarkExecutionUuidLogs(ctx echo.Context, enclaveIdentifier EnclaveIdentifier, starlarkExecutionUuid StarlarkExecutionUuid) error } // ServerInterfaceWrapper converts echo contexts to parameters. @@ -61,7 +41,7 @@ type ServerInterfaceWrapper struct { func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -114,7 +94,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierLogs(ctx echo.Conte func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -122,7 +102,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden } // ------------- Path parameter "service_identifier" ------------- - var serviceIdentifier externalRef0.ServiceIdentifier + var serviceIdentifier ServiceIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "service_identifier", runtime.ParamLocationPath, ctx.Param("service_identifier"), &serviceIdentifier) if err != nil { @@ -168,7 +148,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierServicesServiceIden func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStarlarkExecutionsStarlarkExecutionUuidLogs(ctx echo.Context) error { var err error // ------------- Path parameter "enclave_identifier" ------------- - var enclaveIdentifier externalRef0.EnclaveIdentifier + var enclaveIdentifier EnclaveIdentifier err = runtime.BindStyledParameterWithLocation("simple", false, "enclave_identifier", runtime.ParamLocationPath, ctx.Param("enclave_identifier"), &enclaveIdentifier) if err != nil { @@ -176,7 +156,7 @@ func (w *ServerInterfaceWrapper) GetEnclavesEnclaveIdentifierStarlarkExecutionsS } // ------------- Path parameter "starlark_execution_uuid" ------------- - var starlarkExecutionUuid externalRef0.StarlarkExecutionUuid + var starlarkExecutionUuid StarlarkExecutionUuid err = runtime.BindStyledParameterWithLocation("simple", false, "starlark_execution_uuid", runtime.ParamLocationPath, ctx.Param("starlark_execution_uuid"), &starlarkExecutionUuid) if err != nil { @@ -225,22 +205,35 @@ func RegisterHandlersWithBaseURL(router EchoRouter, si ServerInterface, baseURL // Base64 encoded, gzipped, json marshaled Swagger object var swaggerSpec = []string{ - "H4sIAAAAAAAC/+xXS2/bRhD+K4ttgV4IU01uvBWoUwgwGsOOkUNgEKvlUFqbnKX3oUYQ+N+LfVCiRFKh", - "kKK5RBdCxMw3r28e3FMu60YioNE029OGKVaDAeX/cYkvFrkRW8hLUXWvBdKMvllQO5pQZDXQbFQ0oZpv", - "oGZex0DtlX9VUNKM/pIeDadBTKd3cn0nED54fdom1OwaB86UYjvatgkF5BXbQi4KQCNKAcphFqC5Eo0R", - "0nn29LT8MyF6I5UBhIKE/1IR5yqRJTEbIBGIJiGahpnNMZgRKwlV8GaFgoJmRlnoxxa91EYJXHs3S1lV", - "8p+8kuvJhPVFRsBWUlbA0KOhrZ1cXgmESbxToRFEgQbWLq2ti8VYhTmrqos+not9w08Naiv45eJ82gCJ", - "cuQo11WFSzRMIChiNszEV3XNsHD1tFVBVkDgK3BroCACx8s34sd15esArBVFrsFM5Wcgd8nMoQPO7I2w", - "XBumKqZe8xCqkOhNjGfTonizJ8k0khjF+GsgegfhcszIY4QmAca1RcP4K1tPtMKUK9ck1BNONxJ1oO/f", - "0nx8jfPFAPr0sqapBGfOQPqiXXD7HuKlofEQoZdYymDsbBwgfG2AO8KAUjI0QFR22Cf6bgQq2YAyAuII", - "LMA9S6lqZmhGrUDz/h1NBm2V0Bq0domcrvG8SD452ZC1LsVfAsDRRhI8ez74IVcvwI0z9RhYeRcb+zQe", - "lCYvpUXH1xGSz+TosUXcXMhXuxM0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20cnaGvW7FjGT5hTk4pjTUyYnqZPcWtP6J2K2FcEP6cBdvQP", + "ZWGJR8fGb2dejDe/zXDWgVK1y+51fbdS1XyMJbySpDjGHWunsi1JIlP97nfFJRNEeKv53dq7ul0gH+2B", + "C1N3lxe/XlxqXSwHinOCZujNxeXFJfKLpVgBQmB3w/rH0T/9DHZESMZJhNP2m0N3nXwcQxNgLkmCIymm", + "UQcpi3D6Sg84Exk5ZEzCczjtF7wIDt3l60Rng0P570vLCGL2jaYMx6OElYvxrdlumF0XYXQRoxn6AHJu", + "ue3fRcV6bVbl9auUnmZ9IgkcVw59narG1VnDjOCpXzyMIHdd7Ixga18djGBp3mAc71tb49eXly+2M65v", + "uRwr47tq4vJKE8zWWGUZ5k8m/p4V4tl4S6zz5YvuP4Czoo0dz2dZWTijUrKqsohRCuWX9gQ+06SepjE9", + "u6QHJQT2YucFJAGNc0Z0fA8549KObMcA7zFJ8YakRL6Ay89vCDZRhP37UzvFNK7/esW/qlfY0W1cLlvi", + "oFqf6rR23+Z1crvpovkMAeG6PqTFJaMSwH8R3gZ2OE2QP6U22jto0XnyUZH4n6yUnhvPH06ySevX9kdi", + "95p4OBMfFYhibo4hwXar5NJbeRSYW9nituSHsjOw98liWpqWXMHB/heS+DhNhAFjtF6pTqRbQiGwXwvH", + "4/HvAAAA//+SqAa/FyMAAA==", } // GetSwagger returns the content of the embedded swagger specification file @@ -280,14 +273,6 @@ 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/openapi/generators/api_types.cfg.yaml b/api/openapi/generators/api_types.cfg.yaml index 356a925593..e063278144 100644 --- a/api/openapi/generators/api_types.cfg.yaml +++ b/api/openapi/generators/api_types.cfg.yaml @@ -1,7 +1,4 @@ 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 index 5a6004103f..d13017a2d2 100644 --- a/api/openapi/generators/core_server.cfg.yaml +++ b/api/openapi/generators/core_server.cfg.yaml @@ -3,7 +3,10 @@ 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 +additional-imports: + - package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types + alias: . +output: api/golang/http_rest/core_rest_api/api_container_server.gen.go +output-options: + include-tags: + - enclave diff --git a/api/openapi/generators/engine_server.cfg.yaml b/api/openapi/generators/engine_server.cfg.yaml index 911a2f5467..4111bf6914 100644 --- a/api/openapi/generators/engine_server.cfg.yaml +++ b/api/openapi/generators/engine_server.cfg.yaml @@ -3,7 +3,10 @@ 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 +additional-imports: + - package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types + alias: . +output: api/golang/http_rest/engine_rest_api/engine_server.gen.go +output-options: + include-tags: + - engine diff --git a/api/openapi/generators/websocket_server.cfg.yaml b/api/openapi/generators/websocket_server.cfg.yaml index cba2dd4142..24faafe384 100644 --- a/api/openapi/generators/websocket_server.cfg.yaml +++ b/api/openapi/generators/websocket_server.cfg.yaml @@ -3,7 +3,10 @@ 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 +additional-imports: + - package: github.com/kurtosis-tech/kurtosis/api/golang/http_rest/api_types + alias: . +output: api/golang/http_rest/websocket_api/websocket_server.gen.go +output-options: + include-tags: + - streaming diff --git a/api/openapi/scripts/build.sh b/api/openapi/scripts/build.sh index 1e3ae859b9..fd7907fa86 100755 --- a/api/openapi/scripts/build.sh +++ b/api/openapi/scripts/build.sh @@ -6,9 +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/generators/api_types.cfg.yaml" "$api_root_dirpath/specs/api_types.yaml" +oapi-codegen --config="$api_root_dirpath/generators/api_types.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml" echo "Generating server code for REST API " -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 +oapi-codegen --config="$api_root_dirpath/generators/engine_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml" +oapi-codegen --config="$api_root_dirpath/generators/core_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml" +oapi-codegen --config="$api_root_dirpath/generators/websocket_server.cfg.yaml" "$api_root_dirpath/specs/kurtosis_api.yaml" \ No newline at end of file diff --git a/api/openapi/specs/core_service.yaml b/api/openapi/specs/core_service.yaml deleted file mode 100644 index bdfdad7a97..0000000000 --- a/api/openapi/specs/core_service.yaml +++ /dev/null @@ -1,321 +0,0 @@ -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' - - $ref: './api_types.yaml#/components/parameters/retrieve_logs_async' - 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/json: - schema: - $ref: "./api_types.yaml#/components/schemas/StarlarkRunResponse" - - /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' - - $ref: './api_types.yaml#/components/parameters/retrieve_logs_async' - 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/json: - schema: - $ref: "./api_types.yaml#/components/schemas/StarlarkRunResponse" - - /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 deleted file mode 100644 index 4b9c517f88..0000000000 --- a/api/openapi/specs/engine_service.yaml +++ /dev/null @@ -1,149 +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: './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/api_types.yaml b/api/openapi/specs/kurtosis_api.yaml similarity index 56% rename from api/openapi/specs/api_types.yaml rename to api/openapi/specs/kurtosis_api.yaml index 91c21a4c65..4000caf05b 100644 --- a/api/openapi/specs/api_types.yaml +++ b/api/openapi/specs/kurtosis_api.yaml @@ -1,10 +1,571 @@ openapi: 3.0.0 info: - title: API Types + title: Kurtosis REST API version: 0.1.0 -paths: {} # Specs for types only +paths: + + # ========================================================================================================================= + # ========================================================================================================================= + # > > > > > > > > > > > > > > > > > > > > > > > > Engine API < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < + # ========================================================================================================================= + # ========================================================================================================================= + + /engine/info: + get: + tags: + - engine + summary: Get Engine Info + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + content: + application/json: + schema: + $ref: '#/components/schemas/EngineInfo' + + /enclaves: + get: + tags: + - engine + 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: + tags: + - engine + 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: + tags: + - engine + 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: + tags: + - engine + 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: + tags: + - engine + 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: + tags: + - engine + summary: Destroy Enclave + parameters: + - $ref: '#/components/parameters/enclave_identifier' + responses: + default: + $ref: '#/components/responses/NotOk' + '200': + description: Successful response + + /enclaves/{enclave_identifier}/status: + get: + tags: + - engine + 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: + tags: + - engine + 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 + + # ========================================================================================================================= + # ========================================================================================================================= + # > > > > > > > > > > > > > > > > > > > > > > > > Enclave API < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < + # ========================================================================================================================= + # ========================================================================================================================= + + /enclaves/{enclave_identifier}/starlark: + get: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + description: Executes a Starlark script on the user's behalf + parameters: + - $ref: '#/components/parameters/enclave_identifier' + - $ref: '#/components/parameters/package_id' + - $ref: '#/components/parameters/retrieve_logs_async' + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RunStarlarkPackage" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "#/components/schemas/StarlarkRunResponse" + + /enclaves/{enclave_identifier}/starlark/scripts: + post: + tags: + - enclave + description: Executes a Starlark script on the user's behalf + parameters: + - $ref: '#/components/parameters/enclave_identifier' + - $ref: '#/components/parameters/retrieve_logs_async' + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/RunStarlarkScript" + required: true + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + $ref: "#/components/schemas/StarlarkRunResponse" + + /enclaves/{enclave_identifier}/services/{service_identifier}: + get: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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: + tags: + - enclave + 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 + + # ========================================================================================================================= + # ========================================================================================================================= + # > > > > > > > > > > > > > > > > > > > > > > > > Websocket API < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < + # ========================================================================================================================= + # ========================================================================================================================= + + /enclaves/{enclave_identifier}/logs: + get: + tags: + - streaming + 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_identifier}/logs: + get: + tags: + - streaming + summary: Get Service Logs + parameters: + - $ref: "#/components/parameters/enclave_identifier" + - $ref: "#/components/parameters/service_identifier" + - $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}/starlark/executions/{starlark_execution_uuid}/logs: + get: + tags: + - streaming + description: Executes a Starlark script on the user's behalf + parameters: + - $ref: '#/components/parameters/enclave_identifier' + - $ref: '#/components/parameters/starlark_execution_uuid' + responses: + default: + $ref: '#/components/responses/NotOk' + "200": + description: Successful request + content: + application/json: + schema: + type: array + items: + $ref: "#/components/schemas/StarlarkRunResponseLine" + # ========================================================================================================================= # ========================================================================================================================= @@ -14,6 +575,16 @@ paths: {} # Specs for types only components: + responses: + + NotOk: + description: Unexpected error + content: + application/json: + schema: + $ref: '#/components/schemas/ResponseInfo' + required: true + requestBodies: fileUploadBody: diff --git a/api/openapi/specs/websocket_service.yaml b/api/openapi/specs/websocket_service.yaml deleted file mode 100644 index 2bc0ed6200..0000000000 --- a/api/openapi/specs/websocket_service.yaml +++ /dev/null @@ -1,72 +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: "./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" - - /enclaves/{enclave_identifier}/starlark/executions/{starlark_execution_uuid}/logs: - get: - 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/starlark_execution_uuid' - responses: - default: - $ref: '#/components/responses/NotOk' - "200": - description: Successful request - content: - application/json: - schema: - type: array - items: - $ref: "./api_types.yaml#/components/schemas/StarlarkRunResponseLine" - -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/engine/server/engine/server/websocket_api_handler.go b/engine/server/engine/server/websocket_api_handler.go index 45269a0ece..be7a130566 100644 --- a/engine/server/engine/server/websocket_api_handler.go +++ b/engine/server/engine/server/websocket_api_handler.go @@ -21,7 +21,6 @@ import ( "golang.org/x/net/websocket" 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 { @@ -63,7 +62,7 @@ type LogStreamer struct { notFoundServiceUuids []string } -func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, params api.GetEnclavesEnclaveIdentifierLogsParams) error { +func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, params api_type.GetEnclavesEnclaveIdentifierLogsParams) error { streamer, err := engine.getLogStreamer( ctx, enclaveIdentifier, @@ -86,7 +85,7 @@ func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierLogs(ctx echo.Context } -func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, serviceIdentifier api_type.ServiceIdentifier, params api.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error { +func (engine WebSocketRuntime) GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogs(ctx echo.Context, enclaveIdentifier api_type.EnclaveIdentifier, serviceIdentifier api_type.ServiceIdentifier, params api_type.GetEnclavesEnclaveIdentifierServicesServiceIdentifierLogsParams) error { serviceUuidStrSet := []user_service.ServiceUUID{user_service.ServiceUUID(serviceIdentifier)} streamer, err := engine.getLogStreamer( ctx,