Documentation ¶
Index ¶
- type ClusterNamespacePair
- type EnvCluserInfo
- type Environment
- type EnvironmentRepository
- type EnvironmentRepositoryImpl
- func (repositoryImpl EnvironmentRepositoryImpl) Create(mappings *Environment) error
- func (repositoryImpl EnvironmentRepositoryImpl) FindAll() ([]Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindAllActive() ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveEnvOnlyDetails() ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveEnvironmentCount() (int, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveWithFilter() ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterId(clusterId int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdAndNamespace(namespaceClusterPair []*ClusterNamespacePair) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIds(clusterIds []int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdsWithFilter(clusterIds []int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvName(envName string) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvNameAndClusterIds(envName string, clusterIds []int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvNameOrIdentifierOrNamespace(clusterId int, envName string, identifier string, namespace string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindById(id int) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByIdentifier(identifier string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByIds(ids []*int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByName(name string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByNameOrIdentifier(name string, identifier string) (*Environment, error)
- func (repo EnvironmentRepositoryImpl) FindByNames(envNames []string) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindEnvByNameWithClusterDetails(envName string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindEnvClusterInfosByIds(envIds []int) ([]*EnvCluserInfo, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindEnvLinkedWithCiPipelines(externalCi bool, ciPipelineIds []int) ([]*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindIdByName(name string) (int, error)
- func (repo EnvironmentRepositoryImpl) FindIdsByNames(envNames []string) ([]int, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindOne(environment string) (*Environment, error)
- func (repositoryImpl EnvironmentRepositoryImpl) FindOneByNamespaceAndClusterId(namespace string, clusterId int) (*Environment, error)
- func (repo EnvironmentRepositoryImpl) GetConnection() (dbConnection *pg.DB)
- func (repo EnvironmentRepositoryImpl) MarkEnvironmentDeleted(deleteReq *Environment, tx *pg.Tx) error
- func (repositoryImpl EnvironmentRepositoryImpl) Update(mappings *Environment) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterNamespacePair ¶
type EnvCluserInfo ¶
type Environment ¶
type Environment struct { Id int `sql:"id,pk"` Name string `sql:"environment_name"` ClusterId int `sql:"cluster_id"` Cluster *repository.Cluster Active bool `sql:"active,notnull"` Default bool `sql:"default,notnull"` GrafanaDatasourceId int `sql:"grafana_datasource_id"` Namespace string `sql:"namespace"` EnvironmentIdentifier string `sql:"environment_identifier"` Description string `sql:"description"` IsVirtualEnvironment bool `sql:"is_virtual_environment"` sql.AuditLog // contains filtered or unexported fields }
func (*Environment) IsEmpty ¶
func (environment *Environment) IsEmpty() bool
type EnvironmentRepository ¶
type EnvironmentRepository interface { FindOne(environment string) (*Environment, error) Create(mappings *Environment) error FindAll() ([]Environment, error) FindAllActive() ([]*Environment, error) FindAllActiveEnvironmentCount() (int, error) MarkEnvironmentDeleted(mappings *Environment, tx *pg.Tx) error GetConnection() (dbConnection *pg.DB) FindAllActiveEnvOnlyDetails() ([]*Environment, error) FindById(id int) (*Environment, error) Update(mappings *Environment) error FindByName(name string) (*Environment, error) FindIdByName(name string) (int, error) FindByIdentifier(identifier string) (*Environment, error) FindByNameOrIdentifier(name string, identifier string) (*Environment, error) FindByEnvNameOrIdentifierOrNamespace(clusterId int, envName string, identifier string, namespace string) (*Environment, error) FindByClusterId(clusterId int) ([]*Environment, error) FindByIds(ids []*int) ([]*Environment, error) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*Environment, error) FindOneByNamespaceAndClusterId(namespace string, clusterId int) (*Environment, error) FindByClusterIdAndNamespace(namespaceClusterPair []*ClusterNamespacePair) ([]*Environment, error) FindByClusterIds(clusterIds []int) ([]*Environment, error) FindIdsByNames(envNames []string) ([]int, error) FindByNames(envNames []string) ([]*Environment, error) FindByEnvName(envName string) ([]*Environment, error) FindByEnvNameAndClusterIds(envName string, clusterIds []int) ([]*Environment, error) FindByClusterIdsWithFilter(clusterIds []int) ([]*Environment, error) FindAllActiveWithFilter() ([]*Environment, error) FindEnvClusterInfosByIds([]int) ([]*EnvCluserInfo, error) FindEnvLinkedWithCiPipelines(externalCi bool, ciPipelineIds []int) ([]*Environment, error) FindEnvByNameWithClusterDetails(envName string) (*Environment, error) }
type EnvironmentRepositoryImpl ¶
type EnvironmentRepositoryImpl struct {
// contains filtered or unexported fields
}
func NewEnvironmentRepositoryImpl ¶
func NewEnvironmentRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger, appStatusRepository appStatus.AppStatusRepository) *EnvironmentRepositoryImpl
func (EnvironmentRepositoryImpl) Create ¶
func (repositoryImpl EnvironmentRepositoryImpl) Create(mappings *Environment) error
func (EnvironmentRepositoryImpl) FindAll ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindAll() ([]Environment, error)
func (EnvironmentRepositoryImpl) FindAllActive ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindAllActive() ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindAllActiveEnvOnlyDetails ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveEnvOnlyDetails() ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindAllActiveEnvironmentCount ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveEnvironmentCount() (int, error)
func (EnvironmentRepositoryImpl) FindAllActiveWithFilter ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveWithFilter() ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByClusterId ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterId(clusterId int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByClusterIdAndNamespace ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdAndNamespace(namespaceClusterPair []*ClusterNamespacePair) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByClusterIds ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIds(clusterIds []int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByClusterIdsWithFilter ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdsWithFilter(clusterIds []int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByEnvName ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvName(envName string) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByEnvNameAndClusterIds ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvNameAndClusterIds(envName string, clusterIds []int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByEnvNameOrIdentifierOrNamespace ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvNameOrIdentifierOrNamespace(clusterId int, envName string, identifier string, namespace string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindById ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindById(id int) (*Environment, error)
func (EnvironmentRepositoryImpl) FindByIdentifier ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByIdentifier(identifier string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindByIds ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByIds(ids []*int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByName ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByName(name string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindByNameOrIdentifier ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByNameOrIdentifier(name string, identifier string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindByNames ¶
func (repo EnvironmentRepositoryImpl) FindByNames(envNames []string) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindByNamespaceAndClusterName ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindEnvByNameWithClusterDetails ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindEnvByNameWithClusterDetails(envName string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindEnvClusterInfosByIds ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindEnvClusterInfosByIds(envIds []int) ([]*EnvCluserInfo, error)
func (EnvironmentRepositoryImpl) FindEnvLinkedWithCiPipelines ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindEnvLinkedWithCiPipelines(externalCi bool, ciPipelineIds []int) ([]*Environment, error)
func (EnvironmentRepositoryImpl) FindIdByName ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindIdByName(name string) (int, error)
func (EnvironmentRepositoryImpl) FindIdsByNames ¶
func (repo EnvironmentRepositoryImpl) FindIdsByNames(envNames []string) ([]int, error)
func (EnvironmentRepositoryImpl) FindOne ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindOne(environment string) (*Environment, error)
func (EnvironmentRepositoryImpl) FindOneByNamespaceAndClusterId ¶
func (repositoryImpl EnvironmentRepositoryImpl) FindOneByNamespaceAndClusterId(namespace string, clusterId int) (*Environment, error)
func (EnvironmentRepositoryImpl) GetConnection ¶
func (repo EnvironmentRepositoryImpl) GetConnection() (dbConnection *pg.DB)
func (EnvironmentRepositoryImpl) MarkEnvironmentDeleted ¶
func (repo EnvironmentRepositoryImpl) MarkEnvironmentDeleted(deleteReq *Environment, tx *pg.Tx) error
func (EnvironmentRepositoryImpl) Update ¶
func (repositoryImpl EnvironmentRepositoryImpl) Update(mappings *Environment) error
Click to show internal directories.
Click to hide internal directories.