client

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

type APIClient struct {
	// contains filtered or unexported fields
}

APIClient provides HTTP client for OpenChoreo API server

func NewAPIClient

func NewAPIClient() (*APIClient, error)

NewAPIClient creates a new API client with control plane auto-detection

func (*APIClient) Apply

func (c *APIClient) Apply(ctx context.Context, resource map[string]interface{}) (*ApplyResponse, error)

Apply sends a resource to the /api/v1/apply endpoint

func (*APIClient) Get

func (c *APIClient) Get(ctx context.Context, path string) (*http.Response, error)

Get performs a GET request to the API

func (*APIClient) HealthCheck

func (c *APIClient) HealthCheck(ctx context.Context) error

HealthCheck verifies API server connectivity

func (*APIClient) ListComponents

func (c *APIClient) ListComponents(ctx context.Context, namespaceName, projectName string) ([]ComponentResponse, error)

ListComponents retrieves all components for an namespace and project from the API

func (*APIClient) ListNamespaces added in v0.13.0

func (c *APIClient) ListNamespaces(ctx context.Context) ([]NamespaceResponse, error)

ListNamespaces retrieves all namespaces from the API

func (*APIClient) ListProjects

func (c *APIClient) ListProjects(ctx context.Context, namespaceName string) ([]ProjectResponse, error)

ListProjects retrieves all projects for an namespace from the API

type ApplyResponse

type ApplyResponse struct {
	Success bool `json:"success"`
	Data    struct {
		APIVersion string `json:"apiVersion"`
		Kind       string `json:"kind"`
		Name       string `json:"name"`
		Namespace  string `json:"namespace,omitempty"`
		Operation  string `json:"operation"` // "created" or "updated"
	} `json:"data"`
	Error string `json:"error,omitempty"`
	Code  string `json:"code,omitempty"`
}

ApplyResponse represents the response from /api/v1/apply

type Client added in v0.13.0

type Client struct {
	// contains filtered or unexported fields
}

Client wraps the generated OpenAPI client with token refresh functionality

func NewClient added in v0.13.0

func NewClient() (*Client, error)

func (*Client) CreateComponentRelease added in v0.14.0

func (c *Client) CreateComponentRelease(ctx context.Context, namespaceName string, cr gen.ComponentRelease) (*gen.ComponentRelease, error)

CreateComponentRelease creates a new component release

func (*Client) CreateComponentType added in v0.16.0

func (c *Client) CreateComponentType(ctx context.Context, namespaceName string, ct gen.ComponentType) (*gen.ComponentType, error)

CreateComponentType creates a new component type

func (*Client) CreateReleaseBinding added in v1.0.0

func (c *Client) CreateReleaseBinding(ctx context.Context, namespaceName string, req gen.ReleaseBinding) (*gen.ReleaseBinding, error)

CreateReleaseBinding creates a new release binding

func (*Client) CreateTrait added in v0.16.0

func (c *Client) CreateTrait(ctx context.Context, namespaceName string, t gen.Trait) (*gen.Trait, error)

CreateTrait creates a new trait

func (*Client) CreateWorkflowRun added in v0.14.0

func (c *Client) CreateWorkflowRun(
	ctx context.Context,
	namespace string,
	body gen.CreateWorkflowRunJSONRequestBody,
) (*gen.WorkflowRun, error)

CreateWorkflowRun creates a new workflow run

func (*Client) DeleteClusterComponentType added in v0.17.0

func (c *Client) DeleteClusterComponentType(ctx context.Context, cctName string) error

DeleteClusterComponentType deletes a cluster component type

func (*Client) DeleteClusterDataPlane added in v1.0.0

func (c *Client) DeleteClusterDataPlane(ctx context.Context, cdpName string) error

DeleteClusterDataPlane deletes a cluster data plane

func (*Client) DeleteClusterObservabilityPlane added in v1.0.0

func (c *Client) DeleteClusterObservabilityPlane(ctx context.Context, clusterObservabilityPlaneName string) error

DeleteClusterObservabilityPlane deletes a cluster observability plane

func (*Client) DeleteClusterRole added in v0.17.0

