github.com/kubeshop/testkube@v1.17.23/pkg/tcl/cloudtcl/data/testworkflow/execution_models.go (about)

     1  // Copyright 2024 Testkube.
     2  //
     3  // Licensed as a Testkube Pro file under the Testkube Community
     4  // License (the "License"); you may not use this file except in compliance with
     5  // the License. You may obtain a copy of the License at
     6  //
     7  //	https://github.com/kubeshop/testkube/blob/main/licenses/TCL.txt
     8  
     9  package testworkflow
    10  
    11  import (
    12  	"github.com/kubeshop/testkube/pkg/api/v1/testkube"
    13  	"github.com/kubeshop/testkube/pkg/tcl/repositorytcl/testworkflow"
    14  )
    15  
    16  type ExecutionGetRequest struct {
    17  	ID string `json:"id"`
    18  }
    19  
    20  type ExecutionGetResponse struct {
    21  	WorkflowExecution testkube.TestWorkflowExecution `json:"workflowExecution"`
    22  }
    23  
    24  type ExecutionGetByNameAndWorkflowRequest struct {
    25  	Name         string `json:"name"`
    26  	WorkflowName string `json:"workflowName"`
    27  }
    28  
    29  type ExecutionGetByNameAndWorkflowResponse struct {
    30  	WorkflowExecution testkube.TestWorkflowExecution `json:"workflowExecution"`
    31  }
    32  
    33  type ExecutionGetLatestByWorkflowRequest struct {
    34  	WorkflowName string `json:"workflowName"`
    35  }
    36  
    37  type ExecutionGetLatestByWorkflowResponse struct {
    38  	WorkflowExecution *testkube.TestWorkflowExecution `json:"workflowExecution"`
    39  }
    40  
    41  type ExecutionGetRunningRequest struct {
    42  }
    43  
    44  type ExecutionGetRunningResponse struct {
    45  	WorkflowExecutions []testkube.TestWorkflowExecution `json:"workflowExecutions"`
    46  }
    47  
    48  type ExecutionGetLatestByWorkflowsRequest struct {
    49  	WorkflowNames []string `json:"workflowNames"`
    50  }
    51  
    52  type ExecutionGetLatestByWorkflowsResponse struct {
    53  	WorkflowExecutions []testkube.TestWorkflowExecutionSummary `json:"workflowExecutions"`
    54  }
    55  
    56  type ExecutionGetExecutionTotalsRequest struct {
    57  	Filter []*testworkflow.FilterImpl `json:"filter"`
    58  }
    59  
    60  type ExecutionGetExecutionTotalsResponse struct {
    61  	Totals testkube.ExecutionsTotals `json:"totals"`
    62  }
    63  
    64  type ExecutionGetExecutionsRequest struct {
    65  	Filter *testworkflow.FilterImpl `json:"filter"`
    66  }
    67  
    68  type ExecutionGetExecutionsResponse struct {
    69  	WorkflowExecutions []testkube.TestWorkflowExecution `json:"workflowExecutions"`
    70  }
    71  
    72  type ExecutionGetExecutionsSummaryRequest struct {
    73  	Filter *testworkflow.FilterImpl `json:"filter"`
    74  }
    75  
    76  type ExecutionGetExecutionsSummaryResponse struct {
    77  	WorkflowExecutions []testkube.TestWorkflowExecutionSummary `json:"workflowExecutions"`
    78  }
    79  
    80  type ExecutionInsertRequest struct {
    81  	WorkflowExecution testkube.TestWorkflowExecution `json:"workflowExecution"`
    82  }
    83  
    84  type ExecutionInsertResponse struct {
    85  }
    86  
    87  type ExecutionUpdateRequest struct {
    88  	WorkflowExecution testkube.TestWorkflowExecution `json:"workflowExecution"`
    89  }
    90  
    91  type ExecutionUpdateResponse struct {
    92  }
    93  
    94  type ExecutionUpdateResultRequest struct {
    95  	ID     string                       `json:"id"`
    96  	Result *testkube.TestWorkflowResult `json:"result"`
    97  }
    98  
    99  type ExecutionUpdateResultResponse struct {
   100  }
   101  
   102  type ExecutionUpdateOutputRequest struct {
   103  	ID     string                        `json:"id"`
   104  	Output []testkube.TestWorkflowOutput `json:"output"`
   105  }
   106  
   107  type ExecutionUpdateOutputResponse struct {
   108  }
   109  
   110  type ExecutionDeleteByWorkflowRequest struct {
   111  	WorkflowName string `json:"workflowName"`
   112  }
   113  
   114  type ExecutionDeleteByWorkflowResponse struct {
   115  }
   116  
   117  type ExecutionDeleteAllRequest struct {
   118  }
   119  
   120  type ExecutionDeleteAllResponse struct {
   121  }
   122  
   123  type ExecutionDeleteByWorkflowsRequest struct {
   124  	WorkflowNames []string `json:"workflowNames"`
   125  }
   126  
   127  type ExecutionDeleteByWorkflowsResponse struct {
   128  }
   129  
   130  type ExecutionGetWorkflowMetricsRequest struct {
   131  	Name  string `json:"name"`
   132  	Limit int    `json:"limit"`
   133  	Last  int    `json:"last"`
   134  }
   135  
   136  type ExecutionGetWorkflowMetricsResponse struct {
   137  	Metrics testkube.ExecutionsMetrics `json:"metrics"`
   138  }