kinds

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Common error messages
	ErrCreateKubeClient  = "failed to create Kubernetes client: %w"
	ErrFormatUnsupported = "unsupported output format: %s"
)

Common error messages used across resource implementations

View Source
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

View Source
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

View Source
const (
	StatusPending      = "Pending"
	StatusReady        = "Ready"
	StatusNotReady     = "Not Ready"
	StatusInitializing = "Initializing"
	StatusFailed       = "Failed"
	StatusProgressing  = "Progressing"
)

Status constants used for resource status reporting

View Source
const (
	ConditionTypeReady       = "Ready"
	ConditionTypeCreated     = "Created"
	ConditionTypeInitialized = "Initialized"
)

Common condition types used across resources

View Source
const (
	ConditionTypeDeployed    = "Deployed"
	ConditionTypeProgressing = "Progressing"
	ConditionTypeAvailable   = "Available"
)

Deployment specific condition types

View Source
const (
	ConditionTypeStepCloneSucceeded        = "StepCloneSucceeded"
	ConditionTypeStepBuildSucceeded        = "StepBuildSucceeded"
	ConditionTypeStepPushSucceeded         = "StepPushSucceeded"
	ConditionTypeCompleted                 = "Completed"
	ConditionTypeDeployableArtifactCreated = "DeployableArtifactCreated"
	ConditionTypeDeploymentApplied         = "DeploymentApplied"
)

Build specific condition types

View Source
const (
	ConditionStatusTrue  = "True"
	ConditionStatusFalse = "False"
)

Condition status constants

View Source
const (
	// Status formatting
	FmtStatusWithReason     = "%s (%s)"
	FmtStatusWithMessage    = "%s: %s - %s"
	FmtStatusWithType       = "%s: %s"
	FmtStatusWithTypeReason = "%s: %s"
)

Format strings for status reporting

View Source
const (
	FmtDurationSeconds = "%ds"
	FmtDurationMinSec  = "%dm%ds"
	FmtDurationHourMin = "%dh%dm"
)

Duration formatting strings

View Source
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

View Source
const (
	// Path and repository defaults
	DefaultBranch     = "main"
	DefaultPath       = "/"
	DefaultContext    = "/"
	DefaultDockerfile = "Dockerfile"

	// Track names
	DefaultTrackName = "default"
)

Default values used across resources

View Source
const (
	PlaceholderDuration = "-"
	PlaceholderAddress  = "-"
)

Placeholder values used in output formatting

View Source
const (
	// DeploymentTrack annotations
	AutoDeployAnnotation = "openchoreo.dev/auto-deploy"
)

Annotations used across resources

View Source
const (
	ConditionTypeConfigured = "Configured"
)

Environment specific condition types

View Source
const (
	DefaultDeploymentPipeline = "default"
)

Deployment pipelines

Variables

View Source
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

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

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

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

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

GetStatus returns the status of a Component with detailed information.

func (*ComponentResource) Print

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

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

GetAge returns the age of a ConfigurationGroup.

func (*ConfigurationGroupResource) GetStatus added in v0.2.0

GetStatus returns the status of a ConfigurationGroup with detailed information.

func (*ConfigurationGroupResource) Print added in v0.2.0

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*ConfigurationGroupResource) PrintTableItems added in v0.2.0

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

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

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

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

GetAge returns the age of a DeployableArtifact.

func (*DeployableArtifactResource) GetArtifactSource

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

GetSource returns the source of a DeployableArtifact.

func (*DeployableArtifactResource) GetStatus

GetStatus returns the status of a DeployableArtifact with detailed information.

func (*DeployableArtifactResource) Print

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*DeployableArtifactResource) PrintTableItems

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

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

GetAge returns the age of a DeploymentPipeline.

func (*DeploymentPipelineResource) GetStatus

GetStatus returns the status of a DeploymentPipeline with detailed information.

func (*DeploymentPipelineResource) Print

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*DeploymentPipelineResource) PrintTableItems

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

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

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

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

GetAge returns the age of a DeploymentTrack.

func (*DeploymentTrackResource) GetAutoDeploy

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

GetStatus returns the status of a DeploymentTrack with detailed information.

func (*DeploymentTrackResource) Print

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*DeploymentTrackResource) PrintTableItems

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

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

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

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

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

GetStatus returns the status of an Environment with detailed information.

func (*EnvironmentResource) Print

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*EnvironmentResource) PrintTableItems

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

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

GetAge returns the age of an Organization.

func (*OrganizationResource) GetStatus

GetStatus returns the status of an Organization with detailed information.

func (*OrganizationResource) Print

Print overrides the base Print method to ensure our custom PrintTableItems is called

func (*OrganizationResource) PrintTableItems

PrintTableItems formats organizations into a table

type ProjectResource

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

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

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

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)

Jump to

Keyboard shortcuts

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