repository

package
v0.6.18 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Id                     int               `sql:"id,pk"`
	ClusterName            string            `sql:"cluster_name"`
	ServerUrl              string            `sql:"server_url"`
	PrometheusEndpoint     string            `sql:"prometheus_endpoint"`
	Active                 bool              `sql:"active,notnull"`
	CdArgoSetup            bool              `sql:"cd_argo_setup,notnull"`
	Config                 map[string]string `sql:"config"`
	PUserName              string            `sql:"p_username"`
	PPassword              string            `sql:"p_password"`
	PTlsClientCert         string            `sql:"p_tls_client_cert"`
	PTlsClientKey          string            `sql:"p_tls_client_key"`
	AgentInstallationStage int               `sql:"agent_installation_stage"`
	K8sVersion             string            `sql:"k8s_version"`
	ErrorInConnecting      string            `sql:"error_in_connecting"`
	IsVirtualCluster       bool              `sql:"is_virtual_cluster"`
	InsecureSkipTlsVerify  bool              `sql:"insecure_skip_tls_verify"`
	sql.AuditLog
	// contains filtered or unexported fields
}

func (Cluster) GetClusterConfig added in v0.6.17

func (cluster Cluster) GetClusterConfig() *rest.Config

type ClusterDescription added in v0.6.17

type ClusterDescription struct {
	ClusterId        int       `sql:"cluster_id"`
	ClusterName      string    `sql:"cluster_name"`
	ClusterCreatedOn time.Time `sql:"cluster_created_on"`
	ClusterCreatedBy int32     `sql:"cluster_created_by"`
	NoteId           int       `sql:"note_id,pk"`
	Description      string    `sql:"description"`
	sql.AuditLog
}

type ClusterDescriptionRepository added in v0.6.17

type ClusterDescriptionRepository interface {
	FindByClusterIdWithClusterDetails(id int) (*ClusterDescription, error)
}

type ClusterDescriptionRepositoryImpl added in v0.6.17

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

func NewClusterDescriptionRepositoryImpl added in v0.6.17

func NewClusterDescriptionRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *ClusterDescriptionRepositoryImpl

func (ClusterDescriptionRepositoryImpl) FindByClusterIdWithClusterDetails added in v0.6.17

func (impl ClusterDescriptionRepositoryImpl) FindByClusterIdWithClusterDetails(id int) (*ClusterDescription, error)

type ClusterNamespacePair added in v0.3.14

type ClusterNamespacePair struct {
	ClusterId     int
	NamespaceName string
}

type ClusterNote added in v0.6.17

type ClusterNote struct {
	Id          int    `sql:"id,pk"`
	ClusterId   int    `sql:"cluster_id"`
	Description string `sql:"description"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ClusterNoteHistory added in v0.6.17

type ClusterNoteHistory struct {
	Id          int    `sql:"id,pk"`
	NoteId      int    `sql:"note_id"`
	Description string `sql:"description"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type ClusterNoteHistoryRepository added in v0.6.17

type ClusterNoteHistoryRepository interface {
	SaveHistory(model *ClusterNoteHistory) error
	FindHistoryByNoteId(id []int) ([]ClusterNoteHistory, error)
}

type ClusterNoteHistoryRepositoryImpl added in v0.6.17

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

func NewClusterNoteHistoryRepositoryImpl added in v0.6.17

func NewClusterNoteHistoryRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *ClusterNoteHistoryRepositoryImpl

func (ClusterNoteHistoryRepositoryImpl) FindHistoryByNoteId added in v0.6.17

func (impl ClusterNoteHistoryRepositoryImpl) FindHistoryByNoteId(id []int) ([]ClusterNoteHistory, error)

func (ClusterNoteHistoryRepositoryImpl) SaveHistory added in v0.6.17

type ClusterNoteRepository added in v0.6.17

type ClusterNoteRepository interface {
	Save(model *ClusterNote) error
	FindByClusterId(id int) (*ClusterNote, error)
	Update(model *ClusterNote) error
}

type ClusterNoteRepositoryImpl added in v0.6.17

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

func NewClusterNoteRepositoryImpl added in v0.6.17

func NewClusterNoteRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *ClusterNoteRepositoryImpl

func (ClusterNoteRepositoryImpl) FindByClusterId added in v0.6.17

func (impl ClusterNoteRepositoryImpl) FindByClusterId(id int) (*ClusterNote, error)

func (ClusterNoteRepositoryImpl) Save added in v0.6.17

func (impl ClusterNoteRepositoryImpl) Save(model *ClusterNote) error

func (ClusterNoteRepositoryImpl) Update added in v0.6.17

func (impl ClusterNoteRepositoryImpl) Update(model *ClusterNote) error

type ClusterRepository

type ClusterRepository interface {
	Save(model *Cluster) error
	FindOne(clusterName string) (*Cluster, error)
	FindOneActive(clusterName string) (*Cluster, error)
	FindAll() ([]Cluster, error)
	FindAllActive() ([]Cluster, error)
	FindById(id int) (*Cluster, error)
	FindByIds(id []int) ([]Cluster, error)
	Update(model *Cluster) error
	Delete(model *Cluster) error
	MarkClusterDeleted(model *Cluster) error
	UpdateClusterConnectionStatus(clusterId int, errorInConnecting string) error
	FindActiveClusters() ([]Cluster, error)
	SaveAll(models []*Cluster) error
}

type ClusterRepositoryImpl

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

func NewClusterRepositoryImpl

func NewClusterRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *ClusterRepositoryImpl

func (ClusterRepositoryImpl) Delete

func (impl ClusterRepositoryImpl) Delete(model *Cluster) error

func (ClusterRepositoryImpl) FindActiveClusters added in v0.6.18

func (impl ClusterRepositoryImpl) FindActiveClusters() ([]Cluster, error)

func (ClusterRepositoryImpl) FindAll

func (impl ClusterRepositoryImpl) FindAll() ([]Cluster, error)

func (ClusterRepositoryImpl) FindAllActive

func (impl ClusterRepositoryImpl) FindAllActive() ([]Cluster, error)

func (ClusterRepositoryImpl) FindById

func (impl ClusterRepositoryImpl) FindById(id int) (*Cluster, error)

func (ClusterRepositoryImpl) FindByIds

func (impl ClusterRepositoryImpl) FindByIds(id []int) ([]Cluster, error)

func (ClusterRepositoryImpl) FindOne

func (impl ClusterRepositoryImpl) FindOne(clusterName string) (*Cluster, error)

func (ClusterRepositoryImpl) FindOneActive

func (impl ClusterRepositoryImpl) FindOneActive(clusterName string) (*Cluster, error)

func (ClusterRepositoryImpl) MarkClusterDeleted added in v0.3.15

func (impl ClusterRepositoryImpl) MarkClusterDeleted(model *Cluster) error

func (ClusterRepositoryImpl) Save

func (impl ClusterRepositoryImpl) Save(model *Cluster) error

func (ClusterRepositoryImpl) SaveAll added in v0.6.18

func (impl ClusterRepositoryImpl) SaveAll(models []*Cluster) error

func (ClusterRepositoryImpl) Update

func (impl ClusterRepositoryImpl) Update(model *Cluster) error

func (ClusterRepositoryImpl) UpdateClusterConnectionStatus added in v0.4.24

func (impl ClusterRepositoryImpl) UpdateClusterConnectionStatus(clusterId int, errorInConnecting string) error

type EnvCluserInfo added in v0.6.17

type EnvCluserInfo struct {
	Id          int    `sql:"id"`
	ClusterName string `sql:"cluster_name"`
	Namespace   string `sql:"namespace"`
	Name        string `sql:"name"`
}

type Environment

type Environment struct {
	Id                    int    `sql:"id,pk"`
	Name                  string `sql:"environment_name"`
	ClusterId             int    `sql:"cluster_id"`
	Cluster               *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
}

type EnvironmentRepository

type EnvironmentRepository interface {
	FindOne(environment string) (*Environment, error)
	Create(mappings *Environment) error
	FindAll() ([]Environment, error)
	FindAllActive() ([]*Environment, 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)
	FindByIdentifier(identifier string) (*Environment, error)
	FindByNameOrIdentifier(name string, identifier 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)

	FindByEnvName(envName string) ([]*Environment, error)
	FindByEnvNameAndClusterIds(envName string, clusterIds []int) ([]*Environment, error)
	FindByClusterIdsWithFilter(clusterIds []int) ([]*Environment, error)
	FindAllActiveWithFilter() ([]*Environment, error)
	FindEnvClusterInfosByIds([]int) ([]*EnvCluserInfo, 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 added in v0.6.17

func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveEnvOnlyDetails() ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindAllActiveWithFilter added in v0.6.13

func (repositoryImpl EnvironmentRepositoryImpl) FindAllActiveWithFilter() ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByClusterId

func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterId(clusterId int) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByClusterIdAndNamespace added in v0.3.14

func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdAndNamespace(namespaceClusterPair []*ClusterNamespacePair) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByClusterIds added in v0.3.14

func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIds(clusterIds []int) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByClusterIdsWithFilter added in v0.6.13

func (repositoryImpl EnvironmentRepositoryImpl) FindByClusterIdsWithFilter(clusterIds []int) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByEnvName added in v0.6.13

func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvName(envName string) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByEnvNameAndClusterIds added in v0.6.13

func (repositoryImpl EnvironmentRepositoryImpl) FindByEnvNameAndClusterIds(envName string, clusterIds []int) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindById

func (repositoryImpl EnvironmentRepositoryImpl) FindById(id int) (*Environment, error)

func (EnvironmentRepositoryImpl) FindByIdentifier added in v0.3.14

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 added in v0.3.14

func (repositoryImpl EnvironmentRepositoryImpl) FindByNameOrIdentifier(name string, identifier string) (*Environment, error)

func (EnvironmentRepositoryImpl) FindByNamespaceAndClusterName

func (repositoryImpl EnvironmentRepositoryImpl) FindByNamespaceAndClusterName(namespaces string, clusterName string) (*Environment, error)

func (EnvironmentRepositoryImpl) FindEnvClusterInfosByIds added in v0.6.17

func (repositoryImpl EnvironmentRepositoryImpl) FindEnvClusterInfosByIds(envIds []int) ([]*EnvCluserInfo, error)

func (EnvironmentRepositoryImpl) FindIdsByNames added in v0.6.9

func (repo EnvironmentRepositoryImpl) FindIdsByNames(envNames []string) ([]int, error)

func (EnvironmentRepositoryImpl) FindOne

func (repositoryImpl EnvironmentRepositoryImpl) FindOne(environment string) (*Environment, error)

func (EnvironmentRepositoryImpl) FindOneByNamespaceAndClusterId added in v0.3.17

func (repositoryImpl EnvironmentRepositoryImpl) FindOneByNamespaceAndClusterId(namespace string, clusterId int) (*Environment, error)

func (EnvironmentRepositoryImpl) GetConnection added in v0.3.15

func (repo EnvironmentRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (EnvironmentRepositoryImpl) MarkEnvironmentDeleted added in v0.3.15

func (repo EnvironmentRepositoryImpl) MarkEnvironmentDeleted(deleteReq *Environment, tx *pg.Tx) error

func (EnvironmentRepositoryImpl) Update

func (repositoryImpl EnvironmentRepositoryImpl) Update(mappings *Environment) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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