Documentation ¶
Index ¶
- func AddCapabilityCenter(capName, capURL, capToken string) error
- func AddCapabilityIntoCluster(c client.Client, capability string) (string, error)
- func AddHelmRepository(name, url, username, password, certFile, keyFile, caFile string, ...) error
- func AddOrUpdateTrait(envName string, appName string, workloadName string, flagSet *pflag.FlagSet, ...) (*application.Application, error)
- func AttachTrait(c *gin.Context, body apis.TraitBody) (string, error)
- func BaseComplete(envName string, workloadName string, appGroup string, flagSet *pflag.FlagSet, ...) (*application.Application, error)
- func BaseRun(staging bool, App *application.Application, kubeClient client.Client, ...) (string, error)
- func CheckInstallStatus(repoName string, tmp types.Capability) string
- func ConvertApplyTo(applyTo []string, workloads []types.Capability) []string
- func CreateEnv(ctx context.Context, c client.Client, envName string, namespace string) (string, error)
- func CreateOrUpdateEnv(ctx context.Context, c client.Client, envName string, namespace string) (string, error)
- func DeleteEnv(envName string) (string, error)
- func DetachTrait(c *gin.Context, envName string, traitType string, workloadName string, ...) (string, error)
- func GatherWorkloads(templates []types.Capability) []types.Capability
- func GetChart(client *action.Install, name string) (*chart.Chart, error)
- func GetCurrentEnvName() (string, error)
- func GetEnvByName(name string) (*types.EnvMeta, error)
- func GetHelmRelease() ([]*release.Release, error)
- func GetHelmRepositoryList() []*repo.Entry
- func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
- func GetTraitAliasByComponentTraitList(componentTraitList []corev1alpha2.ComponentTrait) []string
- func GetTraitDefNameFromRaw(extension runtime.RawExtension) string
- func GetTraitDefinition(workloadName *string, capabilityAlias string) (types.Capability, error)
- func HelmInstall(ioStreams cmdutil.IOStreams, ...) error
- func HelmUninstall(ioStreams cmdutil.IOStreams, chartName, releaseName string) error
- func In(l []string, v string) bool
- func InstallCapability(client client.Client, centerName, capabilityName string, ...) error
- func InstallHelmChart(ioStreams cmdutil.IOStreams, c types.Chart) error
- func IsHelmReleaseRunning(releaseName, chartName string, streams cmdutil.IOStreams) bool
- func IsHelmRepositoryExist(name, url string) bool
- func ListCapabilities(capabilityCenterName string) ([]types.Capability, error)
- func ListCapabilityCenters() ([]apis.CapabilityCenterMeta, error)
- func ListCenterCapabilities(repoDir string) ([]types.Capability, error)
- func ListEnvs(envName string) ([]*types.EnvMeta, error)
- func ListTraitDefinitions(workloadName *string) ([]types.Capability, error)
- func LoadIfExist(envName string, workloadName string, appGroup string) (*application.Application, error)
- func NewHelmInstall(version, releaseName string) (*action.Install, error)
- func NewHelmUninstall() (*action.Uninstall, error)
- func Parse(applyTo string) string
- func PrepareDetachTrait(envName string, traitType string, workloadName string, appName string) (*application.Application, error)
- func RemoveCapability(client client.Client, capabilityName string, ioStreams cmdutil.IOStreams) error
- func RemoveCapabilityCenter(centerName string) (string, error)
- func RemoveCapabilityFromCluster(client client.Client, capabilityName string) (string, error)
- func RetrieveApplicationStatusByName(ctx context.Context, c client.Client, applicationName string, namespace string) (apis.ApplicationStatusMeta, error)
- func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
- func SwitchEnv(envName string) (string, error)
- func SyncCapabilityCenter(capabilityCenterName string) error
- func SyncCapabilityFromCenter(capName, capURL, capToken string) error
- func TraitOperationRun(ctx context.Context, c client.Client, env *types.EnvMeta, ...) (string, error)
- func UninstallCap(client client.Client, cap types.Capability, ioStreams cmdutil.IOStreams) error
- func UpdateEnv(ctx context.Context, c client.Client, envName string, namespace string) (string, error)
- type ComponentMeta
- type DeleteOptions
- type Option
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCapabilityCenter ¶
func AddHelmRepository ¶
func AddOrUpdateTrait ¶
func AddOrUpdateTrait(envName string, appName string, workloadName string, flagSet *pflag.FlagSet, template types.Capability) (*application.Application, error)
AddOrUpdateTrait attach trait to workload
func BaseComplete ¶
func BaseComplete(envName string, workloadName string, appGroup string, flagSet *pflag.FlagSet, workloadType string) (*application.Application, error)
func BaseRun ¶
func BaseRun(staging bool, App *application.Application, kubeClient client.Client, Env *types.EnvMeta) (string, error)
func CheckInstallStatus ¶
func CheckInstallStatus(repoName string, tmp types.Capability) string
func ConvertApplyTo ¶
func ConvertApplyTo(applyTo []string, workloads []types.Capability) []string
func CreateEnv ¶
func CreateEnv(ctx context.Context, c client.Client, envName string, namespace string) (string, error)
Create env. If env already exists, return error
func CreateOrUpdateEnv ¶
func CreateOrUpdateEnv(ctx context.Context, c client.Client, envName string, namespace string) (string, error)
Create or update env. If it does not exist, create it and switch to the new env. If it exists, update it and switch to the new env.
func DetachTrait ¶
func GatherWorkloads ¶
func GatherWorkloads(templates []types.Capability) []types.Capability
func GetCurrentEnvName ¶
func GetHelmRelease ¶
func GetHelmRepositoryList ¶
func GetSyncedCapabilities ¶
func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
func GetTraitAliasByComponentTraitList ¶
func GetTraitAliasByComponentTraitList(componentTraitList []corev1alpha2.ComponentTrait) []string
func GetTraitDefNameFromRaw ¶
func GetTraitDefNameFromRaw(extension runtime.RawExtension) string
func GetTraitDefinition ¶
func GetTraitDefinition(workloadName *string, capabilityAlias string) (types.Capability, error)
func HelmInstall ¶
func HelmUninstall ¶
func InstallCapability ¶
func IsHelmReleaseRunning ¶
func IsHelmRepositoryExist ¶
func ListCapabilities ¶
func ListCapabilities(capabilityCenterName string) ([]types.Capability, error)
func ListCapabilityCenters ¶
func ListCapabilityCenters() ([]apis.CapabilityCenterMeta, error)
func ListCenterCapabilities ¶
func ListCenterCapabilities(repoDir string) ([]types.Capability, error)
func ListTraitDefinitions ¶
func ListTraitDefinitions(workloadName *string) ([]types.Capability, error)
func LoadIfExist ¶
func LoadIfExist(envName string, workloadName string, appGroup string) (*application.Application, error)
func NewHelmUninstall ¶
func PrepareDetachTrait ¶
func PrepareDetachTrait(envName string, traitType string, workloadName string, appName string) (*application.Application, error)
func RemoveCapability ¶
func RemoveCapabilityCenter ¶
func SimplifyCapabilityStruct ¶
func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
func SyncCapabilityCenter ¶
func TraitOperationRun ¶
func UninstallCap ¶
Types ¶
type ComponentMeta ¶
type ComponentMeta struct { Name string `json:"name"` App string `json:"app"` Workload string `json:"workload,omitempty"` Traits []string `json:"traits,omitempty"` Status string `json:"status,omitempty"` CreatedTime string `json:"created,omitempty"` AppConfig corev1alpha2.ApplicationConfiguration `json:"-"` Component corev1alpha2.Component `json:"-"` }
func ListComponents ¶
Get component list
type DeleteOptions ¶
type DeleteOptions struct { AppName string CompName string Client client.Client Env *types.EnvMeta }
func (*DeleteOptions) DeleteApp ¶
func (o *DeleteOptions) DeleteApp() (string, error)
func (*DeleteOptions) DeleteComponent ¶
func (o *DeleteOptions) DeleteComponent() (string, error)
type RunOptions ¶
Click to show internal directories.
Click to hide internal directories.