func (c *Client) DeleteClusterRole(ctx context.Context, name string) error

DeleteClusterRole deletes a cluster-scoped authorization role

func (*Client) DeleteClusterRoleBinding added in v0.17.0

func (c *Client) DeleteClusterRoleBinding(ctx context.Context, name string) error

DeleteClusterRoleBinding deletes a cluster-scoped role binding

func (*Client) DeleteClusterTrait added in v0.17.0

func (c *Client) DeleteClusterTrait(ctx context.Context, clusterTraitName string) error

DeleteClusterTrait deletes a cluster trait

func (*Client) DeleteClusterWorkflow added in v1.0.0

func (c *Client) DeleteClusterWorkflow(ctx context.Context, clusterWorkflowName string) error

DeleteClusterWorkflow deletes a cluster workflow

func (*Client) DeleteClusterWorkflowPlane added in v1.0.0

func (c *Client) DeleteClusterWorkflowPlane(ctx context.Context, clusterWorkflowPlaneName string) error

DeleteClusterWorkflowPlane deletes a cluster workflow plane

func (*Client) DeleteComponent added in v0.17.0

func (c *Client) DeleteComponent(ctx context.Context, namespaceName, componentName string) error

DeleteComponent deletes a component

func (*Client) DeleteComponentRelease added in v1.0.0

func (c *Client) DeleteComponentRelease(ctx context.Context, namespaceName, componentReleaseName string) error

DeleteComponentRelease deletes a component release

func (*Client) DeleteComponentType added in v0.16.0

func (c *Client) DeleteComponentType(ctx context.Context, namespaceName, ctName string) error

DeleteComponentType deletes a component type

func (*Client) DeleteDataPlane added in v0.17.0

func (c *Client) DeleteDataPlane(ctx context.Context, namespaceName, dpName string) error

DeleteDataPlane deletes a data plane

func (*Client) DeleteDeploymentPipeline added in v0.17.0

func (c *Client) DeleteDeploymentPipeline(ctx context.Context, namespaceName, deploymentPipelineName string) error

DeleteDeploymentPipeline deletes a deployment pipeline

func (*Client) DeleteEnvironment added in v0.17.0

func (c *Client) DeleteEnvironment(ctx context.Context, namespaceName, envName string) error

DeleteEnvironment deletes an environment

func (*Client) DeleteNamespace added in v0.17.0

func (c *Client) DeleteNamespace(ctx context.Context, namespaceName string) error

DeleteNamespace deletes a namespace

func (*Client) DeleteNamespaceRole added in v0.17.0

func (c *Client) DeleteNamespaceRole(ctx context.Context, namespaceName, name string) error

DeleteNamespaceRole deletes a namespace-scoped authorization role

func (*Client) DeleteNamespaceRoleBinding added in v0.17.0

func (c *Client) DeleteNamespaceRoleBinding(ctx context.Context, namespaceName, name string) error

DeleteNamespaceRoleBinding deletes a namespace-scoped role binding

func (*Client) DeleteObservabilityAlertsNotificationChannel added in v0.17.0

func (c *Client) DeleteObservabilityAlertsNotificationChannel(ctx context.Context, namespaceName, channelName string) error

DeleteObservabilityAlertsNotificationChannel deletes an observability alerts notification channel

func (*Client) DeleteObservabilityPlane added in v0.17.0

func (c *Client) DeleteObservabilityPlane(ctx context.Context, namespaceName, observabilityPlaneName string) error

DeleteObservabilityPlane deletes an observability plane

func (*Client) DeleteProject added in v0.17.0

func (c *Client) DeleteProject(ctx context.Context, namespaceName, projectName string) error

DeleteProject deletes a project

func (*Client) DeleteReleaseBinding added in v0.17.0

func (c *Client) DeleteReleaseBinding(ctx context.Context, namespaceName, releaseBindingName string) error

DeleteReleaseBinding deletes a release binding

func (*Client) DeleteSecretReference added in v0.17.0

func (c *Client) DeleteSecretReference(ctx context.Context, namespaceName, secretReferenceName string) error

