Documentation
¶
Index ¶
- Variables
- 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(env *types.EnvMeta, appName string, componentName string, ...) (*application.Application, error)
- func AttachTrait(c *gin.Context, body apis.TraitBody) (string, error)
- func BaseComplete(envName string, workloadName string, appName 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, envArgs *types.EnvMeta) (string, error)
- func CreateOrUpdateEnv(ctx context.Context, c client.Client, envName string, envArgs *types.EnvMeta) (string, error)
- func DeleteEnv(envName string) (string, error)
- func DetachTrait(c *gin.Context, envName string, traitType string, componentName 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 GetStringPointer(v string) *string
- func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
- 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 InitKubeClient() (client.Client, error)
- 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 ListApplicationConfigurations(ctx context.Context, c client.Client, opt Option) (corev1alpha2.ApplicationConfigurationList, error)
- func ListApplications(ctx context.Context, c client.Client, opt Option) ([]apis.ApplicationMeta, error)
- func ListCapabilities(capabilityCenterName string) ([]types.Capability, error)
- func ListCapabilityCenters() ([]apis.CapabilityCenterMeta, error)
- func ListCenterCapabilities(repoDir string) ([]types.Capability, error)
- func ListComponents(ctx context.Context, c client.Client, opt Option) ([]apis.ComponentMeta, 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, componentName 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.ApplicationMeta, error)
- func RetrieveComponent(ctx context.Context, c client.Client, ...) (apis.ComponentMeta, 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)
- func ValidateAndMutateForCore(traitType, workloadName string, flags *pflag.FlagSet, env *types.EnvMeta) error
- type ApplicationMetaList
- type DeleteOptions
- type Option
- type RunOptions
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Scheme = k8sruntime.NewScheme()
)
Functions ¶
func AddCapabilityCenter ¶
func AddHelmRepository ¶
func AddOrUpdateTrait ¶
func AddOrUpdateTrait(env *types.EnvMeta, appName string, componentName string, flagSet *pflag.FlagSet, template types.Capability) (*application.Application, error)
AddOrUpdateTrait attach trait to workload
func BaseComplete ¶
func BaseComplete(envName string, workloadName string, appName string, flagSet *pflag.FlagSet, workloadType string) (*application.Application, 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, envArgs *types.EnvMeta) (string, error)
CreateEnv will only create. If env already exists, return error
func CreateOrUpdateEnv ¶
func CreateOrUpdateEnv(ctx context.Context, c client.Client, envName string, envArgs *types.EnvMeta) (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 GatherWorkloads ¶
func GatherWorkloads(templates []types.Capability) []types.Capability
func GetCurrentEnvName ¶
func GetHelmRelease ¶
func GetHelmRepositoryList ¶
func GetStringPointer ¶ added in v0.0.5
func GetSyncedCapabilities ¶
func GetSyncedCapabilities(repoName, addonName string) (types.Capability, error)
func GetTraitDefinition ¶
func GetTraitDefinition(workloadName *string, capabilityAlias string) (types.Capability, error)
func HelmInstall ¶
func HelmUninstall ¶
func InitKubeClient ¶ added in v0.0.8
func InstallCapability ¶
func IsHelmReleaseRunning ¶
func IsHelmRepositoryExist ¶
func ListApplicationConfigurations ¶ added in v0.0.8
func ListApplicationConfigurations(ctx context.Context, c client.Client, opt Option) (corev1alpha2.ApplicationConfigurationList, error)
ListApplicationConfigurations lists all OAM ApplicationConfiguration
func ListApplications ¶ added in v0.0.8
func ListApplications(ctx context.Context, c client.Client, opt Option) ([]apis.ApplicationMeta, error)
ListApplications lists all applications
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 ListComponents ¶
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 NewHelmUninstall ¶
func PrepareDetachTrait ¶
func PrepareDetachTrait(envName string, traitType string, componentName string, appName string) (*application.Application, error)
func RemoveCapability ¶
func RemoveCapabilityCenter ¶
func RetrieveComponent ¶ added in v0.0.8
func SimplifyCapabilityStruct ¶
func SimplifyCapabilityStruct(capabilityList []types.Capability) []apis.TraitMeta
func SyncCapabilityCenter ¶
func TraitOperationRun ¶
func UninstallCap ¶
Types ¶
type ApplicationMetaList ¶ added in v0.0.8
type ApplicationMetaList []apis.ApplicationMeta
func (ApplicationMetaList) Len ¶ added in v0.0.8
func (a ApplicationMetaList) Len() int
func (ApplicationMetaList) Less ¶ added in v0.0.8
func (a ApplicationMetaList) Less(i, j int) bool
func (ApplicationMetaList) Swap ¶ added in v0.0.8
func (a ApplicationMetaList) Swap(i, j int)
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(io cmdutil.IOStreams) (string, error)
type RunOptions ¶
Click to show internal directories.
Click to hide internal directories.