Documentation
¶
Index ¶
- Constants
- func CleanupLoginConfig() error
- func CreateChoreoLabels(org, project, component, name string) map[string]string
- func FormatAge(t time.Time) string
- func GetAllBuilds(orgName, projectName, componentName string) (*choreov1.BuildList, error)
- func GetAllComponents(orgName, projectName string) (*choreov1.ComponentList, error)
- func GetAllDeployableArtifacts(orgName, projectName, componentName string) (*choreov1.DeployableArtifactList, error)
- func GetAllDeploymentTracks(orgName, projectName, componentName string) (*choreov1.DeploymentTrackList, error)
- func GetAllDeployments(orgName, projectName, componentName string) (*choreov1.DeploymentList, error)
- func GetAllEndpoints(orgName, projectName, componentName, envName string) (*choreov1.EndpointList, error)
- func GetAllEnvironments(orgName string) (*choreov1.EnvironmentList, error)
- func GetBuild(orgName, projectName, componentName, buildName string) (*choreov1.Build, error)
- func GetBuildNames(orgName, projectName, componentName string) ([]string, error)
- func GetComponent(orgName, projectName, componentName string) (*choreov1.Component, error)
- func GetComponentNames(orgName, projectName string) ([]string, error)
- func GetDataPlane(orgName, dataPlaneName string) (*choreov1.DataPlane, error)
- func GetDataPlaneNames(orgName string) ([]string, error)
- func GetDataPlanes(orgName string) (*choreov1.DataPlaneList, error)
- func GetDefaultKubeconfigPath() (string, error)
- func GetDeployableArtifact(orgName, projectName, componentName, deployableArtifactName string) (*choreov1.DeployableArtifact, error)
- func GetDeployableArtifactNames(orgName, projectName, componentName string) ([]string, error)
- func GetDeployment(orgName, projectName, componentName, deploymentName string) (*choreov1.Deployment, error)
- func GetDeploymentNames(orgName, projectName, componentName string) ([]string, error)
- func GetDeploymentTrack(orgName, projectName, componentName, trackName string) (*choreov1.DeploymentTrack, error)
- func GetDeploymentTrackNames(orgName, projectName, componentName string) ([]string, error)
- func GetEndpoint(orgName, projectName, componentName, envName, endpointName string) (*choreov1.Endpoint, error)
- func GetEnvironment(orgName, envName string) (*choreov1.Environment, error)
- func GetEnvironmentNames(orgName string) ([]string, error)
- func GetK8sObjectYAMLFromCRD(group, version, kind, name, namespace string) (string, error)
- func GetKubeContextNames(config *clientcmdapi.Config) []string
- func GetKubernetesClient() (client.Client, error)
- func GetLoginConfigFilePath() (string, error)
- func GetOrganization(name string) (*choreov1.Organization, error)
- func GetOrganizationNames() ([]string, error)
- func GetOrganizations() (*choreov1.OrganizationList, error)
- func GetProject(orgName, projectName string) (*choreov1.Project, error)
- func GetProjectNames(organization string) ([]string, error)
- func GetProjects(orgName string) (*choreov1.ProjectList, error)
- func GetResource[T any, L client.ObjectList](namespace string, labels map[string]string) (*T, error)
- func GetResources[T any, L client.ObjectList](namespace string, labels map[string]string) (L, error)
- func GetStatus(conditions []metav1.Condition, conditionType string) string
- func IsLoginConfigFileExists() bool
- func LoadStoredConfig() (*config.StoredConfig, error)
- func LoginWithContext(kubeconfigPath, contextName string) error
- func SaveLoginConfig(kubeconfigPath, context string) error
- func SaveStoredConfig(cfg *config.StoredConfig) error
- func ShowEquivalentCommand(command string, flags map[string]string)
- func ValidateComponent(val interface{}) error
- func ValidateOrganization(val interface{}) error
- func ValidateOrganizationParams(cmdType CommandType, params interface{}) error
- func ValidateParams(cmdType CommandType, resource ResourceType, params interface{}) error
- func ValidateProject(val interface{}) error
- func ValidateResourceName(resource string, val interface{}) error
- func ValidateURL(val interface{}) error
- type CommandType
- type GenericList
- type GenericResource
- type ResourceType
Constants ¶
const (
RegexResourceName = "^[a-z0-9][a-z0-9-]*[a-z0-9]$"
)
Variables ¶
This section is empty.
Functions ¶
func CleanupLoginConfig ¶
func CleanupLoginConfig() error
func CreateChoreoLabels ¶
func GetAllBuilds ¶
func GetAllComponents ¶
func GetAllComponents(orgName, projectName string) (*choreov1.ComponentList, error)
func GetAllDeployableArtifacts ¶
func GetAllDeployableArtifacts(orgName, projectName, componentName string) (*choreov1.DeployableArtifactList, error)
func GetAllDeploymentTracks ¶
func GetAllDeploymentTracks(orgName, projectName, componentName string) (*choreov1.DeploymentTrackList, error)
func GetAllDeployments ¶
func GetAllDeployments(orgName, projectName, componentName string) (*choreov1.DeploymentList, error)
func GetAllEndpoints ¶
func GetAllEndpoints(orgName, projectName, componentName, envName string) (*choreov1.EndpointList, error)
func GetAllEnvironments ¶
func GetAllEnvironments(orgName string) (*choreov1.EnvironmentList, error)
func GetBuildNames ¶
func GetComponent ¶
func GetComponentNames ¶
func GetDataPlaneNames ¶
func GetDataPlanes ¶
func GetDataPlanes(orgName string) (*choreov1.DataPlaneList, error)
func GetDefaultKubeconfigPath ¶
GetDefaultKubeconfigPath returns the default kubeconfig path
func GetDeployableArtifact ¶
func GetDeployableArtifact(orgName, projectName, componentName, deployableArtifactName string) (*choreov1.DeployableArtifact, error)
func GetDeployment ¶
func GetDeployment(orgName, projectName, componentName, deploymentName string) (*choreov1.Deployment, error)
func GetDeploymentNames ¶
func GetDeploymentTrack ¶
func GetDeploymentTrack(orgName, projectName, componentName, trackName string) (*choreov1.DeploymentTrack, error)
func GetDeploymentTrackNames ¶
func GetEndpoint ¶
func GetEnvironment ¶
func GetEnvironment(orgName, envName string) (*choreov1.Environment, error)
func GetEnvironmentNames ¶
func GetK8sObjectYAMLFromCRD ¶
func GetKubeContextNames ¶
func GetKubeContextNames(config *clientcmdapi.Config) []string
func GetKubernetesClient ¶
func GetLoginConfigFilePath ¶
func GetOrganization ¶
func GetOrganization(name string) (*choreov1.Organization, error)
func GetOrganizationNames ¶
GetOrganizationNames retrieves a sorted list of organization names
func GetOrganizations ¶
func GetOrganizations() (*choreov1.OrganizationList, error)
func GetProjectNames ¶
GetProjectNames retrieves a sorted list of project names in an organization
func GetProjects ¶
func GetProjects(orgName string) (*choreov1.ProjectList, error)
func GetResource ¶
func GetResource[T any, L client.ObjectList](namespace string, labels map[string]string) (*T, error)
GetResource fetches exactly one resource matching the given labels. T is a non-pointer struct (e.g. choreov1.Build). L is a pointer-to-list type (e.g. *choreov1.BuildList).
func GetResources ¶
func GetResources[T any, L client.ObjectList](namespace string, labels map[string]string) (L, error)
GetResources fetches all resources matching the given labels. T is a non-pointer struct (e.g. choreov1.Build). L is a pointer-to-list type (e.g. *choreov1.BuildList).
func IsLoginConfigFileExists ¶
func IsLoginConfigFileExists() bool
func LoadStoredConfig ¶
func LoadStoredConfig() (*config.StoredConfig, error)
LoadStoredConfig reads the config file and unmarshals it into StoredConfig
func LoginWithContext ¶
func SaveLoginConfig ¶
func SaveStoredConfig ¶
func SaveStoredConfig(cfg *config.StoredConfig) error
SaveStoredConfig writes the StoredConfig data to the config file
func ShowEquivalentCommand ¶
ShowEquivalentCommand prints the equivalent non-interactive command
func ValidateComponent ¶
func ValidateComponent(val interface{}) error
func ValidateOrganization ¶
func ValidateOrganization(val interface{}) error
func ValidateOrganizationParams ¶
func ValidateOrganizationParams(cmdType CommandType, params interface{}) error
func ValidateParams ¶
func ValidateParams(cmdType CommandType, resource ResourceType, params interface{}) error
func ValidateProject ¶
func ValidateProject(val interface{}) error
func ValidateResourceName ¶
func ValidateURL ¶
func ValidateURL(val interface{}) error
Types ¶
type CommandType ¶
type CommandType string
const ( CmdCreate CommandType = "create" CmdGet CommandType = "get" )
type ResourceType ¶
type ResourceType string
const ( ResourceProject ResourceType = "project" ResourceComponent ResourceType = "component" ResourceBuild ResourceType = "build" ResourceDeployment ResourceType = "deployment" ResourceDeploymentTrack ResourceType = "deploymenttrack" ResourceEnvironment ResourceType = "environment" ResourceDeployableArtifact ResourceType = "deployableartifact" ResourceEndpoint ResourceType = "endpoint" ResourceOrganization ResourceType = "organization" ResourceDataPlane ResourceType = "dataplane" )