DeleteSecretReference deletes a secret reference

func (*Client) DeleteTrait added in v0.16.0

func (c *Client) DeleteTrait(ctx context.Context, namespaceName, traitName string) error

DeleteTrait deletes a trait

func (*Client) DeleteWorkflow added in v1.0.0

func (c *Client) DeleteWorkflow(ctx context.Context, namespaceName, workflowName string) error

DeleteWorkflow deletes a workflow

func (*Client) DeleteWorkflowPlane added in v1.0.0

func (c *Client) DeleteWorkflowPlane(ctx context.Context, namespaceName, workflowPlaneName string) error

DeleteWorkflowPlane deletes a workflow plane

func (*Client) DeleteWorkload added in v0.17.0

func (c *Client) DeleteWorkload(ctx context.Context, namespaceName, workloadName string) error

DeleteWorkload deletes a workload

func (*Client) GenerateRelease added in v0.16.0

func (c *Client) GenerateRelease(ctx context.Context, namespaceName, componentName string, req gen.GenerateReleaseRequest) (*gen.ComponentRelease, error)

GenerateRelease generates an immutable release snapshot via the flat K8s-native endpoint

func (*Client) GetClient added in v0.17.0

func (c *Client) GetClient() *gen.ClientWithResponses

GetClient returns the underlying generated OpenAPI client.

func (*Client) GetClusterComponentType added in v0.17.0

func (c *Client) GetClusterComponentType(ctx context.Context, cctName string) (*gen.ClusterComponentType, error)

GetClusterComponentType retrieves a specific cluster component type

func (*Client) GetClusterComponentTypeSchema added in v1.0.0

func (c *Client) GetClusterComponentTypeSchema(ctx context.Context, cctName string) (*json.RawMessage, error)

GetClusterComponentTypeSchema retrieves the parameter schema for a cluster-scoped component type

func (*Client) GetClusterDataPlane added in v0.17.0

func (c *Client) GetClusterDataPlane(ctx context.Context, cdpName string) (*gen.ClusterDataPlane, error)

GetClusterDataPlane retrieves a specific cluster data plane

func (*Client) GetClusterObservabilityPlane added in v0.17.0

func (c *Client) GetClusterObservabilityPlane(ctx context.Context, clusterObservabilityPlaneName string) (*gen.ClusterObservabilityPlane, error)

GetClusterObservabilityPlane retrieves a specific cluster observability plane

func (*Client) GetClusterRole added in v0.17.0

func (c *Client) GetClusterRole(ctx context.Context, name string) (*gen.ClusterAuthzRole, error)

GetClusterRole retrieves a specific cluster-scoped authorization role

func (*Client) GetClusterRoleBinding added in v0.17.0

func (c *Client) GetClusterRoleBinding(ctx context.Context, name string) (*gen.ClusterAuthzRoleBinding, error)

GetClusterRoleBinding retrieves a specific cluster-scoped role binding

func (*Client) GetClusterTrait added in v0.17.0

func (c *Client) GetClusterTrait(ctx context.Context, clusterTraitName string) (*gen.ClusterTrait, error)

GetClusterTrait retrieves a specific cluster trait

func (*Client) GetClusterTraitSchema added in v1.0.0

func (c *Client) GetClusterTraitSchema(ctx context.Context, clusterTraitName string) (*json.RawMessage, error)

GetClusterTraitSchema retrieves the parameter schema for a cluster-scoped trait

func (*Client) GetClusterWorkflow added in v1.0.0

func (c *Client) GetClusterWorkflow(ctx context.Context, clusterWorkflowName string) (*gen.ClusterWorkflow, error)

GetClusterWorkflow retrieves a specific cluster workflow

func (*Client) GetClusterWorkflowPlane added in v1.0.0

func (c *Client) GetClusterWorkflowPlane(ctx context.Context, clusterWorkflowPlaneName string) (*gen.ClusterWorkflowPlane, error)

GetClusterWorkflowPlane retrieves a specific cluster workflow plane

func (*Client) GetClusterWorkflowSchema added in v1.0.0

func (c *Client) GetClusterWorkflowSchema(ctx context.Context, clusterWorkflowName string) (*json.RawMessage, error)

