services

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2021 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUINamespace   = "velaux-system"
	DefaultAppNamespace  = "default"
	DefaultVelaNamespace = "vela-system"
)

Variables

This section is empty.

Functions

func AddHelmRepo

func AddHelmRepo(name, url string, settings *cli.EnvSettings) error

AddHelmRepo adds repo with given name and url

func CheckVelaControllerExist

func CheckVelaControllerExist(kubeConfig string) (bool, error)

func CheckVelaHelmChartExist

func CheckVelaHelmChartExist(kubeConfig string, namespace string, name string) (bool, error)

func GenDefinition

func GenDefinition(cli client.Client, name, namespace string) (*model.Definition, error)

GenDefinition from configmap get definition jsonSchema

func GenDefinitionObj

func GenDefinitionObj(name, wType string) (*unstructured.Unstructured, error)

func GetHelmChartRelease

func GetHelmChartRelease(kubeConfig string, namespace string, name string) (*release.Release, error)

func InstallHelmChart

func InstallHelmChart(name, repo, chart, version string, kubeConfig string, settings *cli.EnvSettings) (int, error)

func ToConfigMap added in v0.0.2

func ToConfigMap(name, namespace string, label map[string]string, configData map[string]string) (*v1.ConfigMap, error)

func UpdateHelmRepo

func UpdateHelmRepo(settings *cli.EnvSettings) error

UpdateHelmRepo updates charts for all helm repos

Types

type ApplicationService

type ApplicationService struct {
	// contains filtered or unexported fields
}

func NewApplicationService

func NewApplicationService(client client.Client) *ApplicationService

func (*ApplicationService) AddApplicationYaml

func (s *ApplicationService) AddApplicationYaml(c echo.Context) error

AddApplicationYaml for add applications with yaml to cluster

func (*ApplicationService) AddApplications

func (s *ApplicationService) AddApplications(c echo.Context) error

AddApplications for add applications to cluster

func (*ApplicationService) GetApplicationDetail

func (s *ApplicationService) GetApplicationDetail(c echo.Context) error

func (*ApplicationService) GetApplications

func (s *ApplicationService) GetApplications(c echo.Context) error

GetApplications for get applications from cluster

func (*ApplicationService) RemoveApplications

func (s *ApplicationService) RemoveApplications(c echo.Context) error

RemoveApplications for remove application from cluster

func (*ApplicationService) UpdateApplications

func (s *ApplicationService) UpdateApplications(c echo.Context) error

UpdateApplications for update application

type CapabilityService

type CapabilityService struct {
	// contains filtered or unexported fields
}

func NewCapabilityService

func NewCapabilityService(client client.Client) *CapabilityService

func (*CapabilityService) GetCapability

func (s *CapabilityService) GetCapability(c echo.Context) error

func (*CapabilityService) InstallCapability

func (s *CapabilityService) InstallCapability(c echo.Context) error

InstallCapability installs a capability into a cluster

TODO: implement this method, install logic is same as the `vela` cli, we should find a way to reuse these code: https://github.com/oam-dev/kubevela/blob/9a10e967eec8e42a8aa284ddb20fde204696aa69/references/common/capability.go#L88

func (*CapabilityService) ListCapabilities

func (s *CapabilityService) ListCapabilities(c echo.Context) error

type CatalogService

type CatalogService struct {
	// contains filtered or unexported fields
}

func NewCatalogService

func NewCatalogService(client client.Client) *CatalogService

func (*CatalogService) AddCatalog

func (s *CatalogService) AddCatalog(c echo.Context) error

func (*CatalogService) DelCatalog

func (s *CatalogService) DelCatalog(c echo.Context) error

func (*CatalogService) GetCatalog

func (s *CatalogService) GetCatalog(c echo.Context) error

func (*CatalogService) ListCatalogs

func (s *CatalogService) ListCatalogs(c echo.Context) error

func (*CatalogService) UpdateCatalog

func (s *CatalogService) UpdateCatalog(c echo.Context) error

type ClusterService

type ClusterService struct {
	// contains filtered or unexported fields
}

func NewClusterService

func NewClusterService(client client.Client) *ClusterService

func (*ClusterService) AddCluster

func (s *ClusterService) AddCluster(c echo.Context) error

func (*ClusterService) DelCluster

func (s *ClusterService) DelCluster(c echo.Context) error

func (*ClusterService) GetCluster

func (s *ClusterService) GetCluster(c echo.Context) error

func (*ClusterService) GetClusterNames

func (s *ClusterService) GetClusterNames(c echo.Context) error

func (*ClusterService) ListClusters

func (s *ClusterService) ListClusters(c echo.Context) error

func (*ClusterService) ListComponentDef

func (s *ClusterService) ListComponentDef(c echo.Context) error

ListComponentDef list component definitions under cluster

func (*ClusterService) ListTraitDef

func (s *ClusterService) ListTraitDef(c echo.Context) error

ListTraitDef list trait definitions under cluster

func (*ClusterService) UpdateCluster

func (s *ClusterService) UpdateCluster(c echo.Context) error

type SchemaService

type SchemaService struct {
	// contains filtered or unexported fields
}

func NewSchemaService

func NewSchemaService(client client.Client) *SchemaService

func (*SchemaService) GetWorkloadSchema

func (s *SchemaService) GetWorkloadSchema(c echo.Context) error

type VelaInstallService

type VelaInstallService struct {
	// contains filtered or unexported fields
}

func NewVelaInstallService

func NewVelaInstallService(client client.Client) *VelaInstallService

func (*VelaInstallService) InstallVela

func (s *VelaInstallService) InstallVela(c echo.Context) error

func (*VelaInstallService) IsVelaInstalled

func (s *VelaInstallService) IsVelaInstalled(c echo.Context) error

Jump to

Keyboard shortcuts

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