Documentation
¶
Index ¶
- Constants
- Variables
- type BuildResource
- func (b *BuildResource) CreateBuild(params api.CreateBuildParams) error
- func (b *BuildResource) GetAge(build *openchoreov1alpha1.Build) string
- func (b *BuildResource) GetBuildDuration(build *openchoreov1alpha1.Build) string
- func (b *BuildResource) GetBuildsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Build], error)
- func (b *BuildResource) GetBuildsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Build], error)
- func (b *BuildResource) GetStatus(build *openchoreov1alpha1.Build) string
- func (b *BuildResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (b *BuildResource) PrintTableItems(builds []resources.ResourceWrapper[*openchoreov1alpha1.Build]) error
- func (b *BuildResource) WithNamespace(namespace string)
- type ComponentResource
- func (c *ComponentResource) CreateComponent(params api.CreateComponentParams) error
- func (c *ComponentResource) GetAge(comp *openchoreov1alpha1.Component) string
- func (c *ComponentResource) GetComponentsForProject(projectName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Component], error)
- func (c *ComponentResource) GetStatus(comp *openchoreov1alpha1.Component) string
- func (c *ComponentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (c *ComponentResource) PrintTableItems(components []resources.ResourceWrapper[*openchoreov1alpha1.Component]) error
- func (c *ComponentResource) WithNamespace(namespace string)
- type ConfigurationGroupResource
- func (d *ConfigurationGroupResource) GetAge(cg *openchoreov1alpha1.ConfigurationGroup) string
- func (d *ConfigurationGroupResource) GetStatus(cg *openchoreov1alpha1.ConfigurationGroup) string
- func (d *ConfigurationGroupResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *ConfigurationGroupResource) PrintTableItems(cgs []resources.ResourceWrapper[*openchoreov1alpha1.ConfigurationGroup]) error
- func (d *ConfigurationGroupResource) WithNamespace(namespace string)
- type DataPlaneResource
- func (d *DataPlaneResource) CreateDataPlane(params api.CreateDataPlaneParams) error
- func (d *DataPlaneResource) GetAge(dataPlane *openchoreov1alpha1.DataPlane) string
- func (d *DataPlaneResource) GetDataPlanesForOrganization(orgName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DataPlane], error)
- func (d *DataPlaneResource) GetStatus(dataPlane *openchoreov1alpha1.DataPlane) string
- func (d *DataPlaneResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *DataPlaneResource) PrintTableItems(dataPlanes []resources.ResourceWrapper[*openchoreov1alpha1.DataPlane]) error
- func (d *DataPlaneResource) WithNamespace(namespace string)
- type DeployableArtifactResource
- func (d *DeployableArtifactResource) CreateDeployableArtifact(params api.CreateDeployableArtifactParams) error
- func (d *DeployableArtifactResource) GetAge(artifact *openchoreov1alpha1.DeployableArtifact) string
- func (d *DeployableArtifactResource) GetArtifactSource(artifact *openchoreov1alpha1.DeployableArtifact) string
- func (d *DeployableArtifactResource) GetDeployableArtifactsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact], error)
- func (d *DeployableArtifactResource) GetDeployableArtifactsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact], error)
- func (d *DeployableArtifactResource) GetSource(artifact *openchoreov1alpha1.DeployableArtifact) string
- func (d *DeployableArtifactResource) GetStatus(artifact *openchoreov1alpha1.DeployableArtifact) string
- func (d *DeployableArtifactResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *DeployableArtifactResource) PrintTableItems(artifacts []resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact]) error
- func (d *DeployableArtifactResource) WithNamespace(namespace string)
- type DeploymentPipelineResource
- func (d *DeploymentPipelineResource) CreateDeploymentPipeline(params api.CreateDeploymentPipelineParams) error
- func (d *DeploymentPipelineResource) GetAge(pipeline *openchoreov1alpha1.DeploymentPipeline) string
- func (d *DeploymentPipelineResource) GetStatus(pipeline *openchoreov1alpha1.DeploymentPipeline) string
- func (d *DeploymentPipelineResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *DeploymentPipelineResource) PrintTableItems(pipelines []resources.ResourceWrapper[*openchoreov1alpha1.DeploymentPipeline]) error
- func (d *DeploymentPipelineResource) WithNamespace(namespace string)
- type DeploymentResource
- func (d *DeploymentResource) CreateDeployment(params api.CreateDeploymentParams) error
- func (d *DeploymentResource) GetAge(deployment *openchoreov1alpha1.Deployment) string
- func (d *DeploymentResource) GetDeploymentsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
- func (d *DeploymentResource) GetDeploymentsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
- func (d *DeploymentResource) GetDeploymentsForEnvironment(environmentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
- func (d *DeploymentResource) GetStatus(deployment *openchoreov1alpha1.Deployment) string
- func (d *DeploymentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *DeploymentResource) PrintTableItems(deployments []resources.ResourceWrapper[*openchoreov1alpha1.Deployment]) error
- func (d *DeploymentResource) WithNamespace(namespace string)
- type DeploymentTrackResource
- func (d *DeploymentTrackResource) CreateDeploymentTrack(params api.CreateDeploymentTrackParams) error
- func (d *DeploymentTrackResource) GetAge(track *openchoreov1alpha1.DeploymentTrack) string
- func (d *DeploymentTrackResource) GetAutoDeploy(track *openchoreov1alpha1.DeploymentTrack) string
- func (d *DeploymentTrackResource) GetDeploymentTracksForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeploymentTrack], error)
- func (d *DeploymentTrackResource) GetStatus(track *openchoreov1alpha1.DeploymentTrack) string
- func (d *DeploymentTrackResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (d *DeploymentTrackResource) PrintTableItems(tracks []resources.ResourceWrapper[*openchoreov1alpha1.DeploymentTrack]) error
- func (d *DeploymentTrackResource) WithNamespace(namespace string)
- type EndpointResource
- func (e *EndpointResource) GetAddress(endpoint *openchoreov1alpha1.Endpoint) string
- func (e *EndpointResource) GetAge(endpoint *openchoreov1alpha1.Endpoint) string
- func (e *EndpointResource) GetEndpointsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Endpoint], error)
- func (e *EndpointResource) GetEndpointsForEnvironment(environmentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Endpoint], error)
- func (e *EndpointResource) GetStatus(endpoint *openchoreov1alpha1.Endpoint) string
- func (e *EndpointResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (e *EndpointResource) PrintTableItems(endpoints []resources.ResourceWrapper[*openchoreov1alpha1.Endpoint]) error
- func (e *EndpointResource) WithNamespace(namespace string)
- type EnvironmentResource
- func (e *EnvironmentResource) CreateEnvironment(params api.CreateEnvironmentParams) error
- func (e *EnvironmentResource) GetAge(env *openchoreov1alpha1.Environment) string
- func (e *EnvironmentResource) GetEnvironmentsForOrganization(orgName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Environment], error)
- func (e *EnvironmentResource) GetStatus(env *openchoreov1alpha1.Environment) string
- func (e *EnvironmentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (e *EnvironmentResource) PrintTableItems(environments []resources.ResourceWrapper[*openchoreov1alpha1.Environment]) error
- func (e *EnvironmentResource) WithNamespace(namespace string)
- type OrganizationResource
- func (o *OrganizationResource) CreateOrganization(params api.CreateOrganizationParams) error
- func (o *OrganizationResource) GetAge(org *openchoreov1alpha1.Organization) string
- func (o *OrganizationResource) GetStatus(org *openchoreov1alpha1.Organization) string
- func (o *OrganizationResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (o *OrganizationResource) PrintTableItems(orgs []resources.ResourceWrapper[*openchoreov1alpha1.Organization]) error
- type ProjectResource
- func (p *ProjectResource) CreateProject(params api.CreateProjectParams) error
- func (p *ProjectResource) GetAge(proj *openchoreov1alpha1.Project) string
- func (p *ProjectResource) GetStatus(proj *openchoreov1alpha1.Project) string
- func (p *ProjectResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (p *ProjectResource) PrintTableItems(projects []resources.ResourceWrapper[*openchoreov1alpha1.Project]) error
- func (p *ProjectResource) WithNamespace(namespace string)
- type WorkloadResource
- func (w *WorkloadResource) CreateWorkload(params api.CreateWorkloadParams) error
- func (w *WorkloadResource) GetAge(workload *openchoreov1alpha1.Workload) string
- func (w *WorkloadResource) GetStatus(workload *openchoreov1alpha1.Workload) string
- func (w *WorkloadResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
- func (w *WorkloadResource) PrintTableItems(workloads []resources.ResourceWrapper[*openchoreov1alpha1.Workload]) error
- func (w *WorkloadResource) SetNamespace(namespace string)
Constants ¶
const ( // Common error messages ErrCreateKubeClient = "failed to create Kubernetes client: %w" ErrFormatUnsupported = "unsupported output format: %s" )
Common error messages used across resource implementations
const ( ErrCreateProject = "failed to create project: %w" // Component related errors ErrCreateComponent = "failed to create component: %w" ErrCreateDepTrack = "failed to create deployment track: %w" // Deployment related errors ErrCreateDeployment = "failed to create deployment: %w" // Build related errors ErrCreateBuild = "failed to create build: %w" // Environment related errors ErrCreateEnvironment = "failed to create environment: %w" // Endpoint related errors ErrCreateEndpoint = "failed to create endpoint: %w" // DataPlane related errors ErrCreateDataPlane = "failed to create dataplane: %w" // Organization related errors ErrCreateOrganization = "failed to create organization: %w" // DeployableArtifact related errors ErrCreateArtifact = "failed to create deployable artifact: %w" // DeploymentTrack related errors ErrCreateDeploymentTrack = "failed to create deployment track: %w" // Workload related errors ErrCreateWorkload = "failed to create workload: %w" )
Resource-specific error messages
const ( HeaderName = "NAME" HeaderStatus = "STATUS" HeaderAge = "AGE" HeaderType = "TYPE" HeaderProject = "PROJECT" HeaderOrganization = "ORGANIZATION" HeaderComponent = "COMPONENT" HeaderEnvironment = "ENVIRONMENT" HeaderDeploymentTrack = "DEPLOYMENT TRACK" HeaderRevision = "REVISION" HeaderDuration = "DURATION" HeaderSource = "SOURCE" HeaderArtifact = "ARTIFACT" HeaderAPIVersion = "API VERSION" HeaderAutoDeploy = "AUTO DEPLOY" HeaderDataPlane = "DATA PLANE" HeaderProduction = "PRODUCTION" HeaderDNSPrefix = "DNS PREFIX" HeaderCluster = "CLUSTER" HeaderAddress = "ADDRESS" )
Common header values used across resource types
const ( StatusPending = "Pending" StatusReady = "Ready" StatusNotReady = "Not Ready" StatusInitializing = "Initializing" StatusFailed = "Failed" StatusProgressing = "Progressing" )
Status constants used for resource status reporting
const ( ConditionTypeReady = "Ready" ConditionTypeCreated = "Created" ConditionTypeInitialized = "Initialized" )
Common condition types used across resources
const ( ConditionTypeDeployed = "Deployed" ConditionTypeProgressing = "Progressing" ConditionTypeAvailable = "Available" )
Deployment specific condition types
const ( ConditionTypeStepCloneSucceeded = "StepCloneSucceeded" ConditionTypeStepBuildSucceeded = "StepBuildSucceeded" ConditionTypeStepPushSucceeded = "StepPushSucceeded" ConditionTypeCompleted = "Completed" ConditionTypeDeployableArtifactCreated = "DeployableArtifactCreated" ConditionTypeDeploymentApplied = "DeploymentApplied" )
Build specific condition types
const ( ConditionStatusTrue = "True" ConditionStatusFalse = "False" )
Condition status constants
const ( // Status formatting FmtStatusWithReason = "%s (%s)" FmtStatusWithMessage = "%s: %s - %s" FmtStatusWithType = "%s: %s" FmtStatusWithTypeReason = "%s: %s" )
Format strings for status reporting
const ( FmtDurationSeconds = "%ds" FmtDurationMinSec = "%dm%ds" FmtDurationHourMin = "%dh%dm" )
Duration formatting strings
const ( FmtProjectSuccess = "Project '%s' created successfully in organization '%s'\n" // Component success messages FmtComponentSuccess = "Component '%s' created successfully in project '%s' of organization '%s'\n" // Deployment success messages FmtDeploymentSuccess = "Deployment '%s' created successfully in environment '%s' for component '%s' of project '%s' in organization '%s'\n" FmtDeploySuccessMsg = "Deployment '%s' created successfully in environment '%s' for component '%s' of project '%s' in organization '%s'\n" // Build success messages FmtBuildSuccess = "Build '%s' created successfully for component '%s' in project '%s' of organization '%s'\n" FmtBuildCreateSuccess = "Build '%s' created successfully for component '%s' in project '%s' of organization '%s'\n" // Environment success messages FmtEnvironmentSuccess = "Environment '%s' created successfully in organization '%s'\n" // DataPlane success messages FmtDataPlaneCreateSuccess = "DataPlane '%s' created successfully in organization '%s'\n" // Organization success messages FmtOrganizationSuccess = "Organization '%s' created\n" // DeploymentTrack success messages FmtDeploymentTrackSuccess = "Deployment track '%s' created successfully in component '%s' of project '%s' in organization '%s'\n" // DeployableArtifact success messages FmtDeployableArtifactSuccess = "Deployable artifact '%s' created successfully in component '%s' of project '%s' in organization '%s'\n" // Endpoint success messages FmtEndpointSuccess = "Endpoint '%s' created successfully in component '%s' of project '%s' in organization '%s' for environment '%s'\n" // Workload success messages FmtWorkloadSuccess = "Workload created successfully from descriptor '%s'\n" )
Success messages for resource creation
const ( // Path and repository defaults DefaultBranch = "main" DefaultPath = "/" DefaultContext = "/" DefaultDockerfile = "Dockerfile" // Track names DefaultTrackName = "default" )
Default values used across resources
const ( PlaceholderDuration = "-" PlaceholderAddress = "-" )
Placeholder values used in output formatting
const (
// DeploymentTrack annotations
AutoDeployAnnotation = "openchoreo.dev/auto-deploy"
)
Annotations used across resources
const (
ConditionTypeConfigured = "Configured"
)
Environment specific condition types
const (
DefaultDeploymentPipeline = "default"
)
Deployment pipelines
Variables ¶
var ( // Organization table headers HeadersOrganization = []string{HeaderName, HeaderAge, HeaderStatus} // Project table headers HeadersProject = []string{HeaderName, HeaderStatus, HeaderAge, HeaderOrganization} // Component table headers HeadersComponent = []string{HeaderName, HeaderType, HeaderStatus, HeaderAge, HeaderProject, HeaderOrganization} // Build table headers HeadersBuild = []string{HeaderName, HeaderStatus, HeaderRevision, HeaderDuration, HeaderAge, HeaderComponent, HeaderProject, HeaderOrganization} // DeployableArtifact table headers HeadersDeployableArtifact = []string{HeaderName, HeaderSource, HeaderStatus, HeaderAge, HeaderComponent, HeaderProject, HeaderOrganization} // Deployment table headers HeadersDeployment = []string{HeaderName, HeaderArtifact, HeaderEnvironment, HeaderStatus, HeaderAge, HeaderComponent, HeaderProject, HeaderOrganization} // DeploymentTrack table headers HeadersDeploymentTrack = []string{HeaderName, HeaderAPIVersion, HeaderAutoDeploy, HeaderAge, HeaderComponent, HeaderProject, HeaderOrganization} // Environment table headers HeadersEnvironment = []string{HeaderName, HeaderDataPlane, HeaderProduction, HeaderDNSPrefix, HeaderAge, HeaderOrganization} // DataPlane table headers HeadersDataPlane = []string{HeaderName, HeaderCluster, HeaderStatus, HeaderAge, HeaderOrganization} // Endpoint table headers HeadersEndpoint = []string{HeaderName, HeaderType, HeaderAddress, HeaderStatus, HeaderAge, HeaderComponent, HeaderProject, HeaderOrganization, HeaderEnvironment} // Workload table headers HeadersWorkload = []string{HeaderName, HeaderStatus, HeaderAge, HeaderOrganization} )
Resource-specific table headers defined as variables (not constants)
Functions ¶
This section is empty.
Types ¶
type BuildResource ¶
type BuildResource struct {
*resources.BaseResource[*openchoreov1alpha1.Build, *openchoreov1alpha1.BuildList]
}
BuildResource provides operations for Build CRs.
func NewBuildResource ¶
func NewBuildResource(cfg constants.CRDConfig, org string, project string, component string, deploymentTrack string) (*BuildResource, error)
NewBuildResource constructs a BuildResource with CRDConfig and optionally sets organization, project, component, and deploymentTrack.
func (*BuildResource) CreateBuild ¶
func (b *BuildResource) CreateBuild(params api.CreateBuildParams) error
CreateBuild creates a new Build CR.
func (*BuildResource) GetAge ¶
func (b *BuildResource) GetAge(build *openchoreov1alpha1.Build) string
GetAge returns the age of a Build.
func (*BuildResource) GetBuildDuration ¶
func (b *BuildResource) GetBuildDuration(build *openchoreov1alpha1.Build) string
GetBuildDuration returns the duration of a build if completed
func (*BuildResource) GetBuildsForComponent ¶
func (b *BuildResource) GetBuildsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Build], error)
GetBuildsForComponent returns builds filtered by component
func (*BuildResource) GetBuildsForDeploymentTrack ¶
func (b *BuildResource) GetBuildsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Build], error)
GetBuildsForDeploymentTrack returns builds filtered by deployment track
func (*BuildResource) GetStatus ¶
func (b *BuildResource) GetStatus(build *openchoreov1alpha1.Build) string
GetStatus returns the status of a Build with detailed information.
func (*BuildResource) Print ¶
func (b *BuildResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*BuildResource) PrintTableItems ¶
func (b *BuildResource) PrintTableItems(builds []resources.ResourceWrapper[*openchoreov1alpha1.Build]) error
PrintTableItems formats builds into a table
func (*BuildResource) WithNamespace ¶
func (b *BuildResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the build resource (usually the organization name)
type ComponentResource ¶
type ComponentResource struct {
*resources.BaseResource[*openchoreov1alpha1.Component, *openchoreov1alpha1.ComponentList]
}
ComponentResource provides operations for Component CRs.
func NewComponentResource ¶
func NewComponentResource(cfg constants.CRDConfig, org string, project string) (*ComponentResource, error)
NewComponentResource constructs a ComponentResource with CRDConfig and optionally sets organization and project.
func (*ComponentResource) CreateComponent ¶
func (c *ComponentResource) CreateComponent(params api.CreateComponentParams) error
CreateComponent creates a new Component CR and its default deployment track.
func (*ComponentResource) GetAge ¶
func (c *ComponentResource) GetAge(comp *openchoreov1alpha1.Component) string
GetAge returns the age of a Component.
func (*ComponentResource) GetComponentsForProject ¶
func (c *ComponentResource) GetComponentsForProject(projectName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Component], error)
GetComponentsForProject returns components filtered by project
func (*ComponentResource) GetStatus ¶
func (c *ComponentResource) GetStatus(comp *openchoreov1alpha1.Component) string
GetStatus returns the status of a Component with detailed information.
func (*ComponentResource) Print ¶
func (c *ComponentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*ComponentResource) PrintTableItems ¶
func (c *ComponentResource) PrintTableItems(components []resources.ResourceWrapper[*openchoreov1alpha1.Component]) error
PrintTableItems formats components into a table
func (*ComponentResource) WithNamespace ¶
func (c *ComponentResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the component resource (usually the organization name)
type ConfigurationGroupResource ¶ added in v0.2.0
type ConfigurationGroupResource struct {
*resources.BaseResource[*openchoreov1alpha1.ConfigurationGroup, *openchoreov1alpha1.ConfigurationGroupList]
}
ConfigurationGroupResource provides operations for ConfigurationGroup CRs.
func NewConfigurationGroupResource ¶ added in v0.2.0
func NewConfigurationGroupResource(cfg constants.CRDConfig, org string) (*ConfigurationGroupResource, error)
NewConfigurationGroupResource constructs a ConfigurationGroupResource with CRDConfig and optionally sets organization.
func (*ConfigurationGroupResource) GetAge ¶ added in v0.2.0
func (d *ConfigurationGroupResource) GetAge(cg *openchoreov1alpha1.ConfigurationGroup) string
GetAge returns the age of a ConfigurationGroup.
func (*ConfigurationGroupResource) GetStatus ¶ added in v0.2.0
func (d *ConfigurationGroupResource) GetStatus(cg *openchoreov1alpha1.ConfigurationGroup) string
GetStatus returns the status of a ConfigurationGroup with detailed information.
func (*ConfigurationGroupResource) Print ¶ added in v0.2.0
func (d *ConfigurationGroupResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*ConfigurationGroupResource) PrintTableItems ¶ added in v0.2.0
func (d *ConfigurationGroupResource) PrintTableItems(cgs []resources.ResourceWrapper[*openchoreov1alpha1.ConfigurationGroup]) error
PrintTableItems formats configuration groups into a table
func (*ConfigurationGroupResource) WithNamespace ¶ added in v0.2.0
func (d *ConfigurationGroupResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the configuration group resource (usually the organization name)
type DataPlaneResource ¶
type DataPlaneResource struct {
*resources.BaseResource[*openchoreov1alpha1.DataPlane, *openchoreov1alpha1.DataPlaneList]
}
DataPlaneResource provides operations for DataPlane CRs.
func NewDataPlaneResource ¶
func NewDataPlaneResource(cfg constants.CRDConfig, org string) (*DataPlaneResource, error)
NewDataPlaneResource constructs a DataPlaneResource with CRDConfig and optionally sets organization.
func (*DataPlaneResource) CreateDataPlane ¶
func (d *DataPlaneResource) CreateDataPlane(params api.CreateDataPlaneParams) error
CreateDataPlane creates a new DataPlane CR.
func (*DataPlaneResource) GetAge ¶
func (d *DataPlaneResource) GetAge(dataPlane *openchoreov1alpha1.DataPlane) string
GetAge returns the age of a DataPlane.
func (*DataPlaneResource) GetDataPlanesForOrganization ¶
func (d *DataPlaneResource) GetDataPlanesForOrganization(orgName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DataPlane], error)
GetDataPlanesForOrganization returns dataplanes filtered by organization
func (*DataPlaneResource) GetStatus ¶
func (d *DataPlaneResource) GetStatus(dataPlane *openchoreov1alpha1.DataPlane) string
GetStatus returns the status of a DataPlane with detailed information.
func (*DataPlaneResource) Print ¶
func (d *DataPlaneResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*DataPlaneResource) PrintTableItems ¶
func (d *DataPlaneResource) PrintTableItems(dataPlanes []resources.ResourceWrapper[*openchoreov1alpha1.DataPlane]) error
PrintTableItems formats dataplanes into a table
func (*DataPlaneResource) WithNamespace ¶
func (d *DataPlaneResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the dataplane resource (usually the organization name)
type DeployableArtifactResource ¶
type DeployableArtifactResource struct {
*resources.BaseResource[*openchoreov1alpha1.DeployableArtifact, *openchoreov1alpha1.DeployableArtifactList]
}
DeployableArtifactResource provides operations for DeployableArtifact CRs.
func NewDeployableArtifactResource ¶
func NewDeployableArtifactResource(cfg constants.CRDConfig, org string, project string, component string, deploymentTrack string) (*DeployableArtifactResource, error)
NewDeployableArtifactResource constructs a DeployableArtifactResource with CRDConfig and optionally sets organization, project, component, and deploymentTrack.
func (*DeployableArtifactResource) CreateDeployableArtifact ¶
func (d *DeployableArtifactResource) CreateDeployableArtifact(params api.CreateDeployableArtifactParams) error
CreateDeployableArtifact creates a new DeployableArtifact CR.
func (*DeployableArtifactResource) GetAge ¶
func (d *DeployableArtifactResource) GetAge(artifact *openchoreov1alpha1.DeployableArtifact) string
GetAge returns the age of a DeployableArtifact.
func (*DeployableArtifactResource) GetArtifactSource ¶
func (d *DeployableArtifactResource) GetArtifactSource(artifact *openchoreov1alpha1.DeployableArtifact) string
GetArtifactSource returns a string describing the source of the deployable artifact.
func (*DeployableArtifactResource) GetDeployableArtifactsForComponent ¶
func (d *DeployableArtifactResource) GetDeployableArtifactsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact], error)
GetDeployableArtifactsForComponent returns deployable artifacts filtered by component
func (*DeployableArtifactResource) GetDeployableArtifactsForDeploymentTrack ¶
func (d *DeployableArtifactResource) GetDeployableArtifactsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact], error)
GetDeployableArtifactsForDeploymentTrack returns deployable artifacts filtered by deployment track
func (*DeployableArtifactResource) GetSource ¶
func (d *DeployableArtifactResource) GetSource(artifact *openchoreov1alpha1.DeployableArtifact) string
GetSource returns the source of a DeployableArtifact.
func (*DeployableArtifactResource) GetStatus ¶
func (d *DeployableArtifactResource) GetStatus(artifact *openchoreov1alpha1.DeployableArtifact) string
GetStatus returns the status of a DeployableArtifact with detailed information.
func (*DeployableArtifactResource) Print ¶
func (d *DeployableArtifactResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*DeployableArtifactResource) PrintTableItems ¶
func (d *DeployableArtifactResource) PrintTableItems(artifacts []resources.ResourceWrapper[*openchoreov1alpha1.DeployableArtifact]) error
PrintTableItems formats deployable artifacts into a table
func (*DeployableArtifactResource) WithNamespace ¶
func (d *DeployableArtifactResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the deployable artifact resource (usually the organization name)
type DeploymentPipelineResource ¶
type DeploymentPipelineResource struct {
*resources.BaseResource[*openchoreov1alpha1.DeploymentPipeline, *openchoreov1alpha1.DeploymentPipelineList]
}
DeploymentPipelineResource provides operations for DeploymentPipeline CRs.
func NewDeploymentPipelineResource ¶
func NewDeploymentPipelineResource(cfg constants.CRDConfig, org string) (*DeploymentPipelineResource, error)
NewDeploymentPipelineResource constructs a DeploymentPipelineResource with CRDConfig and optionally sets organization.
func (*DeploymentPipelineResource) CreateDeploymentPipeline ¶
func (d *DeploymentPipelineResource) CreateDeploymentPipeline(params api.CreateDeploymentPipelineParams) error
CreateDeploymentPipeline creates a new DeploymentPipeline CR.
func (*DeploymentPipelineResource) GetAge ¶
func (d *DeploymentPipelineResource) GetAge(pipeline *openchoreov1alpha1.DeploymentPipeline) string
GetAge returns the age of a DeploymentPipeline.
func (*DeploymentPipelineResource) GetStatus ¶
func (d *DeploymentPipelineResource) GetStatus(pipeline *openchoreov1alpha1.DeploymentPipeline) string
GetStatus returns the status of a DeploymentPipeline with detailed information.
func (*DeploymentPipelineResource) Print ¶
func (d *DeploymentPipelineResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*DeploymentPipelineResource) PrintTableItems ¶
func (d *DeploymentPipelineResource) PrintTableItems(pipelines []resources.ResourceWrapper[*openchoreov1alpha1.DeploymentPipeline]) error
PrintTableItems formats deployment pipelines into a table
func (*DeploymentPipelineResource) WithNamespace ¶
func (d *DeploymentPipelineResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the deployment pipeline resource (usually the organization name)
type DeploymentResource ¶
type DeploymentResource struct {
*resources.BaseResource[*openchoreov1alpha1.Deployment, *openchoreov1alpha1.DeploymentList]
}
DeploymentResource provides operations for Deployment CRs.
func NewDeploymentResource ¶
func NewDeploymentResource(cfg constants.CRDConfig, org string, project string, component string, environment string) (*DeploymentResource, error)
NewDeploymentResource constructs a DeploymentResource with CRDConfig and optionally sets organization, project, component, and environment.
func (*DeploymentResource) CreateDeployment ¶
func (d *DeploymentResource) CreateDeployment(params api.CreateDeploymentParams) error
CreateDeployment creates a new Deployment CR.
func (*DeploymentResource) GetAge ¶
func (d *DeploymentResource) GetAge(deployment *openchoreov1alpha1.Deployment) string
GetAge returns the age of a Deployment.
func (*DeploymentResource) GetDeploymentsForComponent ¶
func (d *DeploymentResource) GetDeploymentsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
GetDeploymentsForComponent returns deployments filtered by component
func (*DeploymentResource) GetDeploymentsForDeploymentTrack ¶
func (d *DeploymentResource) GetDeploymentsForDeploymentTrack(deploymentTrack string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
GetDeploymentsForDeploymentTrack returns deployments filtered by deployment track
func (*DeploymentResource) GetDeploymentsForEnvironment ¶
func (d *DeploymentResource) GetDeploymentsForEnvironment(environmentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Deployment], error)
GetDeploymentsForEnvironment returns deployments filtered by environment
func (*DeploymentResource) GetStatus ¶
func (d *DeploymentResource) GetStatus(deployment *openchoreov1alpha1.Deployment) string
GetStatus returns the status of a Deployment with detailed information.
func (*DeploymentResource) Print ¶
func (d *DeploymentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*DeploymentResource) PrintTableItems ¶
func (d *DeploymentResource) PrintTableItems(deployments []resources.ResourceWrapper[*openchoreov1alpha1.Deployment]) error
PrintTableItems formats deployments into a table
func (*DeploymentResource) WithNamespace ¶
func (d *DeploymentResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the deployment resource (usually the organization name)
type DeploymentTrackResource ¶
type DeploymentTrackResource struct {
*resources.BaseResource[*openchoreov1alpha1.DeploymentTrack, *openchoreov1alpha1.DeploymentTrackList]
}
DeploymentTrackResource provides operations for DeploymentTrack CRs.
func NewDeploymentTrackResource ¶
func NewDeploymentTrackResource(cfg constants.CRDConfig, org string, project string, component string) (*DeploymentTrackResource, error)
NewDeploymentTrackResource constructs a DeploymentTrackResource with CRDConfig and optionally sets organization, project, and component.
func (*DeploymentTrackResource) CreateDeploymentTrack ¶
func (d *DeploymentTrackResource) CreateDeploymentTrack(params api.CreateDeploymentTrackParams) error
CreateDeploymentTrack creates a new DeploymentTrack CR.
func (*DeploymentTrackResource) GetAge ¶
func (d *DeploymentTrackResource) GetAge(track *openchoreov1alpha1.DeploymentTrack) string
GetAge returns the age of a DeploymentTrack.
func (*DeploymentTrackResource) GetAutoDeploy ¶
func (d *DeploymentTrackResource) GetAutoDeploy(track *openchoreov1alpha1.DeploymentTrack) string
GetAutoDeploy returns whether a DeploymentTrack has auto-deployment enabled.
func (*DeploymentTrackResource) GetDeploymentTracksForComponent ¶
func (d *DeploymentTrackResource) GetDeploymentTracksForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.DeploymentTrack], error)
GetDeploymentTracksForComponent returns deployment tracks filtered by component
func (*DeploymentTrackResource) GetStatus ¶
func (d *DeploymentTrackResource) GetStatus(track *openchoreov1alpha1.DeploymentTrack) string
GetStatus returns the status of a DeploymentTrack with detailed information.
func (*DeploymentTrackResource) Print ¶
func (d *DeploymentTrackResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*DeploymentTrackResource) PrintTableItems ¶
func (d *DeploymentTrackResource) PrintTableItems(tracks []resources.ResourceWrapper[*openchoreov1alpha1.DeploymentTrack]) error
PrintTableItems formats deployment tracks into a table
func (*DeploymentTrackResource) WithNamespace ¶
func (d *DeploymentTrackResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the deployment track resource (usually the organization name)
type EndpointResource ¶
type EndpointResource struct {
*resources.BaseResource[*openchoreov1alpha1.Endpoint, *openchoreov1alpha1.EndpointList]
}
EndpointResource provides operations for Endpoint CRs.
func NewEndpointResource ¶
func NewEndpointResource(cfg constants.CRDConfig, org string, project string, component string, environment string) (*EndpointResource, error)
NewEndpointResource constructs an EndpointResource with CRDConfig and optionally sets organization, project, component, and environment.
func (*EndpointResource) GetAddress ¶
func (e *EndpointResource) GetAddress(endpoint *openchoreov1alpha1.Endpoint) string
GetAddress returns the address of an Endpoint.
func (*EndpointResource) GetAge ¶
func (e *EndpointResource) GetAge(endpoint *openchoreov1alpha1.Endpoint) string
GetAge returns the age of an Endpoint.
func (*EndpointResource) GetEndpointsForComponent ¶
func (e *EndpointResource) GetEndpointsForComponent(componentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Endpoint], error)
GetEndpointsForComponent returns endpoints filtered by component
func (*EndpointResource) GetEndpointsForEnvironment ¶
func (e *EndpointResource) GetEndpointsForEnvironment(environmentName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Endpoint], error)
GetEndpointsForEnvironment returns endpoints filtered by environment
func (*EndpointResource) GetStatus ¶
func (e *EndpointResource) GetStatus(endpoint *openchoreov1alpha1.Endpoint) string
GetStatus returns the status of an Endpoint with detailed information.
func (*EndpointResource) Print ¶
func (e *EndpointResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*EndpointResource) PrintTableItems ¶
func (e *EndpointResource) PrintTableItems(endpoints []resources.ResourceWrapper[*openchoreov1alpha1.Endpoint]) error
PrintTableItems formats endpoints into a table
func (*EndpointResource) WithNamespace ¶
func (e *EndpointResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the endpoint resource (usually the organization name)
type EnvironmentResource ¶
type EnvironmentResource struct {
*resources.BaseResource[*openchoreov1alpha1.Environment, *openchoreov1alpha1.EnvironmentList]
}
EnvironmentResource provides operations for Environment CRs.
func NewEnvironmentResource ¶
func NewEnvironmentResource(cfg constants.CRDConfig, org string) (*EnvironmentResource, error)
NewEnvironmentResource constructs an EnvironmentResource with CRDConfig and optionally sets organization.
func (*EnvironmentResource) CreateEnvironment ¶
func (e *EnvironmentResource) CreateEnvironment(params api.CreateEnvironmentParams) error
CreateEnvironment creates a new Environment CR.
func (*EnvironmentResource) GetAge ¶
func (e *EnvironmentResource) GetAge(env *openchoreov1alpha1.Environment) string
GetAge returns the age of an Environment.
func (*EnvironmentResource) GetEnvironmentsForOrganization ¶
func (e *EnvironmentResource) GetEnvironmentsForOrganization(orgName string) ([]resources.ResourceWrapper[*openchoreov1alpha1.Environment], error)
GetEnvironmentsForOrganization returns environments filtered by organization
func (*EnvironmentResource) GetStatus ¶
func (e *EnvironmentResource) GetStatus(env *openchoreov1alpha1.Environment) string
GetStatus returns the status of an Environment with detailed information.
func (*EnvironmentResource) Print ¶
func (e *EnvironmentResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*EnvironmentResource) PrintTableItems ¶
func (e *EnvironmentResource) PrintTableItems(environments []resources.ResourceWrapper[*openchoreov1alpha1.Environment]) error
PrintTableItems formats environments into a table
func (*EnvironmentResource) WithNamespace ¶
func (e *EnvironmentResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the environment resource (usually the organization name)
type OrganizationResource ¶
type OrganizationResource struct {
*resources.BaseResource[*openchoreov1alpha1.Organization, *openchoreov1alpha1.OrganizationList]
}
OrganizationResource provides operations for Organization CRs.
func NewOrganizationResource ¶
func NewOrganizationResource(cfg constants.CRDConfig) (*OrganizationResource, error)
NewOrganizationResource constructs an OrganizationResource with only the CRDConfig.
func (*OrganizationResource) CreateOrganization ¶
func (o *OrganizationResource) CreateOrganization(params api.CreateOrganizationParams) error
CreateOrganization creates a new Organization CR.
func (*OrganizationResource) GetAge ¶
func (o *OrganizationResource) GetAge(org *openchoreov1alpha1.Organization) string
GetAge returns the age of an Organization.
func (*OrganizationResource) GetStatus ¶
func (o *OrganizationResource) GetStatus(org *openchoreov1alpha1.Organization) string
GetStatus returns the status of an Organization with detailed information.
func (*OrganizationResource) Print ¶
func (o *OrganizationResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*OrganizationResource) PrintTableItems ¶
func (o *OrganizationResource) PrintTableItems(orgs []resources.ResourceWrapper[*openchoreov1alpha1.Organization]) error
PrintTableItems formats organizations into a table
type ProjectResource ¶
type ProjectResource struct {
*resources.BaseResource[*openchoreov1alpha1.Project, *openchoreov1alpha1.ProjectList]
}
ProjectResource provides operations for Project CRs.
func NewProjectResource ¶
func NewProjectResource(cfg constants.CRDConfig, org string) (*ProjectResource, error)
NewProjectResource constructs a ProjectResource with CRDConfig and optionally sets organization.
func (*ProjectResource) CreateProject ¶
func (p *ProjectResource) CreateProject(params api.CreateProjectParams) error
CreateProject creates a new Project CR.
func (*ProjectResource) GetAge ¶
func (p *ProjectResource) GetAge(proj *openchoreov1alpha1.Project) string
GetAge returns the age of a Project.
func (*ProjectResource) GetStatus ¶
func (p *ProjectResource) GetStatus(proj *openchoreov1alpha1.Project) string
GetStatus returns the status of a Project with detailed information.
func (*ProjectResource) Print ¶
func (p *ProjectResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print overrides the base Print method to ensure our custom PrintTableItems is called
func (*ProjectResource) PrintTableItems ¶
func (p *ProjectResource) PrintTableItems(projects []resources.ResourceWrapper[*openchoreov1alpha1.Project]) error
PrintTableItems formats projects into a table
func (*ProjectResource) WithNamespace ¶
func (p *ProjectResource) WithNamespace(namespace string)
WithNamespace sets the namespace for the project resource (usually the organization name)
type WorkloadResource ¶ added in v0.3.0
type WorkloadResource struct {
*resources.ResourceBase
}
WorkloadResource provides operations for Workload CRs.
func NewWorkloadResource ¶ added in v0.3.0
func NewWorkloadResource(cfg constants.CRDConfig, org string) (*WorkloadResource, error)
NewWorkloadResource constructs a WorkloadResource with CRDConfig and optionally sets organization.
func (*WorkloadResource) CreateWorkload ¶ added in v0.3.0
func (w *WorkloadResource) CreateWorkload(params api.CreateWorkloadParams) error
CreateWorkload creates a Workload CR from a descriptor file or basic parameters.
func (*WorkloadResource) GetAge ¶ added in v0.3.0
func (w *WorkloadResource) GetAge(workload *openchoreov1alpha1.Workload) string
GetAge returns the age of a Workload.
func (*WorkloadResource) GetStatus ¶ added in v0.3.0
func (w *WorkloadResource) GetStatus(workload *openchoreov1alpha1.Workload) string
GetStatus returns the status of a Workload with detailed information.
func (*WorkloadResource) Print ¶ added in v0.3.0
func (w *WorkloadResource) Print(format resources.OutputFormat, filter *resources.ResourceFilter) error
Print prints workloads using the API client
func (*WorkloadResource) PrintTableItems ¶ added in v0.3.0
func (w *WorkloadResource) PrintTableItems(workloads []resources.ResourceWrapper[*openchoreov1alpha1.Workload]) error
PrintTableItems formats workloads into a table
func (*WorkloadResource) SetNamespace ¶ added in v0.3.0
func (w *WorkloadResource) SetNamespace(namespace string)