GetClusterWorkflowSchema retrieves the parameter schema for a cluster-scoped workflow

func (*Client) GetComponent added in v0.14.0

func (c *Client) GetComponent(ctx context.Context, namespaceName, componentName string) (*gen.Component, error)

GetComponent retrieves a specific component

func (*Client) GetComponentRelease added in v0.17.0

func (c *Client) GetComponentRelease(ctx context.Context, namespaceName, componentReleaseName string) (*gen.ComponentRelease, error)

GetComponentRelease retrieves a specific component release

func (*Client) GetComponentType added in v0.16.0

func (c *Client) GetComponentType(ctx context.Context, namespaceName, ctName string) (*gen.ComponentType, error)

GetComponentType retrieves a specific component type

func (*Client) GetComponentTypeSchema added in v0.17.0

func (c *Client) GetComponentTypeSchema(ctx context.Context, namespaceName, ctName string) (*json.RawMessage, error)

GetComponentTypeSchema retrieves the parameter schema for a component type

func (*Client) GetDataPlane added in v0.17.0

func (c *Client) GetDataPlane(ctx context.Context, namespaceName, dpName string) (*gen.DataPlane, error)

GetDataPlane retrieves a specific data plane

func (*Client) GetDeploymentPipeline added in v0.17.0

func (c *Client) GetDeploymentPipeline(ctx context.Context, namespaceName, deploymentPipelineName string) (*gen.DeploymentPipeline, error)

GetDeploymentPipeline retrieves a specific deployment pipeline

func (*Client) GetEnvironment added in v0.15.0

func (c *Client) GetEnvironment(ctx context.Context, namespaceName, envName string) (*gen.Environment, error)

GetEnvironment retrieves an environment by name

func (*Client) GetNamespace added in v0.17.0

func (c *Client) GetNamespace(ctx context.Context, namespaceName string) (*gen.Namespace, error)

GetNamespace retrieves a specific namespace

func (*Client) GetNamespaceRole added in v0.17.0

func (c *Client) GetNamespaceRole(ctx context.Context, namespaceName, name string) (*gen.AuthzRole, error)

GetNamespaceRole retrieves a specific namespace-scoped authorization role

func (*Client) GetNamespaceRoleBinding added in v0.17.0

func (c *Client) GetNamespaceRoleBinding(ctx context.Context, namespaceName, name string) (*gen.AuthzRoleBinding, error)

GetNamespaceRoleBinding retrieves a specific namespace-scoped role binding

func (*Client) GetObservabilityAlertsNotificationChannel added in v0.17.0

func (c *Client) GetObservabilityAlertsNotificationChannel(ctx context.Context, namespaceName, channelName string) (*gen.ObservabilityAlertsNotificationChannel, error)

GetObservabilityAlertsNotificationChannel retrieves a specific observability alerts notification channel

func (*Client) GetObservabilityPlane added in v0.17.0

func (c *Client) GetObservabilityPlane(ctx context.Context, namespaceName, observabilityPlaneName string) (*gen.ObservabilityPlane, error)

GetObservabilityPlane retrieves a specific observability plane

func (*Client) GetProject added in v0.14.0

func (c *Client) GetProject(ctx context.Context, namespaceName, projectName string) (*gen.Project, error)

GetProject retrieves a project by name

func (*Client) GetProjectDeploymentPipeline added in v0.14.0

func (c *Client) GetProjectDeploymentPipeline(ctx context.Context, namespaceName, projectName string) (*gen.DeploymentPipeline, error)

GetProjectDeploymentPipeline retrieves a project's deployment pipeline by first resolving the pipeline name from the project, then fetching the pipeline.

func (*Client) GetReleaseBinding added in v0.17.0

func (c *Client) GetReleaseBinding(ctx context.Context, namespaceName, releaseBindingName string) (*gen.ReleaseBinding, error)

GetReleaseBinding retrieves a specific release binding

func (*Client) GetSecretReference added in v0.17.0

func (c *Client) GetSecretReference(ctx context.Context, namespaceName, secretReferenceName string) (*gen.SecretReference, error)

