Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTPErrorHandler ¶
func NewHTTPErrorHandler() echo.HTTPErrorHandler
NewHTTPErrorHandler returns a custom echo.HTTPErrorHandler that renders framework-level errors (404, 405, etc.) in the unified ErrorResponse format.
Types ¶
type ErrorCode ¶
type ErrorCode string
ErrorCode is a typed string for structured error codes.
const ( CodeInvalidRequestBody ErrorCode = "INVALID_REQUEST_BODY" CodeValidationError ErrorCode = "VALIDATION_ERROR" CodeInternalError ErrorCode = "INTERNAL_ERROR" CodeExecutionTimeout ErrorCode = "EXECUTION_TIMEOUT" CodeNotFound ErrorCode = "NOT_FOUND" CodeMethodNotAllowed ErrorCode = "METHOD_NOT_ALLOWED" CodeRequestBodyTooLarge ErrorCode = "REQUEST_BODY_TOO_LARGE" CodeQueueFull ErrorCode = "QUEUE_FULL" CodeQueueTimeout ErrorCode = "QUEUE_TIMEOUT" )
type ErrorResponse ¶
type ErrorResponse struct {
Code ErrorCode `json:"code"`
Message string `json:"message"`
Errors []ValidationError `json:"errors,omitempty"`
}
ErrorResponse is the unified JSON error response body.
type File ¶
File represents a single source file in the run request. The first file in the request's Files array is used as the entrypoint.
type RunRequest ¶
RunRequest is the JSON request body for POST /v1/run.
type RunResponse ¶
type RunResponse struct {
Compile *sandbox.Result `json:"compile"`
Run *sandbox.Result `json:"run"`
}
RunResponse is the JSON response for POST /v1/run. Compile is nil for interpreted runtimes. Run is nil when compilation fails.
type ValidationError ¶
ValidationError describes a field-level validation failure.
Click to show internal directories.
Click to hide internal directories.