Documentation
¶
Index ¶
- Constants
- type ClusterAccountsBean
- type ClusterAccountsService
- type ClusterAccountsServiceImpl
- func (impl ClusterAccountsServiceImpl) FindAll() ([]ClusterAccountsBean, error)
- func (impl ClusterAccountsServiceImpl) FindById(id int) (*ClusterAccountsBean, error)
- func (impl ClusterAccountsServiceImpl) FindOne(clusterName string) (*ClusterAccountsBean, error)
- func (impl ClusterAccountsServiceImpl) FindOneByEnvironment(environment string) (*ClusterAccountsBean, error)
- func (impl ClusterAccountsServiceImpl) Save(request *ClusterAccountsBean, userId int32) error
- func (impl ClusterAccountsServiceImpl) Update(request *ClusterAccountsBean, userId int32) error
- type ClusterBean
- type ClusterHelmConfigBean
- type ClusterHelmConfigService
- type ClusterHelmConfigServiceImpl
- type ClusterService
- type ClusterServiceImpl
- func (impl ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *ClusterBean, env *cluster.Environment) (int, error)
- func (impl ClusterServiceImpl) Delete(bean *ClusterBean, userId int32) error
- func (impl ClusterServiceImpl) FindAll() ([]*ClusterBean, error)
- func (impl ClusterServiceImpl) FindAllActive() ([]ClusterBean, error)
- func (impl ClusterServiceImpl) FindAllForAutoComplete() ([]ClusterBean, error)
- func (impl ClusterServiceImpl) FindById(id int) (*ClusterBean, error)
- func (impl ClusterServiceImpl) FindByIds(ids []int) ([]ClusterBean, error)
- func (impl ClusterServiceImpl) FindOne(clusterName string) (*ClusterBean, error)
- func (impl ClusterServiceImpl) FindOneActive(clusterName string) (*ClusterBean, error)
- func (impl ClusterServiceImpl) Save(bean *ClusterBean, userId int32) (*ClusterBean, error)
- func (impl ClusterServiceImpl) Update(bean *ClusterBean, userId int32) (*ClusterBean, error)
- type DefaultClusterComponent
- type EnvironmentBean
- type EnvironmentService
- type EnvironmentServiceImpl
- func (impl EnvironmentServiceImpl) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindById(id int) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*cluster.Environment, error)
- func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*ClusterBean, error)
- func (impl EnvironmentServiceImpl) FindOne(environment string) (*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAll() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetAllActive() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) GetClusterConfig(cluster *ClusterBean) (*util.ClusterConfig, error)
- func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete() ([]EnvironmentBean, error)
- func (impl EnvironmentServiceImpl) Update(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
- type PrometheusAuth
Constants ¶
View Source
const ClusterName = "default_cluster"
View Source
const TokenFilePath = "/var/run/secrets/kubernetes.io/serviceaccount/token"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterAccountsBean ¶
type ClusterAccountsBean struct { Id int `json:"id"` Account string `json:"account"` Config json.RawMessage `json:"config"` //Environment string `json:"environment, omitempty"` //ClusterName string `json:"cluster_name, omitempty"` //Namespace string `json:"namespace, omitempty"` Default bool `json:"default, omitempty"` ClusterId int `json:"cluster_id"` }
type ClusterAccountsService ¶
type ClusterAccountsService interface { Save(account *ClusterAccountsBean, userId int32) error FindOne(clusterName string) (*ClusterAccountsBean, error) FindOneByEnvironment(environment string) (*ClusterAccountsBean, error) Update(account *ClusterAccountsBean, userId int32) error FindById(id int) (*ClusterAccountsBean, error) FindAll() ([]ClusterAccountsBean, error) }
type ClusterAccountsServiceImpl ¶
type ClusterAccountsServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterAccountsServiceImpl ¶
func NewClusterAccountsServiceImpl(repository cluster.ClusterAccountsRepository, environmentClusterMappingsRepository cluster.EnvironmentRepository, clusterService ClusterService, logger *zap.SugaredLogger) *ClusterAccountsServiceImpl
func (ClusterAccountsServiceImpl) FindAll ¶
func (impl ClusterAccountsServiceImpl) FindAll() ([]ClusterAccountsBean, error)
func (ClusterAccountsServiceImpl) FindById ¶
func (impl ClusterAccountsServiceImpl) FindById(id int) (*ClusterAccountsBean, error)
func (ClusterAccountsServiceImpl) FindOne ¶
func (impl ClusterAccountsServiceImpl) FindOne(clusterName string) (*ClusterAccountsBean, error)
func (ClusterAccountsServiceImpl) FindOneByEnvironment ¶
func (impl ClusterAccountsServiceImpl) FindOneByEnvironment(environment string) (*ClusterAccountsBean, error)
func (ClusterAccountsServiceImpl) Save ¶
func (impl ClusterAccountsServiceImpl) Save(request *ClusterAccountsBean, userId int32) error
func (ClusterAccountsServiceImpl) Update ¶
func (impl ClusterAccountsServiceImpl) Update(request *ClusterAccountsBean, userId int32) error
type ClusterBean ¶
type ClusterBean struct { Id int `json:"id,omitempty" validate:"number"` ClusterName string `json:"cluster_name,omitempty" validate:"required"` ServerUrl string `json:"server_url,omitempty" validate:"url,required"` PrometheusUrl string `json:"prometheus_url,omitempty" validate:"url,required"` Active bool `json:"active"` Config map[string]string `json:"config,omitempty" validate:"required"` PrometheusAuth *PrometheusAuth `json:"prometheusAuth,omitempty"` DefaultClusterComponent []*DefaultClusterComponent `json:"defaultClusterComponent"` AgentInstallationStage int `json:"agentInstallationStage,notnull"` // -1=external, 0=not triggered, 1=progressing, 2=success, 3=fails }
type ClusterHelmConfigBean ¶
type ClusterHelmConfigService ¶
type ClusterHelmConfigService interface { Save(clusterHelmConfigBean *ClusterHelmConfigBean, userId int32) error FindOneByEnvironment(environment string) (*ClusterHelmConfigBean, error) }
type ClusterHelmConfigServiceImpl ¶
type ClusterHelmConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterHelmConfigServiceImpl ¶
func NewClusterHelmConfigServiceImpl(repository cluster.ClusterHelmConfigRepository, clusterService ClusterService, logger *zap.SugaredLogger) *ClusterHelmConfigServiceImpl
func (ClusterHelmConfigServiceImpl) FindOneByEnvironment ¶
func (impl ClusterHelmConfigServiceImpl) FindOneByEnvironment(environment string) (*ClusterHelmConfigBean, error)
func (ClusterHelmConfigServiceImpl) Save ¶
func (impl ClusterHelmConfigServiceImpl) Save(bean *ClusterHelmConfigBean, userId int32) error
type ClusterService ¶
type ClusterService interface { Save(bean *ClusterBean, userId int32) (*ClusterBean, error) FindOne(clusterName string) (*ClusterBean, error) FindOneActive(clusterName string) (*ClusterBean, error) FindAll() ([]*ClusterBean, error) FindAllActive() ([]ClusterBean, error) FindById(id int) (*ClusterBean, error) FindByIds(id []int) ([]ClusterBean, error) Update(bean *ClusterBean, userId int32) (*ClusterBean, error) Delete(bean *ClusterBean, userId int32) error FindAllForAutoComplete() ([]ClusterBean, error) CreateGrafanaDataSource(clusterBean *ClusterBean, env *cluster.Environment) (int, error) }
type ClusterServiceImpl ¶
type ClusterServiceImpl struct {
// contains filtered or unexported fields
}
func NewClusterServiceImpl ¶
func NewClusterServiceImpl(repository cluster.ClusterRepository, environmentRepository cluster.EnvironmentRepository, grafanaClient grafana.GrafanaClient, logger *zap.SugaredLogger, installedAppRepository appstore.InstalledAppRepository, clusterInstalledAppsRepository appstore.ClusterInstalledAppsRepository) *ClusterServiceImpl
func (ClusterServiceImpl) CreateGrafanaDataSource ¶
func (impl ClusterServiceImpl) CreateGrafanaDataSource(clusterBean *ClusterBean, env *cluster.Environment) (int, error)
func (ClusterServiceImpl) Delete ¶
func (impl ClusterServiceImpl) Delete(bean *ClusterBean, userId int32) error
func (ClusterServiceImpl) FindAll ¶
func (impl ClusterServiceImpl) FindAll() ([]*ClusterBean, error)
func (ClusterServiceImpl) FindAllActive ¶
func (impl ClusterServiceImpl) FindAllActive() ([]ClusterBean, error)
func (ClusterServiceImpl) FindAllForAutoComplete ¶
func (impl ClusterServiceImpl) FindAllForAutoComplete() ([]ClusterBean, error)
func (ClusterServiceImpl) FindById ¶
func (impl ClusterServiceImpl) FindById(id int) (*ClusterBean, error)
func (ClusterServiceImpl) FindByIds ¶
func (impl ClusterServiceImpl) FindByIds(ids []int) ([]ClusterBean, error)
func (ClusterServiceImpl) FindOne ¶
func (impl ClusterServiceImpl) FindOne(clusterName string) (*ClusterBean, error)
func (ClusterServiceImpl) FindOneActive ¶
func (impl ClusterServiceImpl) FindOneActive(clusterName string) (*ClusterBean, error)
func (ClusterServiceImpl) Save ¶
func (impl ClusterServiceImpl) Save(bean *ClusterBean, userId int32) (*ClusterBean, error)
func (ClusterServiceImpl) Update ¶
func (impl ClusterServiceImpl) Update(bean *ClusterBean, userId int32) (*ClusterBean, error)
type DefaultClusterComponent ¶
type EnvironmentBean ¶
type EnvironmentBean struct { Id int `json:"id,omitempty" validate:"number"` Environment string `json:"environment_name,omitempty" validate:"required,max=50"` ClusterId int `json:"cluster_id,omitempty" validate:"number,required"` ClusterName string `json:"cluster_name,omitempty"` Active bool `json:"active"` Default bool `json:"default"` PrometheusEndpoint string `json:"prometheus_endpoint,omitempty"` Namespace string `json:"namespace,omitempty" validate:"max=50"` CdArgoSetup bool `json:"isClusterCdActive"` }
type EnvironmentService ¶
type EnvironmentService interface { FindOne(environment string) (*EnvironmentBean, error) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error) GetAll() ([]EnvironmentBean, error) GetAllActive() ([]EnvironmentBean, error) FindById(id int) (*EnvironmentBean, error) Update(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error) FindClusterByEnvId(id int) (*ClusterBean, error) GetEnvironmentListForAutocomplete() ([]EnvironmentBean, error) FindByIds(ids []*int) ([]*EnvironmentBean, error) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*cluster.Environment, error) GetByClusterId(id int) ([]*EnvironmentBean, error) GetClusterConfig(cluster *ClusterBean) (*util.ClusterConfig, error) }
type EnvironmentServiceImpl ¶
type EnvironmentServiceImpl struct { K8sUtil *util.K8sUtil // contains filtered or unexported fields }
func NewEnvironmentServiceImpl ¶
func NewEnvironmentServiceImpl(environmentRepository cluster.EnvironmentRepository, clusterService ClusterService, logger *zap.SugaredLogger, K8sUtil *util.K8sUtil, propertiesConfigService pipeline.PropertiesConfigService, grafanaClient grafana.GrafanaClient, ) *EnvironmentServiceImpl
func (EnvironmentServiceImpl) Create ¶
func (impl EnvironmentServiceImpl) Create(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) FindById ¶
func (impl EnvironmentServiceImpl) FindById(id int) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByIds ¶
func (impl EnvironmentServiceImpl) FindByIds(ids []*int) ([]*EnvironmentBean, error)
func (EnvironmentServiceImpl) FindByNamespaceAndClusterName ¶
func (impl EnvironmentServiceImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*cluster.Environment, error)
func (EnvironmentServiceImpl) FindClusterByEnvId ¶
func (impl EnvironmentServiceImpl) FindClusterByEnvId(id int) (*ClusterBean, error)
func (EnvironmentServiceImpl) FindOne ¶
func (impl EnvironmentServiceImpl) FindOne(environment string) (*EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAll ¶
func (impl EnvironmentServiceImpl) GetAll() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) GetAllActive ¶
func (impl EnvironmentServiceImpl) GetAllActive() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) GetByClusterId ¶
func (impl EnvironmentServiceImpl) GetByClusterId(id int) ([]*EnvironmentBean, error)
func (EnvironmentServiceImpl) GetClusterConfig ¶
func (impl EnvironmentServiceImpl) GetClusterConfig(cluster *ClusterBean) (*util.ClusterConfig, error)
func (EnvironmentServiceImpl) GetEnvironmentListForAutocomplete ¶
func (impl EnvironmentServiceImpl) GetEnvironmentListForAutocomplete() ([]EnvironmentBean, error)
func (EnvironmentServiceImpl) Update ¶
func (impl EnvironmentServiceImpl) Update(mappings *EnvironmentBean, userId int32) (*EnvironmentBean, error)
Click to show internal directories.
Click to hide internal directories.