github.com/kubeshop/testkube@v1.17.23/pkg/cloud/data/testresult/testresult_models.go (about) 1 package testresult 2 3 import ( 4 "time" 5 6 "github.com/kubeshop/testkube/pkg/api/v1/testkube" 7 "github.com/kubeshop/testkube/pkg/repository/testresult" 8 ) 9 10 type GetRequest struct { 11 ID string `json:"id"` 12 } 13 14 type GetResponse struct { 15 TestSuiteExecution testkube.TestSuiteExecution `json:"testSuiteExecution"` 16 } 17 18 type GetByNameAndTestSuiteRequest struct { 19 Name string `json:"name"` 20 TestSuiteName string `json:"testSuiteName"` 21 } 22 23 type GetByNameAndTestSuiteResponse struct { 24 TestSuiteExecution testkube.TestSuiteExecution `json:"testSuiteExecution"` 25 } 26 27 type GetLatestByTestSuiteRequest struct { 28 TestSuiteName string `json:"testSuiteName"` 29 SortField string `json:"sortField"` 30 } 31 32 type GetLatestByTestSuiteResponse struct { 33 TestSuiteExecution testkube.TestSuiteExecution `json:"testSuiteExecution"` 34 } 35 36 type GetLatestByTestSuitesRequest struct { 37 TestSuiteNames []string `json:"testSuiteNames"` 38 SortField string `json:"sortField"` 39 } 40 41 type GetLatestByTestSuitesResponse struct { 42 TestSuiteExecutions []testkube.TestSuiteExecution `json:"testSuiteExecutions"` 43 } 44 45 type GetExecutionsTotalsRequest struct { 46 Filter []*testresult.FilterImpl `json:"filter"` 47 } 48 49 type GetExecutionsTotalsResponse struct { 50 ExecutionsTotals testkube.ExecutionsTotals `json:"executionsTotals"` 51 } 52 53 type GetExecutionsRequest struct { 54 Filter *testresult.FilterImpl `json:"filter"` 55 } 56 57 type GetExecutionsResponse struct { 58 TestSuiteExecutions []testkube.TestSuiteExecution `json:"testSuiteExecutions"` 59 } 60 61 type InsertRequest struct { 62 TestSuiteExecution testkube.TestSuiteExecution `json:"testSuiteExecution"` 63 } 64 65 type InsertResponse struct{} 66 67 type UpdateRequest struct { 68 TestSuiteExecution testkube.TestSuiteExecution `json:"testSuiteExecution"` 69 } 70 71 type UpdateResponse struct{} 72 73 type StartExecutionRequest struct { 74 ID string `json:"id"` 75 StartTime time.Time `json:"startTime"` 76 } 77 78 type StartExecutionResponse struct { 79 } 80 81 type EndExecutionRequest struct { 82 Execution testkube.TestSuiteExecution `json:"execution"` 83 } 84 85 type EndExecutionResponse struct{} 86 87 type DeleteByTestSuiteRequest struct { 88 TestSuiteName string `json:"testSuiteName"` 89 } 90 91 type DeleteByTestSuiteResponse struct{} 92 93 type DeleteAllTestResultsRequest struct{} 94 95 type DeleteAllTestResultsResponse struct{} 96 97 type DeleteByTestSuitesRequest struct { 98 TestSuiteNames []string `json:"testSuiteNames"` 99 } 100 101 type DeleteByTestSuitesResponse struct{} 102 103 type GetTestSuiteMetricsRequest struct { 104 Name string `json:"name"` 105 Limit int `json:"limit"` 106 Last int `json:"last"` 107 } 108 109 type GetTestSuiteMetricsResponse struct { 110 Metrics testkube.ExecutionsMetrics `json:"metrics"` 111 }