environment

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2025 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEnvironmentName

func BuildEnvironmentName(clusterName string, namespace string) string

Types

type EnvironmentService

type EnvironmentService interface {
	FindOne(environment string) (*bean2.EnvironmentBean, 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) *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) 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)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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