GetSecretReference retrieves a specific secret reference

func (*Client) GetTrait added in v0.16.0

func (c *Client) GetTrait(ctx context.Context, namespaceName, traitName string) (*gen.Trait, error)

GetTrait retrieves a specific trait

func (*Client) GetTraitSchema added in v0.17.0

func (c *Client) GetTraitSchema(ctx context.Context, namespaceName, traitName string) (*json.RawMessage, error)

GetTraitSchema retrieves the parameter schema for a trait

func (*Client) GetWorkflow added in v0.17.0

func (c *Client) GetWorkflow(ctx context.Context, namespaceName, workflowName string) (*gen.Workflow, error)

GetWorkflow retrieves a specific workflow by name

func (*Client) GetWorkflowPlane added in v1.0.0

func (c *Client) GetWorkflowPlane(ctx context.Context, namespaceName, workflowPlaneName string) (*gen.WorkflowPlane, error)

GetWorkflowPlane retrieves a specific workflow plane

func (*Client) GetWorkflowRun added in v0.17.0

func (c *Client) GetWorkflowRun(ctx context.Context, namespaceName, runName string) (*gen.WorkflowRun, error)

GetWorkflowRun retrieves a specific workflow run

func (*Client) GetWorkflowRunLogs added in v0.17.0

func (c *Client) GetWorkflowRunLogs(ctx context.Context, namespaceName, runName string, params *gen.GetWorkflowRunLogsParams) ([]gen.WorkflowRunLogEntry, error)

GetWorkflowRunLogs retrieves live logs for a workflow run from the workflow plane

func (*Client) GetWorkflowRunStatus added in v0.17.0

func (c *Client) GetWorkflowRunStatus(ctx context.Context, namespaceName, runName string) (*gen.WorkflowRunStatusResponse, error)

GetWorkflowRunStatus retrieves the status of a workflow run including live observability info

func (*Client) GetWorkflowSchema added in v0.17.0

func (c *Client) GetWorkflowSchema(ctx context.Context, namespaceName, workflowName string) (*json.RawMessage, error)

GetWorkflowSchema retrieves the parameter schema for a workflow

func (*Client) GetWorkload added in v0.17.0

func (c *Client) GetWorkload(ctx context.Context, namespaceName, workloadName string) (*gen.Workload, error)

GetWorkload retrieves a specific workload

func (*Client) ListClusterComponentTypes added in v0.16.0

func (c *Client) ListClusterComponentTypes(ctx context.Context, params *gen.ListClusterComponentTypesParams) (*gen.ClusterComponentTypeList, error)

ListClusterComponentTypes retrieves all cluster-scoped component types

func (*Client) ListClusterDataPlanes added in v1.0.0

func (c *Client) ListClusterDataPlanes(ctx context.Context, params *gen.ListClusterDataPlanesParams) (*gen.ClusterDataPlaneList, error)

ListClusterDataPlanes retrieves all cluster-scoped data planes

func (*Client) ListClusterObservabilityPlanes added in v1.0.0

func (c *Client) ListClusterObservabilityPlanes(ctx context.Context, params *gen.ListClusterObservabilityPlanesParams) (*gen.ClusterObservabilityPlaneList, error)

ListClusterObservabilityPlanes retrieves all cluster-scoped observability planes

func (*Client) ListClusterRoleBindings added in v0.17.0

func (c *Client) ListClusterRoleBindings(ctx context.Context, params *gen.ListClusterRoleBindingsParams) (*gen.ClusterAuthzRoleBindingList, error)

ListClusterRoleBindings retrieves all cluster-scoped role bindings

func (*Client) ListClusterRoles added in v0.17.0

func (c *Client) ListClusterRoles(ctx context.Context, params *gen.ListClusterRolesParams) (*gen.ClusterAuthzRoleList, error)

ListClusterRoles retrieves all cluster-scoped authorization roles

func (*Client) ListClusterTraits added in v0.16.0

func (c *Client) ListClusterTraits(ctx context.Context, params *gen.ListClusterTraitsParams) (*gen.ClusterTraitList, error)

