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, namespace, 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 SetEnv(envName string) (string, error)
- func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
- 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 AddCapabilityCenter(capName, capURL, capToken string) error
func AddCapabilityIntoCluster ¶
func AddCapabilityIntoCluster(c client.Client, capability string) (string, error)
func AddHelmRepository ¶
func AddHelmRepository(name, url, username, password, certFile, keyFile, caFile string, insecureSkipTLSverify bool, out io.Writer) error
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 AttachTrait ¶
func AttachTrait(c *gin.Context, body apis.TraitBody) (string, error)
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 set to the new env. If it exists, update it and set to the new env.
func DetachTrait ¶
func DetachTrait(c *gin.Context, envName string, traitType string, workloadName string, appName string, staging bool) (string, error)
func GatherWorkloads ¶
func GatherWorkloads(templates []types.Capability) []types.Capability
func GetCurrentEnvName ¶
func GetCurrentEnvName() (string, error)
func GetEnvByName ¶
func GetEnvByName(name string) (*types.EnvMeta, error)
func GetHelmRelease ¶
func GetHelmRelease() ([]*release.Release, error)
func GetHelmRepositoryList ¶
func GetHelmRepositoryList() []*repo.Entry
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 HelmInstall(ioStreams cmdutil.IOStreams, repoName, repoURL, chartName, version, namespace, releaseName string,
vals map[string]interface{}) error
func HelmUninstall ¶
func HelmUninstall(ioStreams cmdutil.IOStreams, chartName, releaseName string) error
func InstallCapability ¶
func InstallCapability(client client.Client, centerName, capabilityName string, ioStreams cmdutil.IOStreams) error
func InstallHelmChart ¶
func InstallHelmChart(ioStreams cmdutil.IOStreams, c types.Chart) error
func IsHelmReleaseRunning ¶
func IsHelmReleaseRunning(releaseName, chartName string, streams cmdutil.IOStreams) bool
func IsHelmRepositoryExist ¶
func IsHelmRepositoryExist(name, url string) bool
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 NewHelmInstall ¶
func NewHelmInstall(version, namespace, releaseName string) (*action.Install, error)
func NewHelmUninstall ¶
func NewHelmUninstall() (*action.Uninstall, error)
func PrepareDetachTrait ¶
func PrepareDetachTrait(envName string, traitType string, workloadName string, appName string) (*application.Application, error)
func RemoveCapability ¶
func RemoveCapability(client client.Client, capabilityName string, ioStreams cmdutil.IOStreams) error
func RemoveCapabilityCenter ¶
func RemoveCapabilityCenter(centerName string) (string, error)
func RemoveCapabilityFromCluster ¶
func RemoveCapabilityFromCluster(client client.Client, capabilityName string) (string, error)
func RetrieveApplicationStatusByName ¶
func RetrieveApplicationStatusByName(ctx context.Context, c client.Client, applicationName string, namespace string) (apis.ApplicationStatusMeta, error)
func SimplifyCapabilityStruct ¶
func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
func SyncCapabilityCenter ¶
func SyncCapabilityCenter(capabilityCenterName string) error
func SyncCapabilityFromCenter ¶
func SyncCapabilityFromCenter(capName, capURL, capToken string) error
func TraitOperationRun ¶
func TraitOperationRun(ctx context.Context, c client.Client, env *types.EnvMeta, appObj *application.Application, staging bool) (string, error)
func UninstallCap ¶
func UninstallCap(client client.Client, cap types.Capability, ioStreams cmdutil.IOStreams) error
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 ¶
func ListComponents(ctx context.Context, c client.Client, opt Option) ([]ComponentMeta, error)
Get component list
type DeleteOptions ¶
type DeleteOptions struct {
AppName string
CompName string
Client client.Client
Env *types.EnvMeta
}
func (*DeleteOptions) DeleteComponent ¶
func (o *DeleteOptions) DeleteComponent() (string, error)
type Option ¶
type Option struct {
// Optional filter, if specified, only components in such app will be listed
AppName string
Namespace string
}
type RunOptions ¶
type RunOptions struct {
Env *types.EnvMeta
WorkloadName string
KubeClient client.Client
App *application.Application
AppName string
Staging bool
util.IOStreams
}
Click to show internal directories.
Click to hide internal directories.