Documentation
¶
Index ¶
- func BuildEnvironmentName(clusterName string, namespace string) string
- type EnvironmentService
- type EnvironmentServiceImpl
- func (impl EnvironmentServiceImpl) Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
- func (impl EnvironmentServiceImpl) FindById(id int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
- func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*bean4.ClusterBean, error)
- func (impl EnvironmentServiceImpl) FindOne(environment string) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActive() ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActiveEnvironmentCount() (int, error)
- func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, ...) ([]*bean2.ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
- func (impl EnvironmentServiceImpl) GetDataSourceName(bean *bean2.EnvironmentBean) (*bean2.DataSourceMetaData, error)
- func (impl EnvironmentServiceImpl) GetDetailsById(envId int) (*repository.Environment, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*bean4.ClusterBean, respMap *sync.Map, clusterExistInDb bool)
- func (impl EnvironmentServiceImpl) IsReceivedDeploymentTypeValid(deploymentConfig map[string]bool) (bool, []string)
- func (impl EnvironmentServiceImpl) Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildEnvironmentName ¶
Types ¶
type EnvironmentService ¶
type EnvironmentService interface {
FindOne(environment string) (*bean2.EnvironmentBean, error)
GetDataSourceName(*bean2.EnvironmentBean) (dataSourceData *bean2.DataSourceMetaData, err error)
Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
GetAllActive() ([]bean2.EnvironmentBean, error)
GetAllActiveEnvironmentCount() (int, error)
Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
FindClusterByEnvId(id int) (*bean4.ClusterBean, error)
// FindById provides an exposed struct of bean.EnvironmentBean;
// Usage - can be used for API responses;
FindById(id int) (*bean2.EnvironmentBean, error)
// GetExtendedEnvBeanById is used internally to get combined env and cluster data in bean.EnvironmentBean;
// Usage - used for intra-service communications only;
// For exposed view use FindById instead
GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*bean2.ClusterEnvDto, error)
GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
HandleErrorInClusterConnections(clusters []*bean4.ClusterBean, respMap *sync.Map, clusterExistInDb bool)
GetDetailsById(envId int) (*repository.Environment, error)
}
type EnvironmentServiceImpl ¶
type EnvironmentServiceImpl struct {
K8sUtil *util2.K8sServiceImpl
// contains filtered or unexported fields
}
func NewEnvironmentServiceImpl ¶
func NewEnvironmentServiceImpl(environmentRepository repository.EnvironmentRepository, clusterService cluster.ClusterService, logger *zap.SugaredLogger, K8sUtil *util2.K8sServiceImpl, k8sInformerFactory informer.K8sInformerFactory, userAuthService user.UserAuthService, attributesRepository repository2.AttributesRepository, clusterReadService read.ClusterReadService, grafanaClient grafana.GrafanaClient) *EnvironmentServiceImpl
func (EnvironmentServiceImpl) Create ¶
func (impl EnvironmentServiceImpl) Create(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) Delete ¶
func (impl EnvironmentServiceImpl) Delete(deleteReq *bean2.EnvironmentBean, userId int32) error
func (EnvironmentServiceImpl) FindById ¶
func (impl EnvironmentServiceImpl) FindById(id int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByIds ¶
func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByNamespaceAndClusterName ¶
func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*repository.Environment, error)
func (EnvironmentServiceImpl) FindClusterByEnvId ¶
func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*bean4.ClusterBean, error)
func (EnvironmentServiceImpl) FindOne ¶
func (impl EnvironmentServiceImpl) FindOne(environment string) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) FindOneByNamespaceAndClusterId ¶
func (impl EnvironmentServiceImpl) FindOneByNamespaceAndClusterId(namespaces string, clusterId int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActive ¶
func (impl EnvironmentServiceImpl) GetAllActive() ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActiveEnvironmentCount ¶
func (impl EnvironmentServiceImpl) GetAllActiveEnvironmentCount() (int, error)
func (EnvironmentServiceImpl) GetByClusterId ¶
func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown ¶
func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDown(token string, isActionUserSuperAdmin bool, auth func(email string, object []string) map[string]bool) ([]*bean2.ClusterEnvDto, error)
func (EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds ¶
func (impl EnvironmentServiceImpl) GetCombinedEnvironmentListForDropDownByClusterIds(token string, clusterIds []int, auth func(token string, object string) bool) ([]*bean2.ClusterEnvDto, error)
func (EnvironmentServiceImpl) GetDataSourceName ¶ added in v1.5.0
func (impl EnvironmentServiceImpl) GetDataSourceName(bean *bean2.EnvironmentBean) (*bean2.DataSourceMetaData, error)
func (EnvironmentServiceImpl) GetDetailsById ¶
func (impl EnvironmentServiceImpl) GetDetailsById(envId int) (*repository.Environment, error)
func (EnvironmentServiceImpl) GetEnvironmentListForAutocomplete ¶
func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete(isDeploymentTypeParam bool) ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete ¶
func (impl EnvironmentServiceImpl) GetEnvironmentOnlyListForAutocomplete() ([]bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) GetExtendedEnvBeanById ¶
func (impl EnvironmentServiceImpl) GetExtendedEnvBeanById(id int) (*bean2.EnvironmentBean, error)
func (EnvironmentServiceImpl) HandleErrorInClusterConnections ¶
func (impl EnvironmentServiceImpl) HandleErrorInClusterConnections(clusters []*bean4.ClusterBean, respMap *sync.Map, clusterExistInDb bool)
func (EnvironmentServiceImpl) IsReceivedDeploymentTypeValid ¶
func (impl EnvironmentServiceImpl) IsReceivedDeploymentTypeValid(deploymentConfig map[string]bool) (bool, []string)
func (EnvironmentServiceImpl) Update ¶
func (impl EnvironmentServiceImpl) Update(mappings *bean2.EnvironmentBean, userId int32) (*bean2.EnvironmentBean, error)
Click to show internal directories.
Click to hide internal directories.