ListClusterTraits retrieves all cluster-scoped traits

func (*Client) ListClusterWorkflowPlanes added in v1.0.0

func (c *Client) ListClusterWorkflowPlanes(ctx context.Context, params *gen.ListClusterWorkflowPlanesParams) (*gen.ClusterWorkflowPlaneList, error)

ListClusterWorkflowPlanes retrieves all cluster-scoped workflow planes

func (*Client) ListClusterWorkflows added in v1.0.0

func (c *Client) ListClusterWorkflows(ctx context.Context, params *gen.ListClusterWorkflowsParams) (*gen.ClusterWorkflowList, error)

ListClusterWorkflows retrieves all cluster-scoped workflows

func (*Client) ListComponentReleases added in v0.14.0

func (c *Client) ListComponentReleases(ctx context.Context, namespaceName, projectName, componentName string) (*gen.ComponentReleaseList, error)

ListComponentReleases retrieves all component releases for a component

func (*Client) ListComponentTypes added in v0.13.0

func (c *Client) ListComponentTypes(ctx context.Context, namespaceName string, params *gen.ListComponentTypesParams) (*gen.ComponentTypeList, error)

ListComponentTypes retrieves all component types for a namespace

func (*Client) ListComponents added in v0.13.0

func (c *Client) ListComponents(ctx context.Context, namespaceName, projectName string, params *gen.ListComponentsParams) (*gen.ComponentList, error)

ListComponents retrieves all components for a namespace, optionally filtered by project

func (*Client) ListDataPlanes added in v0.13.0

func (c *Client) ListDataPlanes(ctx context.Context, namespaceName string, params *gen.ListDataPlanesParams) (*gen.DataPlaneList, error)

ListDataPlanes retrieves all data planes for a namespace

func (*Client) ListDeploymentPipelines added in v0.17.0

func (c *Client) ListDeploymentPipelines(ctx context.Context, namespaceName string, params *gen.ListDeploymentPipelinesParams) (*gen.DeploymentPipelineList, error)

ListDeploymentPipelines retrieves all deployment pipelines for a namespace

func (*Client) ListEnvironments added in v0.13.0

func (c *Client) ListEnvironments(ctx context.Context, namespaceName string, params *gen.ListEnvironmentsParams) (*gen.EnvironmentList, error)

ListEnvironments retrieves all environments for a namespace

func (*Client) ListNamespaceRoleBindings added in v0.17.0

func (c *Client) ListNamespaceRoleBindings(ctx context.Context, namespaceName string, params *gen.ListNamespaceRoleBindingsParams) (*gen.AuthzRoleBindingList, error)

ListNamespaceRoleBindings retrieves all namespace-scoped role bindings

func (*Client) ListNamespaceRoles added in v0.17.0

func (c *Client) ListNamespaceRoles(ctx context.Context, namespaceName string, params *gen.ListNamespaceRolesParams) (*gen.AuthzRoleList, error)

ListNamespaceRoles retrieves all namespace-scoped authorization roles

func (*Client) ListNamespaces added in v0.13.0

func (c *Client) ListNamespaces(ctx context.Context, params *gen.ListNamespacesParams) (*gen.NamespaceList, error)

ListNamespaces retrieves all namespaces

func (*Client) ListObservabilityAlertsNotificationChannels added in v0.17.0

func (c *Client) ListObservabilityAlertsNotificationChannels(ctx context.Context, namespaceName string, params *gen.ListObservabilityAlertsNotificationChannelsParams) (*gen.ObservabilityAlertsNotificationChannelList, error)

ListObservabilityAlertsNotificationChannels retrieves all observability alerts notification channels for a namespace

func (*Client) ListObservabilityPlanes added in v0.13.0

func (c *Client) ListObservabilityPlanes(ctx context.Context, namespaceName string, params *gen.ListObservabilityPlanesParams) (*gen.ObservabilityPlaneList, error)

ListObservabilityPlanes retrieves all observability planes for a namespace

func (*Client) ListProjects added in v0.13.0

func (c *Client) ListProjects(ctx context.Context, namespaceName string, params *gen.ListProjectsParams) (*gen.ProjectList, error)

