Documentation ¶
Index ¶
- Constants
- func ConfigureClient(client *http.Client, token *oauth2.Token, cloudApiKey string)
- func GetClientSet(overrideHost string) (clientset kubernetes.Interface, err error)
- func StreamToLogsChannel(resp io.Reader, logs chan output.Output)
- func StreamToLogsChannelV2(resp io.Reader, logs chan events.Log)
- type APIClient
- func NewCloudAPIClient(httpClient *http.Client, sseClient *http.Client, apiURI, apiPathPrefix string) APIClient
- func NewDirectAPIClient(httpClient *http.Client, sseClient *http.Client, apiURI, apiPathPrefix string) APIClient
- func NewProxyAPIClient(client kubernetes.Interface, config APIConfig) APIClient
- type APIConfig
- type All
- type ArtifactURL
- type Client
- type ClientType
- type CloudClient
- type ConfigAPI
- type ConfigClient
- type CopyFileAPI
- type CopyFileClient
- type CopyFileDirectClient
- type CopyFileProxyClient
- type CreateTemplateOptions
- type CreateWebhookOptions
- type DirectClient
- func (t DirectClient[A]) Delete(uri, selector string, isContentExpected bool) error
- func (t DirectClient[A]) Execute(method, uri string, body []byte, params map[string]string) (result A, err error)
- func (t DirectClient[A]) ExecuteMethod(method, uri string, selector string, isContentExpected bool) error
- func (t DirectClient[A]) ExecuteMultiple(method, uri string, body []byte, params map[string]string) (result []A, err error)
- func (t DirectClient[A]) GetFile(uri, fileName, destination string, params map[string][]string) (name string, err error)
- func (t DirectClient[A]) GetLogs(uri string, logs chan output.Output) error
- func (t DirectClient[A]) GetLogsV2(uri string, logs chan events.Log) error
- func (t DirectClient[A]) GetURI(pathTemplate string, params ...interface{}) string
- func (t DirectClient[A]) WithSSEClient(client *http.Client) DirectClient[A]
- type Executable
- type ExecuteTestOptions
- type ExecuteTestSuiteOptions
- type ExecutionAPI
- type ExecutorAPI
- type ExecutorClient
- func (c ExecutorClient) CreateExecutor(options UpsertExecutorOptions) (executor testkube.ExecutorDetails, err error)
- func (c ExecutorClient) DeleteExecutor(name string) (err error)
- func (c ExecutorClient) DeleteExecutors(selector string) (err error)
- func (c ExecutorClient) GetExecutor(name string) (executor testkube.ExecutorDetails, err error)
- func (c ExecutorClient) ListExecutors(selector string) (executors testkube.ExecutorsDetails, err error)
- func (c ExecutorClient) UpdateExecutor(options UpdateExecutorOptions) (executor testkube.ExecutorDetails, err error)
- type Gettable
- type MockCopyFileAPI
- type Options
- type ProxyClient
- func (t ProxyClient[A]) Delete(uri, selector string, isContentExpected bool) error
- func (t ProxyClient[A]) Execute(method, uri string, body []byte, params map[string]string) (result A, err error)
- func (t ProxyClient[A]) ExecuteMethod(method, uri string, selector string, isContentExpected bool) error
- func (t ProxyClient[A]) ExecuteMultiple(method, uri string, body []byte, params map[string]string) (result []A, err error)
- func (t ProxyClient[A]) GetFile(uri, fileName, destination string, params map[string][]string) (name string, err error)
- func (t ProxyClient[A]) GetLogs(uri string, logs chan output.Output) error
- func (t ProxyClient[A]) GetLogsV2(uri string, logs chan events.Log) error
- func (t ProxyClient[A]) GetURI(pathTemplate string, params ...interface{}) string
- type ServiceAPI
- type TemplateAPI
- type TemplateClient
- func (c TemplateClient) CreateTemplate(options CreateTemplateOptions) (template testkube.Template, err error)
- func (c TemplateClient) DeleteTemplate(name string) (err error)
- func (c TemplateClient) DeleteTemplates(selector string) (err error)
- func (c TemplateClient) GetTemplate(name string) (template testkube.Template, err error)
- func (c TemplateClient) ListTemplates(selector string) (templates testkube.Templates, err error)
- func (c TemplateClient) UpdateTemplate(options UpdateTemplateOptions) (template testkube.Template, err error)
- type TestAPI
- type TestClient
- func (c TestClient) AbortExecution(testID, id string) error
- func (c TestClient) AbortExecutions(testID string) error
- func (c TestClient) CreateTest(options UpsertTestOptions) (test testkube.Test, err error)
- func (c TestClient) DeleteTest(name string) error
- func (c TestClient) DeleteTests(selector string) error
- func (c TestClient) DownloadArchive(executionID, destination string, masks []string) (archive string, err error)
- func (c TestClient) DownloadFile(executionID, fileName, destination string) (artifact string, err error)
- func (c TestClient) ExecuteTest(id, executionName string, options ExecuteTestOptions) (execution testkube.Execution, err error)
- func (c TestClient) ExecuteTests(selector string, concurrencyLevel int, options ExecuteTestOptions) (executions []testkube.Execution, err error)
- func (c TestClient) GetDebugInfo() (debugInfo testkube.DebugInfo, err error)
- func (c TestClient) GetExecution(executionID string) (execution testkube.Execution, err error)
- func (c TestClient) GetExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error)
- func (c TestClient) GetServerInfo() (info testkube.ServerInfo, err error)
- func (c TestClient) GetTest(id string) (test testkube.Test, err error)
- func (c TestClient) GetTestWithExecution(id string) (test testkube.TestWithExecution, err error)
- func (c TestClient) ListExecutions(id string, limit int, selector string) (executions testkube.ExecutionsResult, err error)
- func (c TestClient) ListTestWithExecutionSummaries(selector string) (testWithExecutionSummaries testkube.TestWithExecutionSummaries, err error)
- func (c TestClient) ListTests(selector string) (tests testkube.Tests, err error)
- func (c TestClient) Logs(id string) (logs chan output.Output, err error)
- func (c TestClient) LogsV2(id string) (logs chan events.Log, err error)
- func (c TestClient) UpdateTest(options UpdateTestOptions) (test testkube.Test, err error)
- type TestSourceAPI
- type TestSourceClient
- func (c TestSourceClient) CreateTestSource(options UpsertTestSourceOptions) (testSource testkube.TestSource, err error)
- func (c TestSourceClient) DeleteTestSource(name string) (err error)
- func (c TestSourceClient) DeleteTestSources(selector string) (err error)
- func (c TestSourceClient) GetTestSource(name string) (testSource testkube.TestSource, err error)
- func (c TestSourceClient) ListTestSources(selector string) (testSources testkube.TestSources, err error)
- func (c TestSourceClient) UpdateTestSource(options UpdateTestSourceOptions) (testSource testkube.TestSource, err error)
- type TestSuiteAPI
- type TestSuiteClient
- func (c TestSuiteClient) AbortTestSuiteExecution(executionID string) error
- func (c TestSuiteClient) AbortTestSuiteExecutions(testSuiteName string) error
- func (c TestSuiteClient) CreateTestSuite(options UpsertTestSuiteOptions) (testSuite testkube.TestSuite, err error)
- func (c TestSuiteClient) DeleteTestSuite(name string) error
- func (c TestSuiteClient) DeleteTestSuites(selector string) error
- func (c TestSuiteClient) ExecuteTestSuite(id, executionName string, options ExecuteTestSuiteOptions) (execution testkube.TestSuiteExecution, err error)
- func (c TestSuiteClient) ExecuteTestSuites(selector string, concurrencyLevel int, options ExecuteTestSuiteOptions) (executions []testkube.TestSuiteExecution, err error)
- func (c TestSuiteClient) GetTestSuite(id string) (testSuite testkube.TestSuite, err error)
- func (c TestSuiteClient) GetTestSuiteExecution(executionID string) (execution testkube.TestSuiteExecution, err error)
- func (c TestSuiteClient) GetTestSuiteExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error)
- func (c TestSuiteClient) GetTestSuiteWithExecution(id string) (test testkube.TestSuiteWithExecution, err error)
- func (c TestSuiteClient) ListTestSuiteExecutions(testID string, limit int, selector string) (executions testkube.TestSuiteExecutionsResult, err error)
- func (c TestSuiteClient) ListTestSuiteWithExecutionSummaries(selector string) (testSuiteWithExecutionSummaries testkube.TestSuiteWithExecutionSummaries, ...)
- func (c TestSuiteClient) ListTestSuites(selector string) (testSuites testkube.TestSuites, err error)
- func (c TestSuiteClient) UpdateTestSuite(options UpdateTestSuiteOptions) (testSuite testkube.TestSuite, err error)
- func (c TestSuiteClient) WatchTestSuiteExecution(executionID string) (respCh chan testkube.WatchTestSuiteExecutionResponse)
- type TestSuiteExecutionAPI
- type TestWorkflowAPI
- type TestWorkflowClient
- func (c TestWorkflowClient) CreateTestWorkflow(workflow testkube.TestWorkflow) (result testkube.TestWorkflow, err error)
- func (c TestWorkflowClient) DeleteTestWorkflow(name string) error
- func (c TestWorkflowClient) DeleteTestWorkflows(selector string) error
- func (c TestWorkflowClient) GetTestWorkflow(id string) (testkube.TestWorkflow, error)
- func (c TestWorkflowClient) ListTestWorkflows(selector string) (testkube.TestWorkflows, error)
- func (c TestWorkflowClient) UpdateTestWorkflow(workflow testkube.TestWorkflow) (result testkube.TestWorkflow, err error)
- type TestWorkflowTemplateAPI
- type TestWorkflowTemplateClient
- func (c TestWorkflowTemplateClient) CreateTestWorkflowTemplate(template testkube.TestWorkflowTemplate) (result testkube.TestWorkflowTemplate, err error)
- func (c TestWorkflowTemplateClient) DeleteTestWorkflowTemplate(name string) error
- func (c TestWorkflowTemplateClient) DeleteTestWorkflowTemplates(selector string) error
- func (c TestWorkflowTemplateClient) GetTestWorkflowTemplate(id string) (testkube.TestWorkflowTemplate, error)
- func (c TestWorkflowTemplateClient) ListTestWorkflowTemplates(selector string) (testkube.TestWorkflowTemplates, error)
- func (c TestWorkflowTemplateClient) UpdateTestWorkflowTemplate(template testkube.TestWorkflowTemplate) (result testkube.TestWorkflowTemplate, err error)
- type TestingType
- type Transport
- type UpdateExecutorOptions
- type UpdateTemplateOptions
- type UpdateTestOptions
- type UpdateTestSourceOptions
- type UpdateTestSuiteOptions
- type UpdateWebhookOptions
- type UpsertExecutorOptions
- type UpsertTestOptions
- type UpsertTestSourceOptions
- type UpsertTestSuiteOptions
- type WebhookAPI
- type WebhookClient
- func (c WebhookClient) CreateWebhook(options CreateWebhookOptions) (webhook testkube.Webhook, err error)
- func (c WebhookClient) DeleteWebhook(name string) (err error)
- func (c WebhookClient) DeleteWebhooks(selector string) (err error)
- func (c WebhookClient) GetWebhook(name string) (webhook testkube.Webhook, err error)
- func (c WebhookClient) ListWebhooks(selector string) (webhooks testkube.Webhooks, err error)
- func (c WebhookClient) UpdateWebhook(options UpdateWebhookOptions) (webhook testkube.Webhook, err error)
Constants ¶
const TestkubeInstallationNamespace = "testkube"
TestkubeInstallationNamespace where Testkube is installed
const Version = "v1"
Version is client version literal
Variables ¶
This section is empty.
Functions ¶
func ConfigureClient ¶ added in v1.8.6
func GetClientSet ¶
func GetClientSet(overrideHost string) (clientset kubernetes.Interface, err error)
GetClientSet configures Kube client set, can override host with local proxy
func StreamToLogsChannel ¶ added in v0.6.5
StreamToLogsChannel converts io.Reader with SSE data like `data: {"type": "event", "message":"something"}` to channel of output.Output objects, helps with logs streaming from SSE endpoint (passed from job executor)
func StreamToLogsChannelV2 ¶ added in v1.16.29
StreamToLogsChannelV2 converts io.Reader with SSE data like `data: {"type": "event", "message":"something"}` to channel of output.Output objects, helps with logs version 2 streaming from SSE endpoint (passed from job executor)
Types ¶
type APIClient ¶ added in v0.10.0
type APIClient struct { TestClient TestSuiteClient ExecutorClient WebhookClient ConfigClient TestSourceClient CopyFileClient TemplateClient TestWorkflowClient TestWorkflowTemplateClient }
APIClient struct managing proxy API Client dependencies
func NewCloudAPIClient ¶ added in v1.16.7
func NewCloudAPIClient(httpClient *http.Client, sseClient *http.Client, apiURI, apiPathPrefix string) APIClient
NewCloudAPIClient returns cloud api client
func NewDirectAPIClient ¶ added in v0.9.5
func NewDirectAPIClient(httpClient *http.Client, sseClient *http.Client, apiURI, apiPathPrefix string) APIClient
NewDirectAPIClient returns direct api client
func NewProxyAPIClient ¶ added in v0.9.5
func NewProxyAPIClient(client kubernetes.Interface, config APIConfig) APIClient
NewProxyAPIClient returns proxy api client
type APIConfig ¶ added in v0.10.2
type APIConfig struct { // Namespace where testkube is installed Namespace string // API Server service name ServiceName string // API Server service port ServicePort int }
func NewAPIConfig ¶ added in v0.10.2
type All ¶ added in v1.1.16
type All interface { Gettable | Executable }
All is an interface of all objects
type ArtifactURL ¶ added in v1.16.7
type ArtifactURL struct { // Download URL for the artifact. URL string `json:"url"` }
type Client ¶
type Client interface { TestAPI ExecutionAPI TestSuiteAPI TestSuiteExecutionAPI ExecutorAPI WebhookAPI ServiceAPI ConfigAPI TestSourceAPI CopyFileAPI TemplateAPI TestWorkflowAPI TestWorkflowTemplateAPI }
Client is the Testkube API client abstraction
type ClientType ¶
type ClientType string
const ( ClientDirect ClientType = "direct" ClientCloud ClientType = "cloud" ClientProxy ClientType = "proxy" )
type CloudClient ¶ added in v1.16.7
type CloudClient[A All] struct { DirectClient[A] // contains filtered or unexported fields }
CLoudClient is almost the same as Direct client, but has different GetFile method which returns a download URL for the artifact instead of downloading it.
func NewCloudClient ¶ added in v1.16.7
func NewCloudClient[A All](httpClient *http.Client, apiURI, apiPathPrefix string) CloudClient[A]
type ConfigAPI ¶ added in v1.2.34
type ConfigAPI interface { UpdateConfig(config testkube.Config) (outputConfig testkube.Config, err error) GetConfig() (config testkube.Config, err error) }
ConfigAPI describes config api methods
type ConfigClient ¶ added in v1.5.15
type ConfigClient struct {
// contains filtered or unexported fields
}
ConfigClient is a client for config
func NewConfigClient ¶ added in v1.5.15
func NewConfigClient(configTransport Transport[testkube.Config]) ConfigClient
NewConfigClient creates new Cnfig client
func (ConfigClient) GetConfig ¶ added in v1.5.15
func (c ConfigClient) GetConfig() (config testkube.Config, err error)
func (ConfigClient) UpdateConfig ¶ added in v1.5.15
type CopyFileAPI ¶ added in v1.6.35
type CopyFileAPI interface {
UploadFile(parentName string, parentType TestingType, filePath string, fileContent []byte, timeout time.Duration) error
}
CopyFileAPI describes methods to handle files in the object storage
type CopyFileClient ¶ added in v1.6.35
type CopyFileDirectClient ¶ added in v1.6.35
type CopyFileDirectClient struct {
// contains filtered or unexported fields
}
func NewCopyFileDirectClient ¶ added in v1.6.35
func NewCopyFileDirectClient(httpClient *http.Client, apiURI, apiPathPrefix string) *CopyFileDirectClient
func (CopyFileDirectClient) UploadFile ¶ added in v1.6.35
func (c CopyFileDirectClient) UploadFile(parentName string, parentType TestingType, filePath string, fileContent []byte, timeout time.Duration) error
UploadFile uploads a copy file to the API server
type CopyFileProxyClient ¶ added in v1.6.35
type CopyFileProxyClient struct {
// contains filtered or unexported fields
}
func NewCopyFileProxyClient ¶ added in v1.6.35
func NewCopyFileProxyClient(client kubernetes.Interface, config APIConfig) *CopyFileProxyClient
func (CopyFileProxyClient) UploadFile ¶ added in v1.6.35
func (c CopyFileProxyClient) UploadFile(parentName string, parentType TestingType, filePath string, fileContent []byte, timeout time.Duration) error
UploadFile uploads a copy file to the API server
type CreateTemplateOptions ¶ added in v1.15.0
type CreateTemplateOptions testkube.TemplateCreateRequest
CreateTemplateOptions - is mapping for now to OpenAPI schema for creating/changing template
type CreateWebhookOptions ¶ added in v0.9.18
type CreateWebhookOptions testkube.WebhookCreateRequest
CreateWebhookOptions - is mapping for now to OpenAPI schema for creating/changing webhook
type DirectClient ¶ added in v1.1.16
type DirectClient[A All] struct { // contains filtered or unexported fields }
DirectClient implements direct client
func NewDirectClient ¶ added in v1.1.16
func NewDirectClient[A All](httpClient *http.Client, apiURI, apiPathPrefix string) DirectClient[A]
NewDirectClient returns new direct client
func (DirectClient[A]) Delete ¶ added in v1.1.16
func (t DirectClient[A]) Delete(uri, selector string, isContentExpected bool) error
Delete is a method to make delete api call
func (DirectClient[A]) Execute ¶ added in v1.1.16
func (t DirectClient[A]) Execute(method, uri string, body []byte, params map[string]string) (result A, err error)
Execute is a method to make an api call for a single object
func (DirectClient[A]) ExecuteMethod ¶ added in v1.6.33
func (t DirectClient[A]) ExecuteMethod(method, uri string, selector string, isContentExpected bool) error
func (DirectClient[A]) ExecuteMultiple ¶ added in v1.1.16
func (t DirectClient[A]) ExecuteMultiple(method, uri string, body []byte, params map[string]string) (result []A, err error)
ExecuteMultiple is a method to make an api call for multiple objects
func (DirectClient[A]) GetFile ¶ added in v1.1.16
func (t DirectClient[A]) GetFile(uri, fileName, destination string, params map[string][]string) (name string, err error)
GetFile returns file artifact
func (DirectClient[A]) GetLogs ¶ added in v1.1.16
func (t DirectClient[A]) GetLogs(uri string, logs chan output.Output) error
GetLogs returns logs stream from job pods, based on job pods logs
func (DirectClient[A]) GetLogsV2 ¶ added in v1.16.29
func (t DirectClient[A]) GetLogsV2(uri string, logs chan events.Log) error
GetLogsV2 returns logs stream version 2 from log server, based on job pods logs
func (DirectClient[A]) GetURI ¶ added in v1.1.16
func (t DirectClient[A]) GetURI(pathTemplate string, params ...interface{}) string
GetURI returns uri for api method
func (DirectClient[A]) WithSSEClient ¶ added in v1.5.31
func (t DirectClient[A]) WithSSEClient(client *http.Client) DirectClient[A]
type Executable ¶ added in v1.1.16
type Executable interface { testkube.Execution | testkube.TestSuiteExecution | testkube.ExecutionsResult | testkube.TestSuiteExecutionsResult }
Executable is an interface of executable objects
type ExecuteTestOptions ¶ added in v1.0.23
type ExecuteTestOptions struct { ExecutionVariables map[string]testkube.Variable ExecutionVariablesFileContent string IsVariablesFileUploaded bool ExecutionLabels map[string]string Command []string Args []string ArgsMode string Envs map[string]string SecretEnvs map[string]string HTTPProxy string HTTPSProxy string Image string Uploads []string BucketName string ArtifactRequest *testkube.ArtifactRequest JobTemplate string JobTemplateReference string ContentRequest *testkube.TestContentRequest PreRunScriptContent string PostRunScriptContent string ExecutePostRunScriptBeforeScraping bool ScraperTemplate string ScraperTemplateReference string PvcTemplate string PvcTemplateReference string NegativeTest bool IsNegativeTestChangedOnRun bool EnvConfigMaps []testkube.EnvReference EnvSecrets []testkube.EnvReference RunningContext *testkube.RunningContext SlavePodRequest *testkube.PodRequest }
TODO consider replacing it with testkube.ExecutionRequest - looks almost the samea and redundant ExecuteTestOptions contains test run options
type ExecuteTestSuiteOptions ¶ added in v1.1.2
type ExecuteTestSuiteOptions struct { ExecutionVariables map[string]testkube.Variable HTTPProxy string HTTPSProxy string ExecutionLabels map[string]string ContentRequest *testkube.TestContentRequest RunningContext *testkube.RunningContext ConcurrencyLevel int32 JobTemplate string JobTemplateReference string ScraperTemplate string ScraperTemplateReference string PvcTemplate string PvcTemplateReference string }
ExecuteTestSuiteOptions contains test suite run options
type ExecutionAPI ¶ added in v1.1.16
type ExecutionAPI interface { GetExecution(executionID string) (execution testkube.Execution, err error) ListExecutions(id string, limit int, selector string) (executions testkube.ExecutionsResult, err error) AbortExecution(test string, id string) error AbortExecutions(test string) error GetExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error) DownloadFile(executionID, fileName, destination string) (artifact string, err error) DownloadArchive(executionID, destination string, masks []string) (archive string, err error) }
ExecutionAPI describes execution api methods
type ExecutorAPI ¶ added in v1.1.16
type ExecutorAPI interface { CreateExecutor(options UpsertExecutorOptions) (executor testkube.ExecutorDetails, err error) UpdateExecutor(options UpdateExecutorOptions) (executor testkube.ExecutorDetails, err error) GetExecutor(name string) (executor testkube.ExecutorDetails, err error) ListExecutors(selector string) (executors testkube.ExecutorsDetails, err error) DeleteExecutor(name string) (err error) DeleteExecutors(selector string) (err error) }
ExecutorAPI describes executor api methods
type ExecutorClient ¶ added in v1.1.16
type ExecutorClient struct {
// contains filtered or unexported fields
}
ExecutorClient is a client for executors
func NewExecutorClient ¶ added in v1.1.16
func NewExecutorClient(executorTransport Transport[testkube.ExecutorDetails]) ExecutorClient
NewExecutorClient creates new Executor client
func (ExecutorClient) CreateExecutor ¶ added in v1.1.16
func (c ExecutorClient) CreateExecutor(options UpsertExecutorOptions) (executor testkube.ExecutorDetails, err error)
CreateExecutor creates new Executor Custom Resource
func (ExecutorClient) DeleteExecutor ¶ added in v1.1.16
func (c ExecutorClient) DeleteExecutor(name string) (err error)
DeleteExecutor deletes single executor by name
func (ExecutorClient) DeleteExecutors ¶ added in v1.1.16
func (c ExecutorClient) DeleteExecutors(selector string) (err error)
DeleteExecutors deletes all executors
func (ExecutorClient) GetExecutor ¶ added in v1.1.16
func (c ExecutorClient) GetExecutor(name string) (executor testkube.ExecutorDetails, err error)
GetExecutor gets executor by name
func (ExecutorClient) ListExecutors ¶ added in v1.1.16
func (c ExecutorClient) ListExecutors(selector string) (executors testkube.ExecutorsDetails, err error)
ListExecutors list all executors
func (ExecutorClient) UpdateExecutor ¶ added in v1.6.12
func (c ExecutorClient) UpdateExecutor(options UpdateExecutorOptions) (executor testkube.ExecutorDetails, err error)
UpdateExecutor updates Executor Custom Resource
type Gettable ¶ added in v1.1.16
type Gettable interface { testkube.Test | testkube.TestSuite | testkube.ExecutorDetails | testkube.Webhook | testkube.TestWithExecution | testkube.TestSuiteWithExecution | testkube.TestWithExecutionSummary | testkube.TestSuiteWithExecutionSummary | testkube.Artifact | testkube.ServerInfo | testkube.Config | testkube.DebugInfo | testkube.TestSource | testkube.Template | testkube.TestWorkflow | testkube.TestWorkflowTemplate }
Gettable is an interface of gettable objects
type MockCopyFileAPI ¶ added in v1.11.22
type MockCopyFileAPI struct {
UploadFileFn func(parentName string, parentType TestingType, filePath string, fileContent []byte, timeout time.Duration) error
}
MockCopyFileAPI is the mock API client for uploading files to be used in tests
func (*MockCopyFileAPI) UploadFile ¶ added in v1.11.22
func (m *MockCopyFileAPI) UploadFile(parentName string, parentType TestingType, filePath string, fileContent []byte, timeout time.Duration) error
type Options ¶ added in v1.1.16
type Options struct { Namespace string ApiUri string ApiPath string Token *oauth2.Token Provider oauth.ProviderType ClientID string ClientSecret string Scopes []string APIServerName string APIServerPort int Insecure bool // Testkube Cloud CloudApiPathPrefix string CloudApiKey string CloudOrganization string CloudEnvironment string }
Options contains client options
type ProxyClient ¶ added in v1.1.16
type ProxyClient[A All] struct { // contains filtered or unexported fields }
ProxyClient implements proxy client
func NewProxyClient ¶ added in v1.1.16
func NewProxyClient[A All](client kubernetes.Interface, config APIConfig) ProxyClient[A]
NewProxyClient returns new proxy client
func (ProxyClient[A]) Delete ¶ added in v1.1.16
func (t ProxyClient[A]) Delete(uri, selector string, isContentExpected bool) error
Delete is a method to make delete api call
func (ProxyClient[A]) Execute ¶ added in v1.1.16
func (t ProxyClient[A]) Execute(method, uri string, body []byte, params map[string]string) (result A, err error)
Execute is a method to make an api call for a single object
func (ProxyClient[A]) ExecuteMethod ¶ added in v1.6.33
func (t ProxyClient[A]) ExecuteMethod(method, uri string, selector string, isContentExpected bool) error
func (ProxyClient[A]) ExecuteMultiple ¶ added in v1.1.16
func (t ProxyClient[A]) ExecuteMultiple(method, uri string, body []byte, params map[string]string) (result []A, err error)
ExecuteMultiple is a method to make an api call for multiple objects
func (ProxyClient[A]) GetFile ¶ added in v1.1.16
func (t ProxyClient[A]) GetFile(uri, fileName, destination string, params map[string][]string) (name string, err error)
GetFile returns file artifact
func (ProxyClient[A]) GetLogs ¶ added in v1.1.16
func (t ProxyClient[A]) GetLogs(uri string, logs chan output.Output) error
GetLogs returns logs stream from job pods, based on job pods logs
func (ProxyClient[A]) GetLogsV2 ¶ added in v1.16.29
func (t ProxyClient[A]) GetLogsV2(uri string, logs chan events.Log) error
GetLogsV2 returns logs version 2 stream from log server, based on job pods logs
func (ProxyClient[A]) GetURI ¶ added in v1.1.16
func (t ProxyClient[A]) GetURI(pathTemplate string, params ...interface{}) string
GetURI returns uri for api method
type ServiceAPI ¶ added in v1.1.16
type ServiceAPI interface { GetServerInfo() (info testkube.ServerInfo, err error) GetDebugInfo() (info testkube.DebugInfo, err error) }
ServiceAPI describes service api methods
type TemplateAPI ¶ added in v1.15.0
type TemplateAPI interface { CreateTemplate(options CreateTemplateOptions) (template testkube.Template, err error) UpdateTemplate(options UpdateTemplateOptions) (template testkube.Template, err error) GetTemplate(name string) (template testkube.Template, err error) ListTemplates(selector string) (templates testkube.Templates, err error) DeleteTemplate(name string) (err error) DeleteTemplates(selector string) (err error) }
TemplateAPI describes template api methods
type TemplateClient ¶ added in v1.15.0
type TemplateClient struct {
// contains filtered or unexported fields
}
TemplateClient is a client for templates
func NewTemplateClient ¶ added in v1.15.0
func NewTemplateClient(templateTransport Transport[testkube.Template]) TemplateClient
NewTemplateClient creates new Template client
func (TemplateClient) CreateTemplate ¶ added in v1.15.0
func (c TemplateClient) CreateTemplate(options CreateTemplateOptions) (template testkube.Template, err error)
CreateTemplate creates new Template Custom Resource
func (TemplateClient) DeleteTemplate ¶ added in v1.15.0
func (c TemplateClient) DeleteTemplate(name string) (err error)
DeleteTemplate deletes single template by name
func (TemplateClient) DeleteTemplates ¶ added in v1.15.0
func (c TemplateClient) DeleteTemplates(selector string) (err error)
DeleteTemplates deletes all templates
func (TemplateClient) GetTemplate ¶ added in v1.15.0
func (c TemplateClient) GetTemplate(name string) (template testkube.Template, err error)
GetTemplate gets template by name
func (TemplateClient) ListTemplates ¶ added in v1.15.0
func (c TemplateClient) ListTemplates(selector string) (templates testkube.Templates, err error)
ListTemplates list all templates
func (TemplateClient) UpdateTemplate ¶ added in v1.15.0
func (c TemplateClient) UpdateTemplate(options UpdateTemplateOptions) (template testkube.Template, err error)
UpdateTemplate updates Template Custom Resource
type TestAPI ¶ added in v1.1.16
type TestAPI interface { GetTest(id string) (test testkube.Test, err error) GetTestWithExecution(id string) (test testkube.TestWithExecution, err error) CreateTest(options UpsertTestOptions) (test testkube.Test, err error) UpdateTest(options UpdateTestOptions) (test testkube.Test, err error) DeleteTest(name string) error DeleteTests(selector string) error ListTests(selector string) (tests testkube.Tests, err error) ListTestWithExecutionSummaries(selector string) (tests testkube.TestWithExecutionSummaries, err error) ExecuteTest(id, executionName string, options ExecuteTestOptions) (executions testkube.Execution, err error) ExecuteTests(selector string, concurrencyLevel int, options ExecuteTestOptions) (executions []testkube.Execution, err error) Logs(id string) (logs chan output.Output, err error) LogsV2(id string) (logs chan events.Log, err error) }
TestAPI describes test api methods
type TestClient ¶ added in v1.1.16
type TestClient struct {
// contains filtered or unexported fields
}
TestClient is a client for tests
func NewTestClient ¶ added in v1.1.16
func NewTestClient( testTransport Transport[testkube.Test], executionTransport Transport[testkube.Execution], testWithExecutionTransport Transport[testkube.TestWithExecution], testWithExecutionSummaryTransport Transport[testkube.TestWithExecutionSummary], executionsResultTransport Transport[testkube.ExecutionsResult], artifactTransport Transport[testkube.Artifact], serverInfoTransport Transport[testkube.ServerInfo], debugInfoTransport Transport[testkube.DebugInfo], ) TestClient
NewTestClient creates new Test client
func (TestClient) AbortExecution ¶ added in v1.1.16
func (c TestClient) AbortExecution(testID, id string) error
AbortExecution aborts execution by testId and id
func (TestClient) AbortExecutions ¶ added in v1.9.22
func (c TestClient) AbortExecutions(testID string) error
AbortExecutions aborts all the executions of a test
func (TestClient) CreateTest ¶ added in v1.1.16
func (c TestClient) CreateTest(options UpsertTestOptions) (test testkube.Test, err error)
CreateTest creates new Test Custom Resource
func (TestClient) DeleteTest ¶ added in v1.1.16
func (c TestClient) DeleteTest(name string) error
DeleteTest deletes single test by name
func (TestClient) DeleteTests ¶ added in v1.1.16
func (c TestClient) DeleteTests(selector string) error
DeleteTests deletes all tests
func (TestClient) DownloadArchive ¶ added in v1.10.45
func (c TestClient) DownloadArchive(executionID, destination string, masks []string) (archive string, err error)
DownloadArchive downloads archive
func (TestClient) DownloadFile ¶ added in v1.1.16
func (c TestClient) DownloadFile(executionID, fileName, destination string) (artifact string, err error)
DownloadFile downloads file
func (TestClient) ExecuteTest ¶ added in v1.1.16
func (c TestClient) ExecuteTest(id, executionName string, options ExecuteTestOptions) (execution testkube.Execution, err error)
ExecuteTest starts test execution, reads data and returns ID execution is started asynchronously client can check later for results
func (TestClient) ExecuteTests ¶ added in v1.1.16
func (c TestClient) ExecuteTests(selector string, concurrencyLevel int, options ExecuteTestOptions) (executions []testkube.Execution, err error)
ExecuteTests starts test executions, reads data and returns IDs executions are started asynchronously client can check later for results
func (TestClient) GetDebugInfo ¶ added in v1.3.45
func (c TestClient) GetDebugInfo() (debugInfo testkube.DebugInfo, err error)
func (TestClient) GetExecution ¶ added in v1.1.16
func (c TestClient) GetExecution(executionID string) (execution testkube.Execution, err error)
GetExecution returns test execution by excution id
func (TestClient) GetExecutionArtifacts ¶ added in v1.1.16
func (c TestClient) GetExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error)
GetExecutionArtifacts returns execution artifacts
func (TestClient) GetServerInfo ¶ added in v1.1.16
func (c TestClient) GetServerInfo() (info testkube.ServerInfo, err error)
GetServerInfo returns server info
func (TestClient) GetTest ¶ added in v1.1.16
func (c TestClient) GetTest(id string) (test testkube.Test, err error)
GetTest returns single test by id
func (TestClient) GetTestWithExecution ¶ added in v1.1.16
func (c TestClient) GetTestWithExecution(id string) (test testkube.TestWithExecution, err error)
GetTestWithExecution returns single test by id with execution
func (TestClient) ListExecutions ¶ added in v1.1.16
func (c TestClient) ListExecutions(id string, limit int, selector string) (executions testkube.ExecutionsResult, err error)
ListExecutions list all executions for given test name
func (TestClient) ListTestWithExecutionSummaries ¶ added in v1.7.7
func (c TestClient) ListTestWithExecutionSummaries(selector string) (testWithExecutionSummaries testkube.TestWithExecutionSummaries, err error)
ListTestWithExecutionSummaries list all test with execution summaries
func (TestClient) ListTests ¶ added in v1.1.16
func (c TestClient) ListTests(selector string) (tests testkube.Tests, err error)
ListTests list all tests
func (TestClient) Logs ¶ added in v1.1.16
func (c TestClient) Logs(id string) (logs chan output.Output, err error)
Logs returns logs stream from job pods, based on job pods logs
func (TestClient) LogsV2 ¶ added in v1.16.29
func (c TestClient) LogsV2(id string) (logs chan events.Log, err error)
LogsV2 returns logs version 2 stream from log sever, based on job pods logs
func (TestClient) UpdateTest ¶ added in v1.1.16
func (c TestClient) UpdateTest(options UpdateTestOptions) (test testkube.Test, err error)
UpdateTest updates Test Custom Resource
type TestSourceAPI ¶ added in v1.5.29
type TestSourceAPI interface { CreateTestSource(options UpsertTestSourceOptions) (testSource testkube.TestSource, err error) UpdateTestSource(options UpdateTestSourceOptions) (testSource testkube.TestSource, err error) GetTestSource(name string) (testSource testkube.TestSource, err error) ListTestSources(selector string) (testSources testkube.TestSources, err error) DeleteTestSource(name string) (err error) DeleteTestSources(selector string) (err error) }
TestSourceAPI describes test source api methods
type TestSourceClient ¶ added in v1.5.29
type TestSourceClient struct {
// contains filtered or unexported fields
}
TestSourceClient is a client for test sources
func NewTestSourceClient ¶ added in v1.5.29
func NewTestSourceClient(testSourceTransport Transport[testkube.TestSource]) TestSourceClient
NewTestSourceClient creates new TestSource client
func (TestSourceClient) CreateTestSource ¶ added in v1.5.29
func (c TestSourceClient) CreateTestSource(options UpsertTestSourceOptions) (testSource testkube.TestSource, err error)
CreateTestSource creates new TestSource Custom Resource
func (TestSourceClient) DeleteTestSource ¶ added in v1.5.29
func (c TestSourceClient) DeleteTestSource(name string) (err error)
DeleteTestSource deletes single test source by name
func (TestSourceClient) DeleteTestSources ¶ added in v1.5.29
func (c TestSourceClient) DeleteTestSources(selector string) (err error)
DeleteTestSources deletes all test sources
func (TestSourceClient) GetTestSource ¶ added in v1.5.29
func (c TestSourceClient) GetTestSource(name string) (testSource testkube.TestSource, err error)
GetTestSource gets test source by name
func (TestSourceClient) ListTestSources ¶ added in v1.5.29
func (c TestSourceClient) ListTestSources(selector string) (testSources testkube.TestSources, err error)
ListTestSources list all test sources
func (TestSourceClient) UpdateTestSource ¶ added in v1.5.29
func (c TestSourceClient) UpdateTestSource(options UpdateTestSourceOptions) (testSource testkube.TestSource, err error)
UpdateTestSource updates TestSource Custom Resource
type TestSuiteAPI ¶ added in v1.1.16
type TestSuiteAPI interface { CreateTestSuite(options UpsertTestSuiteOptions) (testSuite testkube.TestSuite, err error) UpdateTestSuite(options UpdateTestSuiteOptions) (testSuite testkube.TestSuite, err error) GetTestSuite(id string) (testSuite testkube.TestSuite, err error) GetTestSuiteWithExecution(id string) (testSuite testkube.TestSuiteWithExecution, err error) ListTestSuites(selector string) (testSuites testkube.TestSuites, err error) ListTestSuiteWithExecutionSummaries(selector string) (testSuitesWithExecutionSummaries testkube.TestSuiteWithExecutionSummaries, err error) DeleteTestSuite(name string) error DeleteTestSuites(selector string) error ExecuteTestSuite(id, executionName string, options ExecuteTestSuiteOptions) (executions testkube.TestSuiteExecution, err error) ExecuteTestSuites(selector string, concurrencyLevel int, options ExecuteTestSuiteOptions) (executions []testkube.TestSuiteExecution, err error) }
TestSuiteAPI describes test suite api methods
type TestSuiteClient ¶ added in v1.1.16
type TestSuiteClient struct {
// contains filtered or unexported fields
}
TestSuiteClient is a client for test suites
func NewTestSuiteClient ¶ added in v1.1.16
func NewTestSuiteClient( testSuiteTransport Transport[testkube.TestSuite], testSuiteExecutionTransport Transport[testkube.TestSuiteExecution], testSuiteWithExecutionTransport Transport[testkube.TestSuiteWithExecution], testSuiteWithExecutionSummaryTransport Transport[testkube.TestSuiteWithExecutionSummary], testSuiteExecutionsResultTransport Transport[testkube.TestSuiteExecutionsResult], testSuiteArtifactTransport Transport[testkube.Artifact], ) TestSuiteClient
NewTestSuiteClient creates new TestSuite client
func (TestSuiteClient) AbortTestSuiteExecution ¶ added in v1.6.29
func (c TestSuiteClient) AbortTestSuiteExecution(executionID string) error
AbortTestSuiteExecution aborts a test suite execution
func (TestSuiteClient) AbortTestSuiteExecutions ¶ added in v1.11.10
func (c TestSuiteClient) AbortTestSuiteExecutions(testSuiteName string) error
AbortTestSuiteExecutions aborts all test suite executions
func (TestSuiteClient) CreateTestSuite ¶ added in v1.1.16
func (c TestSuiteClient) CreateTestSuite(options UpsertTestSuiteOptions) (testSuite testkube.TestSuite, err error)
CreateTestSuite creates new TestSuite Custom Resource
func (TestSuiteClient) DeleteTestSuite ¶ added in v1.1.16
func (c TestSuiteClient) DeleteTestSuite(name string) error
DeleteTestSuite deletes single test suite by name
func (TestSuiteClient) DeleteTestSuites ¶ added in v1.1.16
func (c TestSuiteClient) DeleteTestSuites(selector string) error
DeleteTestSuites deletes all test suites
func (TestSuiteClient) ExecuteTestSuite ¶ added in v1.1.16
func (c TestSuiteClient) ExecuteTestSuite(id, executionName string, options ExecuteTestSuiteOptions) (execution testkube.TestSuiteExecution, err error)
ExecuteTestSuite starts new external test suite execution, reads data and returns ID Execution is started asynchronously client can check later for results
func (TestSuiteClient) ExecuteTestSuites ¶ added in v1.1.16
func (c TestSuiteClient) ExecuteTestSuites(selector string, concurrencyLevel int, options ExecuteTestSuiteOptions) (executions []testkube.TestSuiteExecution, err error)
ExecuteTestSuites starts new external test suite executions, reads data and returns IDs Executions are started asynchronously client can check later for results
func (TestSuiteClient) GetTestSuite ¶ added in v1.1.16
func (c TestSuiteClient) GetTestSuite(id string) (testSuite testkube.TestSuite, err error)
GetTestSuite returns single test suite by id
func (TestSuiteClient) GetTestSuiteExecution ¶ added in v1.1.16
func (c TestSuiteClient) GetTestSuiteExecution(executionID string) (execution testkube.TestSuiteExecution, err error)
GetTestSuiteExecution returns test suite execution by excution id
func (TestSuiteClient) GetTestSuiteExecutionArtifacts ¶ added in v1.9.9
func (c TestSuiteClient) GetTestSuiteExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error)
GetTestSuiteExecutionArtifacts returns test suite execution artifacts by excution id
func (TestSuiteClient) GetTestSuiteWithExecution ¶ added in v1.1.16
func (c TestSuiteClient) GetTestSuiteWithExecution(id string) (test testkube.TestSuiteWithExecution, err error)
GetTestSuitWithExecution returns single test suite by id with execution
func (TestSuiteClient) ListTestSuiteExecutions ¶ added in v1.1.16
func (c TestSuiteClient) ListTestSuiteExecutions(testID string, limit int, selector string) (executions testkube.TestSuiteExecutionsResult, err error)
ListTestSuiteExecutions list all executions for given test suite
func (TestSuiteClient) ListTestSuiteWithExecutionSummaries ¶ added in v1.7.7
func (c TestSuiteClient) ListTestSuiteWithExecutionSummaries(selector string) ( testSuiteWithExecutionSummaries testkube.TestSuiteWithExecutionSummaries, err error)
ListTestSuiteWithExecutionSummaries list all test suite with execution summaries
func (TestSuiteClient) ListTestSuites ¶ added in v1.1.16
func (c TestSuiteClient) ListTestSuites(selector string) (testSuites testkube.TestSuites, err error)
ListTestSuites list all test suites
func (TestSuiteClient) UpdateTestSuite ¶ added in v1.1.16
func (c TestSuiteClient) UpdateTestSuite(options UpdateTestSuiteOptions) (testSuite testkube.TestSuite, err error)
UpdateTestSuite updates TestSuite Custom Resource
func (TestSuiteClient) WatchTestSuiteExecution ¶ added in v1.1.16
func (c TestSuiteClient) WatchTestSuiteExecution(executionID string) (respCh chan testkube.WatchTestSuiteExecutionResponse)
WatchTestSuiteExecution watches for changes in channels of test suite executions steps
type TestSuiteExecutionAPI ¶ added in v1.1.16
type TestSuiteExecutionAPI interface { GetTestSuiteExecution(executionID string) (execution testkube.TestSuiteExecution, err error) ListTestSuiteExecutions(testsuite string, limit int, selector string) (executions testkube.TestSuiteExecutionsResult, err error) WatchTestSuiteExecution(executionID string) (resp chan testkube.WatchTestSuiteExecutionResponse) AbortTestSuiteExecution(executionID string) error AbortTestSuiteExecutions(testSuiteName string) error GetTestSuiteExecutionArtifacts(executionID string) (artifacts testkube.Artifacts, err error) }
TestSuiteExecutionAPI describes test suite execution api methods
type TestWorkflowAPI ¶
type TestWorkflowAPI interface { GetTestWorkflow(id string) (testkube.TestWorkflow, error) ListTestWorkflows(selector string) (testkube.TestWorkflows, error) DeleteTestWorkflows(selector string) error CreateTestWorkflow(workflow testkube.TestWorkflow) (testkube.TestWorkflow, error) UpdateTestWorkflow(workflow testkube.TestWorkflow) (testkube.TestWorkflow, error) DeleteTestWorkflow(name string) error }
TestWorkflowAPI describes test workflow api methods
type TestWorkflowClient ¶
type TestWorkflowClient struct {
// contains filtered or unexported fields
}
TestWorkflowClient is a client for tests
func NewTestWorkflowClient ¶
func NewTestWorkflowClient( testWorkflowTransport Transport[testkube.TestWorkflow], ) TestWorkflowClient
NewTestWorkflowClient creates new TestWorkflow client
func (TestWorkflowClient) CreateTestWorkflow ¶
func (c TestWorkflowClient) CreateTestWorkflow(workflow testkube.TestWorkflow) (result testkube.TestWorkflow, err error)
CreateTestWorkflow creates new TestWorkflow Custom Resource
func (TestWorkflowClient) DeleteTestWorkflow ¶
func (c TestWorkflowClient) DeleteTestWorkflow(name string) error
DeleteTestWorkflow deletes single test by name
func (TestWorkflowClient) DeleteTestWorkflows ¶
func (c TestWorkflowClient) DeleteTestWorkflows(selector string) error
DeleteTestWorkflows deletes multiple test workflows by labels
func (TestWorkflowClient) GetTestWorkflow ¶
func (c TestWorkflowClient) GetTestWorkflow(id string) (testkube.TestWorkflow, error)
GetTestWorkflow returns single test by id
func (TestWorkflowClient) ListTestWorkflows ¶
func (c TestWorkflowClient) ListTestWorkflows(selector string) (testkube.TestWorkflows, error)
ListTestWorkflows list all tests
func (TestWorkflowClient) UpdateTestWorkflow ¶
func (c TestWorkflowClient) UpdateTestWorkflow(workflow testkube.TestWorkflow) (result testkube.TestWorkflow, err error)
UpdateTestWorkflow updates TestWorkflow Custom Resource
type TestWorkflowTemplateAPI ¶
type TestWorkflowTemplateAPI interface { GetTestWorkflowTemplate(id string) (testkube.TestWorkflowTemplate, error) ListTestWorkflowTemplates(selector string) (testkube.TestWorkflowTemplates, error) DeleteTestWorkflowTemplates(selector string) error CreateTestWorkflowTemplate(workflow testkube.TestWorkflowTemplate) (testkube.TestWorkflowTemplate, error) UpdateTestWorkflowTemplate(workflow testkube.TestWorkflowTemplate) (testkube.TestWorkflowTemplate, error) DeleteTestWorkflowTemplate(name string) error }
TestWorkflowTemplateAPI describes test workflow api methods
type TestWorkflowTemplateClient ¶
type TestWorkflowTemplateClient struct {
// contains filtered or unexported fields
}
TestWorkflowTemplateClient is a client for tests
func NewTestWorkflowTemplateClient ¶
func NewTestWorkflowTemplateClient( testWorkflowTemplateTransport Transport[testkube.TestWorkflowTemplate], ) TestWorkflowTemplateClient
NewTestWorkflowTemplateClient creates new TestWorkflowTemplate client
func (TestWorkflowTemplateClient) CreateTestWorkflowTemplate ¶
func (c TestWorkflowTemplateClient) CreateTestWorkflowTemplate(template testkube.TestWorkflowTemplate) (result testkube.TestWorkflowTemplate, err error)
CreateTestWorkflowTemplate creates new TestWorkflowTemplate Custom Resource
func (TestWorkflowTemplateClient) DeleteTestWorkflowTemplate ¶
func (c TestWorkflowTemplateClient) DeleteTestWorkflowTemplate(name string) error
DeleteTestWorkflowTemplate deletes single test by name
func (TestWorkflowTemplateClient) DeleteTestWorkflowTemplates ¶
func (c TestWorkflowTemplateClient) DeleteTestWorkflowTemplates(selector string) error
DeleteTestWorkflowTemplates deletes multiple test workflow templates by labels
func (TestWorkflowTemplateClient) GetTestWorkflowTemplate ¶
func (c TestWorkflowTemplateClient) GetTestWorkflowTemplate(id string) (testkube.TestWorkflowTemplate, error)
GetTestWorkflowTemplate returns single test by id
func (TestWorkflowTemplateClient) ListTestWorkflowTemplates ¶
func (c TestWorkflowTemplateClient) ListTestWorkflowTemplates(selector string) (testkube.TestWorkflowTemplates, error)
ListTestWorkflowTemplates list all tests
func (TestWorkflowTemplateClient) UpdateTestWorkflowTemplate ¶
func (c TestWorkflowTemplateClient) UpdateTestWorkflowTemplate(template testkube.TestWorkflowTemplate) (result testkube.TestWorkflowTemplate, err error)
UpdateTestWorkflowTemplate updates TestWorkflowTemplate Custom Resource
type TestingType ¶ added in v1.6.35
type TestingType string
const ( Test TestingType = "test" Execution TestingType = "execution" )
type Transport ¶ added in v1.1.16
type Transport[A All] interface { Execute(method, uri string, body []byte, params map[string]string) (result A, err error) ExecuteMultiple(method, uri string, body []byte, params map[string]string) (result []A, err error) Delete(uri, selector string, isContentExpected bool) error ExecuteMethod(method, uri, selector string, isContentExpected bool) error GetURI(pathTemplate string, params ...interface{}) string GetLogs(uri string, logs chan output.Output) error GetLogsV2(uri string, logs chan events.Log) error GetFile(uri, fileName, destination string, params map[string][]string) (name string, err error) }
Transport provides methods to execute api calls
type UpdateExecutorOptions ¶ added in v1.7.29
type UpdateExecutorOptions testkube.ExecutorUpdateRequest
UpdateExecutorOptions - is mapping for now to OpenAPI schema for changing executor request
type UpdateTemplateOptions ¶ added in v1.15.0
type UpdateTemplateOptions testkube.TemplateUpdateRequest
UpdateTemplateOptions - is mapping for now to OpenAPI schema for changing template request
type UpdateTestOptions ¶ added in v1.7.29
type UpdateTestOptions testkube.TestUpdateRequest
UpdateTestOptions - is mapping for now to OpenAPI schema for changing test if needed can be extended to custom struct
type UpdateTestSourceOptions ¶ added in v1.7.29
type UpdateTestSourceOptions testkube.TestSourceUpdateRequest
UpdateTestSourceOptions - is mapping for now to OpenAPI schema for changing test source if needed can be extended to custom struct
type UpdateTestSuiteOptions ¶ added in v1.7.29
type UpdateTestSuiteOptions testkube.TestSuiteUpdateRequest
UpdateTestSuiteOptions - mapping to OpenAPI schema for changing testsuite
type UpdateWebhookOptions ¶ added in v1.14.0
type UpdateWebhookOptions testkube.WebhookUpdateRequest
UpdateWebhookOptions - is mapping for now to OpenAPI schema for changing webhook request
type UpsertExecutorOptions ¶ added in v1.6.12
type UpsertExecutorOptions testkube.ExecutorUpsertRequest
UpsertExecutorOptions - is mapping for now to OpenAPI schema for creating executor request
type UpsertTestOptions ¶ added in v0.7.6
type UpsertTestOptions testkube.TestUpsertRequest
UpsertTestOptions - is mapping for now to OpenAPI schema for creating test if needed can be extended to custom struct
type UpsertTestSourceOptions ¶ added in v1.5.29
type UpsertTestSourceOptions testkube.TestSourceUpsertRequest
UpsertTestSourceOptions - is mapping for now to OpenAPI schema for creating test source if needed can be extended to custom struct
type UpsertTestSuiteOptions ¶ added in v0.9.5
type UpsertTestSuiteOptions testkube.TestSuiteUpsertRequest
UpsertTestSuiteOptions - mapping to OpenAPI schema for creating testsuite
type WebhookAPI ¶ added in v1.1.16
type WebhookAPI interface { CreateWebhook(options CreateWebhookOptions) (webhook testkube.Webhook, err error) UpdateWebhook(options UpdateWebhookOptions) (webhook testkube.Webhook, err error) GetWebhook(name string) (webhook testkube.Webhook, err error) ListWebhooks(selector string) (webhooks testkube.Webhooks, err error) DeleteWebhook(name string) (err error) DeleteWebhooks(selector string) (err error) }
WebhookAPI describes webhook api methods
type WebhookClient ¶ added in v1.1.16
type WebhookClient struct {
// contains filtered or unexported fields
}
WebhookClient is a client for webhooks
func NewWebhookClient ¶ added in v1.1.16
func NewWebhookClient(webhookTransport Transport[testkube.Webhook]) WebhookClient
NewWebhookClient creates new Webhook client
func (WebhookClient) CreateWebhook ¶ added in v1.1.16
func (c WebhookClient) CreateWebhook(options CreateWebhookOptions) (webhook testkube.Webhook, err error)
CreateWebhook creates new Webhook Custom Resource
func (WebhookClient) DeleteWebhook ¶ added in v1.1.16
func (c WebhookClient) DeleteWebhook(name string) (err error)
DeleteWebhook deletes single webhook by name
func (WebhookClient) DeleteWebhooks ¶ added in v1.1.16
func (c WebhookClient) DeleteWebhooks(selector string) (err error)
DeleteWebhooks deletes all webhooks
func (WebhookClient) GetWebhook ¶ added in v1.1.16
func (c WebhookClient) GetWebhook(name string) (webhook testkube.Webhook, err error)
GetWebhook gets webhook by name
func (WebhookClient) ListWebhooks ¶ added in v1.1.16
func (c WebhookClient) ListWebhooks(selector string) (webhooks testkube.Webhooks, err error)
ListWebhooks list all webhooks
func (WebhookClient) UpdateWebhook ¶ added in v1.14.0
func (c WebhookClient) UpdateWebhook(options UpdateWebhookOptions) (webhook testkube.Webhook, err error)
UpdateWebhook updates Webhook Custom Resource