github.com/kubeshop/testkube@v1.17.23/pkg/cloud/data/result/result_models.go (about)

     1  package result
     2  
     3  import (
     4  	"time"
     5  
     6  	"github.com/kubeshop/testkube/pkg/api/v1/testkube"
     7  	"github.com/kubeshop/testkube/pkg/repository/result"
     8  )
     9  
    10  type NextExecutionNumberRequest struct {
    11  	TestName string `json:"testName"`
    12  }
    13  
    14  type NextExecutionNumberResponse struct {
    15  	TestNumber int32 `json:"testNumber"`
    16  }
    17  
    18  type GetRequest struct {
    19  	ID string `json:"id"`
    20  }
    21  
    22  type GetResponse struct {
    23  	Execution testkube.Execution `json:"execution"`
    24  }
    25  
    26  type GetByNameAndTestRequest struct {
    27  	Name     string `json:"name"`
    28  	TestName string `json:"testName"`
    29  }
    30  
    31  type GetByNameAndTestResponse struct {
    32  	Execution testkube.Execution `json:"execution"`
    33  }
    34  
    35  type GetLatestByTestRequest struct {
    36  	TestName  string `json:"testName"`
    37  	SortField string `json:"sortField"`
    38  }
    39  
    40  type GetLatestByTestResponse struct {
    41  	Execution testkube.Execution `json:"execution"`
    42  }
    43  
    44  type GetLatestByTestsRequest struct {
    45  	TestNames []string `json:"testNames"`
    46  	SortField string   `json:"sortField"`
    47  }
    48  
    49  type GetLatestByTestsResponse struct {
    50  	Executions []testkube.Execution `json:"executions"`
    51  }
    52  
    53  type GetExecutionsRequest struct {
    54  	Filter *result.FilterImpl `json:"filter"`
    55  }
    56  
    57  type GetExecutionsResponse struct {
    58  	Executions []testkube.Execution `json:"executions"`
    59  }
    60  
    61  type GetExecutionTotalsRequest struct {
    62  	Paging bool                 `json:"paging"`
    63  	Filter []*result.FilterImpl `json:"filter"`
    64  }
    65  
    66  type GetExecutionTotalsResponse struct {
    67  	Result testkube.ExecutionsTotals `json:"result"`
    68  }
    69  
    70  type InsertRequest struct {
    71  	Result testkube.Execution `json:"result"`
    72  }
    73  
    74  type InsertResponse struct {
    75  }
    76  
    77  type UpdateRequest struct {
    78  	Result testkube.Execution `json:"result"`
    79  }
    80  
    81  type UpdateResponse struct {
    82  }
    83  
    84  type UpdateResultInExecutionRequest struct {
    85  	ID        string             `json:"id"`
    86  	Execution testkube.Execution `json:"execution"`
    87  }
    88  
    89  type UpdateResultInExecutionResponse struct {
    90  }
    91  
    92  type StartExecutionRequest struct {
    93  	ID        string    `json:"id"`
    94  	StartTime time.Time `json:"startTime"`
    95  }
    96  
    97  type StartExecutionResponse struct {
    98  }
    99  
   100  type EndExecutionRequest struct {
   101  	Execution testkube.Execution `json:"execution"`
   102  }
   103  
   104  type EndExecutionResponse struct {
   105  }
   106  
   107  type GetLabelsResponse struct {
   108  	Labels map[string][]string `json:"labels"`
   109  }
   110  
   111  type DeleteByTestRequest struct {
   112  	TestName string `json:"testName"`
   113  }
   114  
   115  type DeleteByTestResponse struct {
   116  }
   117  
   118  type DeleteByTestSuiteRequest struct {
   119  	TestSuiteName string `json:"testSuiteName"`
   120  }
   121  
   122  type DeleteByTestSuiteResponse struct {
   123  }
   124  
   125  type DeleteAllRequest struct{}
   126  
   127  type DeleteAllResponse struct{}
   128  
   129  type DeleteByTestsRequest struct {
   130  	TestNames []string `json:"testNames"`
   131  }
   132  
   133  type DeleteByTestsResponse struct{}
   134  
   135  type DeleteByTestSuitesRequest struct {
   136  	TestSuiteNames []string `json:"testSuiteNames"`
   137  }
   138  
   139  type DeleteByTestSuitesResponse struct{}
   140  
   141  type DeleteForAllTestSuitesResponse struct {
   142  }
   143  
   144  type GetTestMetricsRequest struct {
   145  	Name  string `json:"name"`
   146  	Limit int    `json:"limit"`
   147  	Last  int    `json:"last"`
   148  }
   149  
   150  type GetTestMetricsResponse struct {
   151  	Metrics testkube.ExecutionsMetrics `json:"metrics"`
   152  }