Documentation
¶
Index ¶
- Constants
- type AIChatRequest
- type AIChatStartResponse
- type AIConfigResponse
- type AIHandler
- func (h *AIHandler) Chat(w http.ResponseWriter, r *http.Request)
- func (h *AIHandler) GetChatSession(w http.ResponseWriter, r *http.Request)
- func (h *AIHandler) GetConfig(w http.ResponseWriter, _ *http.Request)
- func (h *AIHandler) GetSystemPrompt(w http.ResponseWriter, _ *http.Request)
- func (h *AIHandler) GetUsage(w http.ResponseWriter, r *http.Request)
- func (h *AIHandler) StreamChatSession(w http.ResponseWriter, r *http.Request)
- func (h *AIHandler) ValidateYaml(w http.ResponseWriter, r *http.Request)
- type AIUsageResponse
- type APIHandler
- func (ah *APIHandler) GetClients(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetGlobalVariables(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetLogs(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTaskDescriptor(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTaskDescriptors(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTaskResult(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTest(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRun(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRunDetails(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRunStatus(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRunTaskDetails(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestRuns(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTestYaml(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetTests(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) GetVersion(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestRunCancel(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestRunsDelete(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestRunsSchedule(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestsDelete(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestsRegister(w http.ResponseWriter, r *http.Request)
- func (ah *APIHandler) PostTestsRegisterExternal(w http.ResponseWriter, r *http.Request)
- type ClientResponse
- type GetClientsResponse
- type GetGlobalVariablesResponse
- type GetLogsResponse
- type GetTestResponse
- type GetTestRunDetailedTask
- type GetTestRunDetailedTaskLog
- type GetTestRunDetailsResponse
- type GetTestRunResponse
- type GetTestRunTask
- type GetTestRunTaskResult
- type GetTestRunsResponse
- type GetTestYamlResponse
- type GetTestsResponse
- type GetVersionResponse
- type LogEntry
- type PostTestRunCancelRequest
- type PostTestRunCancelResponse
- type PostTestRunsDeleteRequest
- type PostTestRunsDeleteResponse
- type PostTestRunsScheduleRequest
- type PostTestRunsScheduleResponse
- type PostTestsDeleteRequest
- type PostTestsDeleteResponse
- type PostTestsRegisterExternalRequest
- type PostTestsRegisterExternalResponse
- type PostTestsRegisterRequest
- type PostTestsRegisterResponse
- type Response
- type SystemPromptResponse
- type ValidateYamlRequest
Constants ¶
const ( TaskStatusPending = "pending" TaskStatusRunning = "running" TaskStatusComplete = "complete" )
Task status constants
const ( TaskResultNone = "none" TaskResultSuccess = "success" TaskResultFailure = "failure" )
Task result constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AIChatRequest ¶
type AIChatRequest struct {
Model string `json:"model"`
Messages []ai.ChatMessage `json:"messages"`
TestName string `json:"testName"`
CurrentYaml string `json:"currentYaml,omitempty"`
}
AIChatRequest is the request body for Chat endpoint.
type AIChatStartResponse ¶
type AIChatStartResponse struct {
SessionID string `json:"sessionId"`
}
AIChatStartResponse is the response for starting a chat session.
type AIConfigResponse ¶
type AIConfigResponse struct {
Enabled bool `json:"enabled"`
DefaultModel string `json:"defaultModel"`
AllowedModels []string `json:"allowedModels"`
ServerKeyConfigured bool `json:"serverKeyConfigured"`
}
AIConfigResponse is the response for GetConfig endpoint.
type AIHandler ¶
type AIHandler struct {
// contains filtered or unexported fields
}
AIHandler handles AI-related API endpoints.
func NewAIHandler ¶
func NewAIHandler( config *types.AIConfig, database *db.Database, logger logrus.FieldLogger, authHandler *auth.Handler, disableAuth bool, ) *AIHandler
NewAIHandler creates a new AI handler.
func (*AIHandler) Chat ¶
func (h *AIHandler) Chat(w http.ResponseWriter, r *http.Request)
Chat starts an AI chat session and returns the session ID. POST /api/v1/ai/chat
func (*AIHandler) GetChatSession ¶
func (h *AIHandler) GetChatSession(w http.ResponseWriter, r *http.Request)
GetChatSession returns the current state of a chat session. GET /api/v1/ai/chat/{sessionId}
func (*AIHandler) GetConfig ¶
func (h *AIHandler) GetConfig(w http.ResponseWriter, _ *http.Request)
GetConfig returns AI configuration (enabled, available models). GET /api/v1/ai/config
func (*AIHandler) GetSystemPrompt ¶
func (h *AIHandler) GetSystemPrompt(w http.ResponseWriter, _ *http.Request)
GetSystemPrompt returns the AI system prompt text. GET /api/v1/ai/system_prompt
func (*AIHandler) GetUsage ¶
func (h *AIHandler) GetUsage(w http.ResponseWriter, r *http.Request)
GetUsage returns token usage statistics. GET /api/v1/ai/usage
func (*AIHandler) StreamChatSession ¶
func (h *AIHandler) StreamChatSession(w http.ResponseWriter, r *http.Request)
StreamChatSession streams updates for a chat session using SSE. GET /api/v1/ai/chat/{sessionId}/stream
func (*AIHandler) ValidateYaml ¶
func (h *AIHandler) ValidateYaml(w http.ResponseWriter, r *http.Request)
ValidateYaml validates AI-generated YAML and returns validation results. POST /api/v1/ai/validate
type AIUsageResponse ¶
type AIUsageResponse struct {
LastDay *db.AIUsageStats `json:"lastDay"`
LastMonth *db.AIUsageStats `json:"lastMonth"`
}
AIUsageResponse is the response for GetUsage endpoint.
type APIHandler ¶
type APIHandler struct {
// contains filtered or unexported fields
}
func NewAPIHandler ¶
func NewAPIHandler(logger logrus.FieldLogger, coordinator types.Coordinator, authHandler *auth.Handler, disableAuth bool) *APIHandler
func (*APIHandler) GetClients ¶
func (ah *APIHandler) GetClients(w http.ResponseWriter, r *http.Request)
GetClients godoc @Id getClients @Summary Get list of configured clients @Tags Client @Description Returns the list of configured consensus and execution layer clients with their current status. @Produce json @Success 200 {object} Response{data=GetClientsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/clients [get]
func (*APIHandler) GetGlobalVariables ¶
func (ah *APIHandler) GetGlobalVariables(w http.ResponseWriter, r *http.Request)
GetGlobalVariables godoc @Id getGlobalVariables @Summary Get global variable names @Tags Config @Description Returns the names of all configured global variables. Values are not included as they may contain sensitive data. @Produce json @Success 200 {object} Response{data=GetGlobalVariablesResponse} "Success" @Failure 401 {object} Response "Unauthorized" @Router /api/v1/global_variables [get]
func (*APIHandler) GetLogs ¶
func (ah *APIHandler) GetLogs(w http.ResponseWriter, r *http.Request)
GetLogs godoc @Summary Get application logs @Description Returns application-level logs from the coordinator. Protected endpoint - requires authentication unless auth is disabled. @Tags Logs @Produce json @Param since path string true "Log index to start from (0 for all)" @Success 200 {object} Response{data=GetLogsResponse} "Success" @Failure 401 {object} Response "Unauthorized" @Failure 500 {object} Response "Server Error" @Router /api/v1/logs/{since} [get]
func (*APIHandler) GetTaskDescriptor ¶
func (ah *APIHandler) GetTaskDescriptor(w http.ResponseWriter, r *http.Request)
GetTaskDescriptor godoc @Summary Get a specific task descriptor @Description Returns a single task descriptor by name with its JSON schema @Tags Task @Produce json @Param name path string true "Task name" @Success 200 {object} Response{data=tasks.TaskDescriptorAPI} @Failure 404 {object} Response @Router /api/v1/task_descriptor/{name} [get]
func (*APIHandler) GetTaskDescriptors ¶
func (ah *APIHandler) GetTaskDescriptors(w http.ResponseWriter, r *http.Request)
GetTaskDescriptors godoc @Summary Get all task descriptors @Description Returns a list of all available task descriptors with their JSON schemas @Tags Task @Produce json @Success 200 {object} Response{data=[]tasks.TaskDescriptorAPI} @Router /api/v1/task_descriptors [get]
func (*APIHandler) GetTaskResult ¶
func (ah *APIHandler) GetTaskResult(w http.ResponseWriter, r *http.Request)
GetTaskResult godoc @Id getTaskResult @Summary Get task result file @Tags TestRun @Description Returns a specific result file from a task. Requires authentication as results may contain sensitive data. @Produce octet-stream @Param runId path string true "ID of the test run" @Param taskId path string true "ID of the task" @Param resultType path string true "Type of file to return (summary, result, ...)" @Param fileId path string true "Index or name of the result file" @Success 200 {file} binary "Success" @Failure 400 {object} Response "Bad Request" @Failure 401 {object} Response "Unauthorized" @Failure 404 {object} Response "Not Found" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/task/{taskIndex}/result/{resultType}/{fileId} [get]
func (*APIHandler) GetTest ¶
func (ah *APIHandler) GetTest(w http.ResponseWriter, r *http.Request)
GetTest godoc @Id getTest @Summary Get test definition by test ID @Tags Test @Description Returns the test definition with given ID. @Produce json @Param testId path string true "ID of the test definition to get details for" @Success 200 {object} Response{data=GetTestResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test/{testId} [get]
func (*APIHandler) GetTestRun ¶
func (ah *APIHandler) GetTestRun(w http.ResponseWriter, r *http.Request)
GetTestRun godoc @Id getTestRun @Summary Get test run by run ID @Tags TestRun @Description Returns the run details with given ID. Includes a summary and a list of task with limited details @Produce json @Param runId path string true "ID of the test run to get details for" @Success 200 {object} Response{data=GetTestRunResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId} [get]
func (*APIHandler) GetTestRunDetails ¶
func (ah *APIHandler) GetTestRunDetails(w http.ResponseWriter, r *http.Request)
GetTestRunDetails godoc @Id getTestRunDetails @Summary Get detailed test run by run ID @Tags TestRun @Description Returns the run details with given ID. Includes a summary and a list of task with all details (incl. logs & task configurations) @Produce json @Param runId path string true "ID of the test run to get details for" @Success 200 {object} Response{data=GetTestRunDetailsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/details [get]
func (*APIHandler) GetTestRunStatus ¶
func (ah *APIHandler) GetTestRunStatus(w http.ResponseWriter, r *http.Request)
GetTestRunStatus godoc @Id getTestRunStatus @Summary Get test run status by run ID @Tags TestRun @Description Returns the run status with given ID. @Produce json @Param runId path string true "ID of the test run to get the status for" @Success 200 {object} Response{data=string} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/status [get]
func (*APIHandler) GetTestRunTaskDetails ¶
func (ah *APIHandler) GetTestRunTaskDetails(w http.ResponseWriter, r *http.Request)
GetTestRunTaskDetails godoc @Id getTestRunTaskDetails @Summary Get detailed task of a given test run @Tags TestRun @Description Returns the task details with given run ID and task index. Includes full log, configuration and result variables (unless security trimmed). @Produce json @Param runId path string true "ID of the test run" @Param taskIndex path string true "Index of the task to get details for" @Success 200 {object} Response{data=GetTestRunDetailedTask} "Success" @Failure 400 {object} Response "Bad Request" @Failure 404 {object} Response "Not Found" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/task/{taskIndex}/details [get]
func (*APIHandler) GetTestRuns ¶
func (ah *APIHandler) GetTestRuns(w http.ResponseWriter, r *http.Request)
GetTestRuns godoc @Id getTestRuns @Summary Get list of test runs @Tags TestRun @Description Returns a list of all test runs. @Produce json @Param test_id query string false "Return test runs for this test ID only" @Success 200 {object} Response{data=[]GetTestRunsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_runs [get]
func (*APIHandler) GetTestYaml ¶
func (ah *APIHandler) GetTestYaml(w http.ResponseWriter, r *http.Request)
GetTestYaml godoc @Id getTestYaml @Summary Get test YAML source by test ID @Tags Test @Description Returns the full YAML source for a test definition. For API-registered tests, returns the stored YAML. For external tests referenced by file/URL, loads and returns the content from the original source. Requires authentication as YAML may contain sensitive configuration. @Produce json @Param testId path string true "ID of the test definition to get YAML for" @Success 200 {object} Response{data=GetTestYamlResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 401 {object} Response "Unauthorized" @Failure 404 {object} Response "Not Found" @Failure 500 {object} Response "Server Error" @Router /api/v1/test/{testId}/yaml [get]
func (*APIHandler) GetTests ¶
func (ah *APIHandler) GetTests(w http.ResponseWriter, r *http.Request)
GetTests godoc @Id getTests @Summary Get list of test definitions @Tags Test @Description Returns the list of test definitions. These test definitions can be used to create new test runs and are supplied via the assertoor configuration. @Produce json @Success 200 {object} Response{data=[]GetTestsResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/tests [get]
func (*APIHandler) GetVersion ¶ added in v0.1.1
func (ah *APIHandler) GetVersion(w http.ResponseWriter, r *http.Request)
GetVersion godoc @Id getVersion @Summary Get build version information @Tags Config @Description Returns the build version (commit hash) and release of the running Assertoor binary. @Produce json @Success 200 {object} Response{data=GetVersionResponse} "Success" @Router /api/v1/version [get]
func (*APIHandler) PostTestRunCancel ¶
func (ah *APIHandler) PostTestRunCancel(w http.ResponseWriter, r *http.Request)
PostTestRunCancel godoc @Id postTestRunCancel @Summary Cancel test run by test ID @Tags TestRun @Description Returns the test/run id & status of the cancelled test. @Produce json @Param runId path string true "ID of the test run to cancel" @Param cancelOptions body PostTestRunCancelRequest true "Test cancellation options" @Success 200 {object} Response{data=PostTestRunCancelResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_run/{runId}/cancel [post]
func (*APIHandler) PostTestRunsDelete ¶
func (ah *APIHandler) PostTestRunsDelete(w http.ResponseWriter, r *http.Request)
PostTestRunsDelete godoc @Id postTestRunsDelete @Summary Delete test runs @Tags TestRun @Description Deletes test runs @Produce json @Accept json,application/yaml @Param testConfig body PostTestRunsDeleteRequest true "Test configuration (json or yaml)" @Success 200 {object} Response{data=PostTestRunsDeleteResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_runs/delete [post]
func (*APIHandler) PostTestRunsSchedule ¶
func (ah *APIHandler) PostTestRunsSchedule(w http.ResponseWriter, r *http.Request)
PostTestRunsSchedule godoc @Id postTestRunsSchedule @Summary Schedule new test run by test ID @Tags TestRun @Description Returns the test & run id of the scheduled test execution. @Produce json @Param runOptions body PostTestRunsScheduleRequest true "Rest run options" @Success 200 {object} Response{data=PostTestRunsScheduleResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/test_runs/schedule [post]
func (*APIHandler) PostTestsDelete ¶
func (ah *APIHandler) PostTestsDelete(w http.ResponseWriter, r *http.Request)
PostTestsDelete godoc @Id postTestsDelete @Summary Delete tests @Tags Test @Description Deletes tests @Produce json @Accept json,application/yaml @Param testConfig body PostTestsDeleteRequest true "Test configuration (json or yaml)" @Success 200 {object} Response{data=PostTestsDeleteResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/tests/delete [post]
func (*APIHandler) PostTestsRegister ¶
func (ah *APIHandler) PostTestsRegister(w http.ResponseWriter, r *http.Request)
PostTestsRegister godoc @Id postTestsRegister @Summary Register new test via yaml configuration @Tags Test @Description Returns the test id and name of the added test. @Produce json @Accept json,application/yaml @Param testConfig body PostTestsRegisterRequest true "Test configuration (json or yaml)" @Success 200 {object} Response{data=PostTestsRegisterResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/tests/register [post]
func (*APIHandler) PostTestsRegisterExternal ¶
func (ah *APIHandler) PostTestsRegisterExternal(w http.ResponseWriter, r *http.Request)
PostTestsRegisterExternal godoc @Id postTestsRegisterExternal @Summary Register new test via external test configuration @Tags Test @Description Returns the test id and name of the added test. @Produce json @Accept json @Param externalTestConfig body PostTestsRegisterExternalRequest true "Test configuration (json or yaml)" @Success 200 {object} Response{data=PostTestsRegisterExternalResponse} "Success" @Failure 400 {object} Response "Failure" @Failure 500 {object} Response "Server Error" @Router /api/v1/tests/register_external [post]
type ClientResponse ¶
type ClientResponse struct {
Index int `json:"index"`
Name string `json:"name"`
CLVersion string `json:"cl_version"`
CLType int64 `json:"cl_type"`
CLHeadSlot uint64 `json:"cl_head_slot"`
CLHeadRoot string `json:"cl_head_root"`
CLStatus string `json:"cl_status"`
CLLastRefresh string `json:"cl_refresh"`
CLLastError string `json:"cl_error"`
CLIsReady bool `json:"cl_ready"`
ELVersion string `json:"el_version"`
ELType int64 `json:"el_type"`
ELHeadNumber uint64 `json:"el_head_number"`
ELHeadHash string `json:"el_head_hash"`
ELStatus string `json:"el_status"`
ELLastRefresh string `json:"el_refresh"`
ELLastError string `json:"el_error"`
ELIsReady bool `json:"el_ready"`
}
type GetClientsResponse ¶
type GetClientsResponse struct {
Clients []*ClientResponse `json:"clients"`
ClientCount int `json:"client_count"`
}
type GetGlobalVariablesResponse ¶
type GetGlobalVariablesResponse struct {
Names []string `json:"names"`
}
GetGlobalVariablesResponse contains the names of all configured global variables.
type GetLogsResponse ¶
type GetLogsResponse struct {
Log []*LogEntry `json:"log"`
}
type GetTestResponse ¶
type GetTestResponse struct {
ID string `json:"id"`
Source string `json:"source"`
BasePath string `json:"basePath"`
Name string `json:"name"`
Timeout uint64 `json:"timeout"`
Config map[string]any `json:"config"`
ConfigVars map[string]string `json:"configVars"`
Schedule *types.TestSchedule `json:"schedule"`
Vars map[string]any `json:"vars,omitempty"` // Config with global vars merged in
}
type GetTestRunDetailedTask ¶
type GetTestRunDetailedTask struct {
Index uint64 `json:"index"`
ParentIndex uint64 `json:"parent_index"`
Name string `json:"name"`
Title string `json:"title"`
Started bool `json:"started"`
Completed bool `json:"completed"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Timeout uint64 `json:"timeout"`
RunTime uint64 `json:"runtime"`
Status string `json:"status"`
Result string `json:"result"`
ResultError string `json:"result_error"`
RunConcurrent bool `json:"run_concurrent,omitempty"`
Progress float64 `json:"progress"`
ProgressMessage string `json:"progress_message"`
Log []*GetTestRunDetailedTaskLog `json:"log"`
ConfigYaml string `json:"config_yaml"`
ResultYaml string `json:"result_yaml"`
}
type GetTestRunDetailsResponse ¶
type GetTestRunDetailsResponse struct {
RunID uint64 `json:"run_id"`
TestID string `json:"test_id"`
Name string `json:"name"`
Status types.TestStatus `json:"status"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Tasks []*GetTestRunDetailedTask `json:"tasks"`
}
type GetTestRunResponse ¶
type GetTestRunResponse struct {
RunID uint64 `json:"run_id"`
TestID string `json:"test_id"`
Name string `json:"name"`
Status types.TestStatus `json:"status"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Tasks []*GetTestRunTask `json:"tasks"`
}
type GetTestRunTask ¶
type GetTestRunTask struct {
Index uint64 `json:"index"`
ParentIndex uint64 `json:"parent_index"`
Name string `json:"name"`
Title string `json:"title"`
Started bool `json:"started"`
Completed bool `json:"completed"`
StartTime int64 `json:"start_time"`
StopTime int64 `json:"stop_time"`
Timeout uint64 `json:"timeout"`
RunTime uint64 `json:"runtime"`
Status string `json:"status"`
Result string `json:"result"`
ResultFiles []GetTestRunTaskResult `json:"result_files"`
ResultError string `json:"result_error"`
RunConcurrent bool `json:"run_concurrent,omitempty"`
}
type GetTestRunTaskResult ¶
type GetTestRunsResponse ¶
type GetTestYamlResponse ¶
type GetTestsResponse ¶
type GetVersionResponse ¶ added in v0.1.1
GetVersionResponse contains build version information for the running Assertoor binary.
type PostTestRunsDeleteRequest ¶
type PostTestRunsDeleteRequest struct {
TestRuns []uint64 `json:"test_runs"`
}
type PostTestsDeleteRequest ¶
type PostTestsDeleteRequest struct {
Tests []string `json:"tests"`
}
type PostTestsDeleteResponse ¶
type PostTestsRegisterExternalRequest ¶
type PostTestsRegisterExternalRequest struct {
File string `yaml:"file" json:"file"`
Name string `yaml:"name" json:"name,omitempty"`
Timeout uint64 `yaml:"timeout" json:"timeout,omitempty"`
Config map[string]interface{} `yaml:"config" json:"config,omitempty"`
ConfigVars map[string]string `yaml:"configVars" json:"configVars,omitempty"`
Schedule *types.TestSchedule `yaml:"schedule" json:"schedule,omitempty"`
}
type PostTestsRegisterRequest ¶
type PostTestsRegisterRequest struct {
ID string `yaml:"id" json:"id"`
Name string `yaml:"name" json:"name"`
Timeout string `yaml:"timeout" json:"timeout"`
Config map[string]interface{} `yaml:"config" json:"config"`
ConfigVars map[string]string `yaml:"configVars" json:"configVars"`
Tasks []helper.RawMessage `yaml:"tasks" json:"tasks"`
CleanupTasks []helper.RawMessage `yaml:"cleanupTasks" json:"cleanupTasks"`
Schedule *types.TestSchedule `yaml:"schedule" json:"schedule"`
}
type SystemPromptResponse ¶
type SystemPromptResponse struct {
Prompt string `json:"prompt"`
}
SystemPromptResponse is the response for GetSystemPrompt endpoint.
type ValidateYamlRequest ¶
type ValidateYamlRequest struct {
Yaml string `json:"yaml"`
}
ValidateYamlRequest is the request body for ValidateYaml endpoint.
Source Files
¶
- ai_handler.go
- constants.go
- get_clients_api.go
- get_global_variables_api.go
- get_logs_api.go
- get_task_descriptors_api.go
- get_task_details_api.go
- get_task_result_api.go
- get_test_api.go
- get_test_run_api.go
- get_test_run_details_api.go
- get_test_run_status_api.go
- get_test_runs_api.go
- get_test_yaml_api.go
- get_tests_api.go
- get_version_api.go
- handler.go
- log_level.go
- post_test_run_api.go
- post_test_run_cancel_api.go
- post_test_runs_delete_api.go
- post_tests_delete_api.go
- post_tests_register_api.go
- post_tests_register_external_api.go