ListProjects retrieves all projects for a namespace

func (*Client) ListReleaseBindings added in v0.14.0

func (c *Client) ListReleaseBindings(ctx context.Context, namespaceName, projectName, componentName string) (*gen.ReleaseBindingList, error)

ListReleaseBindings retrieves all release bindings for a component

func (*Client) ListSecretReferences added in v0.13.0

func (c *Client) ListSecretReferences(ctx context.Context, namespaceName string, params *gen.ListSecretReferencesParams) (*gen.SecretReferenceList, error)

ListSecretReferences retrieves all secret references for a namespace

func (*Client) ListTraits added in v0.13.0

func (c *Client) ListTraits(ctx context.Context, namespaceName string, params *gen.ListTraitsParams) (*gen.TraitList, error)

ListTraits retrieves all traits for a namespace

func (*Client) ListWorkflowPlanes added in v1.0.0

func (c *Client) ListWorkflowPlanes(ctx context.Context, namespaceName string, params *gen.ListWorkflowPlanesParams) (*gen.WorkflowPlaneList, error)

ListWorkflowPlanes retrieves all workflow planes for a namespace

func (*Client) ListWorkflowRuns added in v0.14.0

func (c *Client) ListWorkflowRuns(ctx context.Context, namespaceName string, params *gen.ListWorkflowRunsParams) (*gen.WorkflowRunList, error)

ListWorkflowRuns retrieves all workflow runs for a namespace

func (*Client) ListWorkflows added in v0.13.0

func (c *Client) ListWorkflows(ctx context.Context, namespaceName string, params *gen.ListWorkflowsParams) (*gen.WorkflowList, error)

ListWorkflows retrieves all workflows for a namespace

func (*Client) ListWorkloads added in v0.17.0

func (c *Client) ListWorkloads(ctx context.Context, namespaceName string, params *gen.ListWorkloadsParams) (*gen.WorkloadList, error)

ListWorkloads retrieves all workloads for a namespace

func (*Client) UpdateComponentType added in v0.16.0

func (c *Client) UpdateComponentType(ctx context.Context, namespaceName, ctName string, ct gen.ComponentType) (*gen.ComponentType, error)

UpdateComponentType updates an existing component type

func (*Client) UpdateReleaseBinding added in v0.16.0

func (c *Client) UpdateReleaseBinding(ctx context.Context, namespaceName, bindingName string, req gen.ReleaseBinding) (*gen.ReleaseBinding, error)

UpdateReleaseBinding updates a release binding

func (*Client) UpdateTrait added in v0.16.0

func (c *Client) UpdateTrait(ctx context.Context, namespaceName, traitName string, t gen.Trait) (*gen.Trait, error)

UpdateTrait updates an existing trait

type ComponentLogsRequest added in v0.15.0

type ComponentLogsRequest struct {
	StartTime       string   `json:"startTime"`
	EndTime         string   `json:"endTime"`
	EnvironmentID   string   `json:"environmentId"`
	ComponentName   string   `json:"componentName"`
	ProjectName     string   `json:"projectName"`
	NamespaceName   string   `json:"namespaceName"`
	EnvironmentName string   `json:"environmentName"`
	Limit           int64    `json:"limit"`
	SortOrder       string   `json:"sortOrder"`
	LogType         string   `json:"logType"`
	SearchPhrase    string   `json:"searchPhrase,omitempty"`
	LogLevels       []string `json:"logLevels,omitempty"`
}

ComponentLogsRequest represents the request body for component logs API

type ComponentResponse

type ComponentResponse struct {
	Name          string `json:"name"`
	NamespaceName string `json:"namespaceName"`
	ProjectName   string `json:"projectName"`
	DisplayName   string `json:"displayName,omitempty"`
	Description   string `json:"description,omitempty"`
	Type          string `json:"type"`
	CreatedAt     string `json:"createdAt"`
	Status        string `json:"status,omitempty"`
}

ComponentResponse represents a component from the API

type ListComponentsResponse

