Documentation
¶
Index ¶
- type APIResponse
- type BindingReleaseState
- type BindingResponse
- type BindingStatus
- type BindingStatusType
- type BuildPlaneResponse
- type BuildResponse
- type BuildTemplateParameter
- type BuildTemplateResponse
- type ComponentReleaseResponse
- type ComponentResponse
- type ComponentTypeResponse
- type ContainerOverride
- type CreateComponentReleaseRequest
- type CreateComponentRequest
- type CreateDataPlaneRequest
- type CreateEnvironmentRequest
- type CreateProjectRequest
- type DataPlaneResponse
- type DeployReleaseRequest
- type DeploymentPipelineResponse
- type EndpointStatus
- type EnvVar
- type EnvVarValueFrom
- type EnvironmentResponse
- type ExposedEndpoint
- type FileVar
- type ListResponse
- type OrganizationResponse
- type PatchReleaseBindingRequest
- type ProjectResponse
- type PromoteComponentRequest
- type PromotionPath
- type ReleaseBindingResponse
- type ReleaseResponse
- type ScheduledTaskBinding
- type SecretKeyRef
- type ServiceBinding
- type TargetEnvironmentRef
- type TemplateParameter
- type TraitResponse
- type UpdateBindingRequest
- type UpdateWorkflowSchemaRequest
- type WebApplicationBinding
- type Workflow
- type WorkflowResponse
- type WorkloadOverrides
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIResponse ¶
type APIResponse[T any] struct { Success bool `json:"success"` Data T `json:"data,omitempty"` Error string `json:"error,omitempty"` Code string `json:"code,omitempty"` }
APIResponse represents a standard API response wrapper
func ErrorResponse ¶
func ErrorResponse(message, code string) APIResponse[any]
func ListSuccessResponse ¶
func ListSuccessResponse[T any](items []T, total, page, pageSize int) APIResponse[ListResponse[T]]
func SuccessResponse ¶
func SuccessResponse[T any](data T) APIResponse[T]
type BindingReleaseState ¶
type BindingReleaseState string
const ( ReleaseStateActive BindingReleaseState = "Active" ReleaseStateSuspend BindingReleaseState = "Suspend" ReleaseStateUndeploy BindingReleaseState = "Undeploy" )
type BindingResponse ¶
type BindingResponse struct {
Name string `json:"name"`
Type string `json:"type"`
ComponentName string `json:"componentName"`
ProjectName string `json:"projectName"`
OrgName string `json:"orgName"`
Environment string `json:"environment"`
BindingStatus BindingStatus `json:"status"`
// Component-specific binding data
ServiceBinding *ServiceBinding `json:"serviceBinding,omitempty"`
WebApplicationBinding *WebApplicationBinding `json:"webApplicationBinding,omitempty"`
ScheduledTaskBinding *ScheduledTaskBinding `json:"scheduledTaskBinding,omitempty"`
}
type BindingStatus ¶
type BindingStatus struct {
Reason string `json:"reason"`
Message string `json:"message"`
Status BindingStatusType `json:"status"`
LastTransitioned time.Time `json:"lastTransitioned"`
}
type BindingStatusType ¶
type BindingStatusType string
const ( BindingStatusTypeInProgress BindingStatusType = "InProgress" BindingStatusTypeReady BindingStatusType = "Active" BindingStatusTypeFailed BindingStatusType = "Failed" BindingStatusTypeSuspended BindingStatusType = "Suspended" BindingStatusTypeUndeployed BindingStatusType = "NotYetDeployed" )
type BuildPlaneResponse ¶
type BuildPlaneResponse struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
KubernetesClusterName string `json:"kubernetesClusterName"`
APIServerURL string `json:"apiServerURL"`
ObserverURL string `json:"observerURL,omitempty"`
ObserverUsername string `json:"observerUsername,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
BuildPlaneResponse represents a buildplane in API responses
type BuildResponse ¶
type BuildResponse struct {
Name string `json:"name"`
UUID string `json:"uuid"`
ComponentName string `json:"componentName"`
ProjectName string `json:"projectName"`
OrgName string `json:"orgName"`
Commit string `json:"commit,omitempty"`
Status string `json:"status,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Image string `json:"image,omitempty"`
}
BuildResponse represents a build in API responses
type BuildTemplateParameter ¶
type BuildTemplateParameter struct {
Name string `json:"name"`
Default string `json:"default,omitempty"`
}
BuildTemplateParameter represents a parameter of a build template
type BuildTemplateResponse ¶
type BuildTemplateResponse struct {
Name string `json:"name"`
Parameters []BuildTemplateParameter `json:"parameters,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
BuildTemplateResponse represents a build template (ClusterWorkflowTemplate) in API responses
type ComponentReleaseResponse ¶ added in v0.5.0
type ComponentReleaseResponse struct {
Name string `json:"name"`
ComponentName string `json:"componentName"`
ProjectName string `json:"projectName"`
OrgName string `json:"orgName"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
ComponentReleaseResponse represents a ComponentRelease in API responses
type ComponentResponse ¶
type ComponentResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Type string `json:"type"`
ProjectName string `json:"projectName"`
OrgName string `json:"orgName"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
Service *openchoreov1alpha1.ServiceSpec `json:"service,omitempty"`
WebApplication *openchoreov1alpha1.WebApplicationSpec `json:"webApplication,omitempty"`
ScheduledTask *openchoreov1alpha1.ScheduledTaskSpec `json:"scheduledTask,omitempty"`
API *openchoreov1alpha1.APISpec `json:"api,omitempty"`
Workload *openchoreov1alpha1.WorkloadSpec `json:"workload,omitempty"`
Workflow *Workflow `json:"workflow,omitempty"`
}
ComponentResponse represents a component in API responses
type ComponentTypeResponse ¶ added in v0.4.0
type ComponentTypeResponse struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
WorkloadType string `json:"workloadType"`
AllowedWorkflows []string `json:"allowedWorkflows,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
ComponentTypeResponse represents a ComponentType in API responses
type ContainerOverride ¶ added in v0.5.0
type ContainerOverride struct {
// Environment variable overrides
// +optional
Env []EnvVar `json:"env,omitempty"`
// File configuration overrides
// +optional
Files []FileVar `json:"files,omitempty"`
}
ContainerOverride represents overrides for a specific container
type CreateComponentReleaseRequest ¶ added in v0.5.0
type CreateComponentReleaseRequest struct {
ReleaseName string `json:"releaseName,omitempty"`
}
func (*CreateComponentReleaseRequest) Sanitize ¶ added in v0.5.0
func (req *CreateComponentReleaseRequest) Sanitize()
Sanitize sanitizes the CreateComponentReleaseRequest by trimming whitespace
type CreateComponentRequest ¶
type CreateComponentRequest struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Type string `json:"type"`
Workflow *Workflow `json:"workflow,omitempty"`
}
CreateComponentRequest represents the request to create a new component
func (*CreateComponentRequest) Sanitize ¶
func (req *CreateComponentRequest) Sanitize()
Sanitize sanitizes the CreateComponentRequest by trimming whitespace
func (*CreateComponentRequest) Validate ¶
func (req *CreateComponentRequest) Validate() error
Validate validates the CreateComponentRequest
type CreateDataPlaneRequest ¶
type CreateDataPlaneRequest struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
KubernetesClusterName string `json:"kubernetesClusterName"`
APIServerURL string `json:"apiServerURL"`
CACert string `json:"caCert"`
ClientCert string `json:"clientCert"`
ClientKey string `json:"clientKey"`
PublicVirtualHost string `json:"publicVirtualHost"`
OrganizationVirtualHost string `json:"organizationVirtualHost"`
ObserverURL string `json:"observerURL,omitempty"`
ObserverUsername string `json:"observerUsername,omitempty"`
ObserverPassword string `json:"observerPassword,omitempty"`
}
CreateDataPlaneRequest represents the request to create a new dataplane
func (*CreateDataPlaneRequest) Sanitize ¶
func (req *CreateDataPlaneRequest) Sanitize()
Sanitize sanitizes the CreateDataPlaneRequest by trimming whitespace
func (*CreateDataPlaneRequest) Validate ¶
func (req *CreateDataPlaneRequest) Validate() error
Validate validates the CreateDataPlaneRequest
type CreateEnvironmentRequest ¶
type CreateEnvironmentRequest struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
DataPlaneRef string `json:"dataPlaneRef,omitempty"`
IsProduction bool `json:"isProduction"`
DNSPrefix string `json:"dnsPrefix,omitempty"`
}
CreateEnvironmentRequest represents the request to create a new environment
func (*CreateEnvironmentRequest) Sanitize ¶
func (req *CreateEnvironmentRequest) Sanitize()
Sanitize sanitizes the CreateEnvironmentRequest by trimming whitespace
func (*CreateEnvironmentRequest) Validate ¶
func (req *CreateEnvironmentRequest) Validate() error
Validate validates the CreateEnvironmentRequest
type CreateProjectRequest ¶
type CreateProjectRequest struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
DeploymentPipeline string `json:"deploymentPipeline,omitempty"`
}
CreateProjectRequest represents the request to create a new project
func (*CreateProjectRequest) Sanitize ¶
func (req *CreateProjectRequest) Sanitize()
Sanitize sanitizes the CreateProjectRequest by trimming whitespace
func (*CreateProjectRequest) Validate ¶
func (req *CreateProjectRequest) Validate() error
Validate validates the CreateProjectRequest
type DataPlaneResponse ¶
type DataPlaneResponse struct {
Name string `json:"name"`
Namespace string `json:"namespace"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
ImagePullSecretRefs []string `json:"imagePullSecretRefs,omitempty"`
SecretStoreRef string `json:"secretStoreRef,omitempty"`
KubernetesClusterName string `json:"kubernetesClusterName"`
APIServerURL string `json:"apiServerURL"`
PublicVirtualHost string `json:"publicVirtualHost"`
OrganizationVirtualHost string `json:"organizationVirtualHost"`
ObserverURL string `json:"observerURL,omitempty"`
ObserverUsername string `json:"observerUsername,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
DataPlaneResponse represents a dataplane in API responses
type DeployReleaseRequest ¶ added in v0.5.0
type DeployReleaseRequest struct {
ReleaseName string `json:"releaseName"`
}
DeployReleaseRequest represents the request to deploy a release to the lowest environment
func (*DeployReleaseRequest) Sanitize ¶ added in v0.5.0
func (req *DeployReleaseRequest) Sanitize()
Sanitize sanitizes the DeployReleaseRequest by trimming whitespace
func (*DeployReleaseRequest) Validate ¶ added in v0.5.0
func (req *DeployReleaseRequest) Validate() error
Validate validates the DeployReleaseRequest
type DeploymentPipelineResponse ¶
type DeploymentPipelineResponse struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
OrgName string `json:"orgName"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
PromotionPaths []PromotionPath `json:"promotionPaths,omitempty"`
}
DeploymentPipelineResponse represents a deployment pipeline in API responses
type EndpointStatus ¶
type EndpointStatus struct {
Name string `json:"name"`
Type string `json:"type"`
Project *ExposedEndpoint `json:"project,omitempty"`
Organization *ExposedEndpoint `json:"organization,omitempty"`
Public *ExposedEndpoint `json:"public,omitempty"`
}
type EnvVar ¶ added in v0.5.0
type EnvVar struct {
Key string `json:"key"`
Value string `json:"value,omitempty"`
// Extract the environment variable value from another resource.
// Mutually exclusive with value.
// +optional
ValueFrom *EnvVarValueFrom `json:"valueFrom,omitempty"`
}
EnvVar represents an environment variable
type EnvVarValueFrom ¶ added in v0.5.0
type EnvVarValueFrom struct {
// Reference to a secret resource.
// +optional
SecretRef *SecretKeyRef `json:"secretRef,omitempty"`
}
EnvVarValueFrom holds references to external sources for environment variables and files
type EnvironmentResponse ¶
type EnvironmentResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
Namespace string `json:"namespace"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
DataPlaneRef string `json:"dataPlaneRef,omitempty"`
IsProduction bool `json:"isProduction"`
DNSPrefix string `json:"dnsPrefix,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
EnvironmentResponse represents an environment in API responses
type ExposedEndpoint ¶
type FileVar ¶ added in v0.5.0
type FileVar struct {
Key string `json:"key"`
MountPath string `json:"mountPath"`
Value string `json:"value,omitempty"`
// Extract the file value from another resource.
// Mutually exclusive with value.
// +optional
ValueFrom *EnvVarValueFrom `json:"valueFrom,omitempty"`
}
FileVar represents a file configuration
type ListResponse ¶
type ListResponse[T any] struct { Items []T `json:"items"` TotalCount int `json:"totalCount"` Page int `json:"page"` PageSize int `json:"pageSize"` }
ListResponse represents a paginated list response
type OrganizationResponse ¶
type OrganizationResponse struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
Namespace string `json:"namespace,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
OrganizationResponse represents an organization in API responses
type PatchReleaseBindingRequest ¶ added in v0.5.0
type PatchReleaseBindingRequest struct {
// ReleaseName is the name of the release to bind (required when creating a new binding)
// +optional
ReleaseName string `json:"releaseName,omitempty"`
// Environment is the target environment (required when creating a new binding)
// +optional
Environment string `json:"environment,omitempty"`
// ComponentTypeEnvOverrides for ComponentType envOverrides parameters
// These values override the defaults defined in the Component for this specific environment
// +optional
ComponentTypeEnvOverrides map[string]interface{} `json:"componentTypeEnvOverrides,omitempty"`
// TraitOverrides provides environment-specific overrides for trait configurations
// Keyed by instanceName (which must be unique across all traits in the component)
// Structure: map[instanceName]overrideValues
// +optional
TraitOverrides map[string]map[string]interface{} `json:"traitOverrides,omitempty"`
// WorkloadOverrides provides environment-specific overrides for the entire workload spec
// These values override the workload specification for this specific environment
// +optional
WorkloadOverrides *WorkloadOverrides `json:"workloadOverrides,omitempty"`
}
PatchReleaseBindingRequest represents the request to patch a ReleaseBinding
type ProjectResponse ¶
type ProjectResponse struct {
UID string `json:"uid"`
Name string `json:"name"`
OrgName string `json:"orgName"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
DeploymentPipeline string `json:"deploymentPipeline,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
ProjectResponse represents a project in API responses
type PromoteComponentRequest ¶
type PromoteComponentRequest struct {
SourceEnvironment string `json:"sourceEnv"`
TargetEnvironment string `json:"targetEnv"`
}
PromoteComponentRequest Promote from one environment to another
func (*PromoteComponentRequest) Sanitize ¶
func (req *PromoteComponentRequest) Sanitize()
Sanitize sanitizes the PromoteComponentRequest by trimming whitespace
func (*PromoteComponentRequest) Validate ¶
func (req *PromoteComponentRequest) Validate() error
Validate validates the PromoteComponentRequest
type PromotionPath ¶
type PromotionPath struct {
SourceEnvironmentRef string `json:"sourceEnvironmentRef"`
TargetEnvironmentRefs []TargetEnvironmentRef `json:"targetEnvironmentRefs"`
}
PromotionPath represents a promotion path in the deployment pipeline
type ReleaseBindingResponse ¶ added in v0.5.0
type ReleaseBindingResponse struct {
Name string `json:"name"`
ComponentName string `json:"componentName"`
ProjectName string `json:"projectName"`
OrgName string `json:"orgName"`
Environment string `json:"environment"`
ReleaseName string `json:"releaseName"`
ComponentTypeEnvOverrides map[string]interface{} `json:"componentTypeEnvOverrides,omitempty"`
TraitOverrides map[string]interface{} `json:"traitOverrides,omitempty"`
WorkloadOverrides *WorkloadOverrides `json:"workloadOverrides,omitempty"`
CreatedAt time.Time `json:"createdAt"`
Status string `json:"status,omitempty"`
}
ReleaseBindingResponse represents a ReleaseBinding in API responses
type ReleaseResponse ¶ added in v0.5.0
type ReleaseResponse struct {
Spec openchoreov1alpha1.ReleaseSpec `json:"spec"`
Status openchoreov1alpha1.ReleaseStatus `json:"status"`
}
ReleaseResponse represents a Release in API responses
type ScheduledTaskBinding ¶
type SecretKeyRef ¶ added in v0.5.0
SecretKeyRef references a specific key in a secret
type ServiceBinding ¶
type ServiceBinding struct {
Endpoints []EndpointStatus `json:"endpoints"`
Image string `json:"image,omitempty"`
ReleaseState string `json:"releaseState,omitempty"`
}
type TargetEnvironmentRef ¶
type TargetEnvironmentRef struct {
Name string `json:"name"`
RequiresApproval bool `json:"requiresApproval,omitempty"`
IsManualApprovalRequired bool `json:"isManualApprovalRequired,omitempty"`
}
TargetEnvironmentRef represents a target environment reference with approval settings
type TemplateParameter ¶
type TraitResponse ¶ added in v0.4.0
type TraitResponse struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
TraitResponse represents an Trait in API responses
type UpdateBindingRequest ¶
type UpdateBindingRequest struct {
// ReleaseState controls the state of the Release created by this binding.
// Valid values: Active, Suspend, Undeploy
ReleaseState BindingReleaseState `json:"releaseState"`
}
UpdateBindingRequest represents the request to update a component binding Only includes fields that can be updated via PATCH
func (*UpdateBindingRequest) Validate ¶
func (req *UpdateBindingRequest) Validate() error
Validate validates the UpdateBindingRequest
type UpdateWorkflowSchemaRequest ¶ added in v0.5.0
type UpdateWorkflowSchemaRequest struct {
Schema *runtime.RawExtension `json:"schema"`
}
UpdateWorkflowSchemaRequest represents the request to update a component's workflow schema
type WebApplicationBinding ¶
type WebApplicationBinding struct {
Endpoints []EndpointStatus `json:"endpoints"`
Image string `json:"image,omitempty"`
ReleaseState string `json:"releaseState,omitempty"`
}
type Workflow ¶ added in v0.5.0
type Workflow struct {
Name string `json:"name"`
Schema *runtime.RawExtension `json:"schema,omitempty"`
}
type WorkflowResponse ¶ added in v0.4.0
type WorkflowResponse struct {
Name string `json:"name"`
DisplayName string `json:"displayName,omitempty"`
Description string `json:"description,omitempty"`
CreatedAt time.Time `json:"createdAt"`
}
WorkflowResponse represents a Workflow in API responses
type WorkloadOverrides ¶ added in v0.5.0
type WorkloadOverrides struct {
// Containers define the container-specific overrides
// The key is the container name, and the value contains env and file overrides for that container
// +optional
Containers map[string]ContainerOverride `json:"containers,omitempty"`
}
WorkloadOverrides represents environment-specific workload overrides