func (c ProxyScriptsAPI) AbortExecution(scriptID, id string) error {
	uri := c.getURI("/scripts/%s/executions/%s/abort", scriptID, id)
	req := c.GetProxy("POST").Suffix(uri)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return err
	}
	return nil
}
GetExecutions list all executions in given script
package client
import (
	"context"
	"encoding/json"
	"fmt"
	"github.com/kubeshop/testkube/pkg/api/v1/testkube"
	"github.com/kubeshop/testkube/pkg/problem"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
	_ "k8s.io/client-go/plugin/pkg/client/auth"
)
func GetClientSet() (clientset kubernetes.Interface, err error) {
	clcfg, err := clientcmd.NewDefaultClientConfigLoadingRules().Load()
	if err != nil {
		return clientset, err
	}
	restcfg, err := clientcmd.NewNonInteractiveClientConfig(
		*clcfg, "", &clientcmd.ConfigOverrides{}, nil).ClientConfig()
	if err != nil {
		return clientset, err
	}
	return kubernetes.NewForConfig(restcfg)
}
func NewProxyScriptsAPI(client kubernetes.Interface, config ProxyConfig) ProxyScriptsAPI {
	return ProxyScriptsAPI{
		client: client,
		config: config,
	}
}
func NewProxyConfig(namespace string) ProxyConfig {
	return ProxyConfig{
		Namespace:   namespace,
		ServiceName: "testkube-api-server",
		ServicePort: 8088,
	}
}
type ProxyConfig struct {
	Namespace string
	ServiceName string
	ServicePort int
}
type ProxyScriptsAPI struct {
	client kubernetes.Interface
	config ProxyConfig
}
func (c ProxyScriptsAPI) GetScript(id string) (script testkube.Script, err error) {
	uri := c.getURI("/scripts/%s", id)
	req := c.GetProxy("GET").Suffix(uri)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return script, fmt.Errorf("api/get-script returned error: %w", err)
	}
	return c.getScriptFromResponse(resp)
}
func (c ProxyScriptsAPI) GetExecution(scriptID, executionID string) (execution testkube.Execution, err error) {
	uri := c.getURI("/scripts/%s/executions/%s", scriptID, executionID)
	req := c.GetProxy("GET").Suffix(uri)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return execution, fmt.Errorf("api/get-execution returned error: %w", err)
	}
	return c.getExecutionFromResponse(resp)
}
func (c ProxyScriptsAPI) ListExecutions(scriptID string) (executions testkube.ExecutionsResult, err error) {
	uri := c.getURI("/scripts/%s/executions", scriptID)
	req := c.GetProxy("GET").Suffix(uri)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return executions, fmt.Errorf("api/get-executions returned error: %w", err)
	}
	return c.getExecutionsFromResponse(resp)
}
func (c ProxyScriptsAPI) CreateScript(options CreateScriptOptions) (script testkube.Script, err error) {
	uri := c.getURI("/scripts")
	request := testkube.ScriptCreateRequest(options)
	body, err := json.Marshal(request)
	if err != nil {
		return script, err
	}
	req := c.GetProxy("POST").Suffix(uri).Body(body)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return script, fmt.Errorf("api/create-script returned error: %w", err)
	}
	return c.getScriptFromResponse(resp)
}
func (c ProxyScriptsAPI) ExecuteScript(id, namespace, executionName string, executionParams map[string]string) (execution testkube.Execution, err error) {
	uri := c.getURI("/scripts/%s/executions", id)
	request := testkube.ExecutionRequest{
		Name:      executionName,
		Namespace: namespace,
		Params:    executionParams,
	}
	body, err := json.Marshal(request)
	if err != nil {
		return execution, err
	}
	req := c.GetProxy("POST").Suffix(uri).Body(body)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return execution, fmt.Errorf("api/execute-script returned error: %w", err)
	}
	return c.getExecutionFromResponse(resp)
}
func (c ProxyScriptsAPI) ListScripts(namespace string) (scripts testkube.Scripts, err error) {
	uri := c.getURI("/scripts")
	req := c.GetProxy("GET").
		Suffix(uri).
		Param("namespace", namespace)
	resp := req.Do(context.Background())
	if err := c.responseError(resp); err != nil {
		return scripts, fmt.Errorf("api/list-scripts returned error: %w", err)
	}
	return c.getScriptsFromResponse(resp)
}