type ListComponentsResponse struct {
	Success bool `json:"success"`
	Data    struct {
		Items      []ComponentResponse `json:"items"`
		TotalCount int                 `json:"totalCount"`
		Page       int                 `json:"page"`
		PageSize   int                 `json:"pageSize"`
	} `json:"data"`
	Error string `json:"error,omitempty"`
	Code  string `json:"code,omitempty"`
}

ListComponentsResponse represents the response from listing components

type ListNamespacesResponse added in v0.13.0

type ListNamespacesResponse struct {
	Success bool         `json:"success"`
	Data    ListResponse `json:"data"`
	Error   string       `json:"error,omitempty"`
	Code    string       `json:"code,omitempty"`
}

ListNamespacesResponse represents the response from listing namespaces

type ListProjectsResponse

type ListProjectsResponse struct {
	Success bool `json:"success"`
	Data    struct {
		Items      []ProjectResponse `json:"items"`
		TotalCount int               `json:"totalCount"`
		Page       int               `json:"page"`
		PageSize   int               `json:"pageSize"`
	} `json:"data"`
	Error string `json:"error,omitempty"`
	Code  string `json:"code,omitempty"`
}

ListProjectsResponse represents the response from listing projects

type ListResponse

type ListResponse struct {
	Items      []NamespaceResponse `json:"items"`
	TotalCount int                 `json:"totalCount"`
	Page       int                 `json:"page"`
	PageSize   int                 `json:"pageSize"`
}

ListResponse represents a paginated list response

type LogEntry added in v0.15.0

type LogEntry struct {
	Timestamp string `json:"timestamp"`
	Log       string `json:"log"`
	Level     string `json:"level,omitempty"`
	Stream    string `json:"stream,omitempty"`
}

LogEntry represents a single log entry from observer

type LogResponse added in v0.15.0

type LogResponse struct {
	Logs       []LogEntry `json:"logs"`
	TotalCount int        `json:"totalCount"`
	TookMs     int        `json:"tookMs"`
}

LogResponse represents the response from the observer logs API

type NamespaceResponse added in v0.13.0

type NamespaceResponse struct {
	Name        string `json:"name"`
	DisplayName string `json:"displayName,omitempty"`
	Description string `json:"description,omitempty"`
	Status      string `json:"status"`
	CreatedAt   string `json:"createdAt"`
}

NamespaceResponse represents an namespace from the API

type ObserverClient added in v0.15.0

type ObserverClient struct {
	// contains filtered or unexported fields
}

ObserverClient provides HTTP client for Observer API

func NewObserverClient added in v0.15.0

func NewObserverClient(observerURL, token string) *ObserverClient

NewObserverClient creates a new Observer API client

func (*ObserverClient) FetchComponentLogs added in v0.15.0

func (c *ObserverClient) FetchComponentLogs(ctx context.Context, req ComponentLogsRequest) (*LogResponse, error)

FetchComponentLogs fetches logs for a component from the observer API

func (*ObserverClient) FetchWorkflowRunLogs added in v0.17.0

func (c *ObserverClient) FetchWorkflowRunLogs(ctx context.Context, runName string, req WorkflowRunLogsRequest) (*LogResponse, error)

FetchWorkflowRunLogs fetches archived logs for a workflow run from the observer API

type ProjectResponse

type ProjectResponse struct {
	Name               string `json:"name"`
	NamespaceName      string `json:"namespaceName"`
	DisplayName        string `json:"displayName,omitempty"`
	Description        string `json:"description,omitempty"`
	DeploymentPipeline string `json:"deploymentPipeline,omitempty"`
	CreatedAt          string `json:"createdAt"`
	Status             string `json:"status,omitempty"`
}

ProjectResponse represents a project from the API

type WorkflowRunLogsRequest added in v0.17.0

type WorkflowRunLogsRequest struct {
	NamespaceName string `json:"namespaceName"`
	StartTime     string `json:"startTime"`
	EndTime       string `json:"endTime"`
	Limit         int    `json:"limit,omitempty"`
	SortOrder     string `json:"sortOrder,omitempty"`
}

WorkflowRunLogsRequest represents the request body for workflow run logs API

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL