cluster

package
v0.2.27 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

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"`
	models.AuditLog
	// contains filtered or unexported fields
}

type ClusterAccounts

type ClusterAccounts struct {
	Id        int    `sql:"id,pk"`
	Account   string `sql:"account"`
	Config    string `sql:"config"`
	ClusterId int    `sql:"cluster_id"`
	Cluster   Cluster
	//Namespace string `sql:"namespace"`
	Active  bool `sql:"active"`
	Default bool `sql:"is_default"`
	models.AuditLog
	// contains filtered or unexported fields
}

type ClusterAccountsRepository

type ClusterAccountsRepository interface {
	FindOne(clusterName string) (*ClusterAccounts, error)
	FindOneByEnvironment(clusterName string) (*ClusterAccounts, error)
	Save(account *ClusterAccounts) error
	Update(account *ClusterAccounts) error
	FindById(id int) (*ClusterAccounts, error)
	FindAll() ([]ClusterAccounts, error)
}

type ClusterAccountsRepositoryImpl

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

func NewClusterAccountsRepositoryImpl

func NewClusterAccountsRepositoryImpl(dbConnection *pg.DB) *ClusterAccountsRepositoryImpl

func (ClusterAccountsRepositoryImpl) FindAll

func (repositoryImpl ClusterAccountsRepositoryImpl) FindAll() ([]ClusterAccounts, error)

func (ClusterAccountsRepositoryImpl) FindById

func (repositoryImpl ClusterAccountsRepositoryImpl) FindById(id int) (*ClusterAccounts, error)

func (ClusterAccountsRepositoryImpl) FindOne

func (repositoryImpl ClusterAccountsRepositoryImpl) FindOne(clusterName string) (*ClusterAccounts, error)

func (ClusterAccountsRepositoryImpl) FindOneByEnvironment

func (repositoryImpl ClusterAccountsRepositoryImpl) FindOneByEnvironment(environment string) (*ClusterAccounts, error)

func (ClusterAccountsRepositoryImpl) Save

func (repositoryImpl ClusterAccountsRepositoryImpl) Save(account *ClusterAccounts) error

func (ClusterAccountsRepositoryImpl) Update

func (repositoryImpl ClusterAccountsRepositoryImpl) Update(account *ClusterAccounts) error

type ClusterHelmConfig

type ClusterHelmConfig struct {
	Id         int `sql:"id,pk"`
	ClusterId  int `sql:"cluster_id"`
	Cluster    Cluster
	TillerUrl  string `sql:"tiller_url"`
	TillerCert string `sql:"tiller_cert"`
	TillerKey  string `sql:"tiller_key"`
	Active     bool   `sql:"active"`
	models.AuditLog
	// contains filtered or unexported fields
}

type ClusterHelmConfigRepository

type ClusterHelmConfigRepository interface {
	Save(clusterHelmConfig *ClusterHelmConfig) error
	FindOneByEnvironment(environment string) (*ClusterHelmConfig, error)
}

type ClusterHelmConfigRepositoryImpl

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

func NewClusterHelmConfigRepositoryImpl

func NewClusterHelmConfigRepositoryImpl(dbConnection *pg.DB) *ClusterHelmConfigRepositoryImpl

func (ClusterHelmConfigRepositoryImpl) FindOneByEnvironment

func (impl ClusterHelmConfigRepositoryImpl) FindOneByEnvironment(environment string) (*ClusterHelmConfig, error)

func (ClusterHelmConfigRepositoryImpl) Save

func (impl ClusterHelmConfigRepositoryImpl) Save(clusterHelmConfig *ClusterHelmConfig) 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
}

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) 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) Save

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

func (ClusterRepositoryImpl) Update

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

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"`
	models.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)

	FindById(id int) (*Environment, error)
	Update(mappings *Environment) error
	FindByName(name string) (*Environment, error)
	FindByClusterId(clusterId int) ([]*Environment, error)
	FindByIds(ids []*int) ([]*Environment, error)
	FindByNamespaceAndClusterName(namespaces string, clusterName string) (*Environment, error)
}

type EnvironmentRepositoryImpl

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

func NewEnvironmentRepositoryImpl

func NewEnvironmentRepositoryImpl(dbConnection *pg.DB) *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) FindByClusterId

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

func (EnvironmentRepositoryImpl) FindById

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

func (EnvironmentRepositoryImpl) FindByIds

func (repo EnvironmentRepositoryImpl) FindByIds(ids []*int) ([]*Environment, error)

func (EnvironmentRepositoryImpl) FindByName

func (repositoryImpl EnvironmentRepositoryImpl) FindByName(name string) (*Environment, error)

func (EnvironmentRepositoryImpl) FindByNamespaceAndClusterName

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

func (EnvironmentRepositoryImpl) FindOne

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

func (EnvironmentRepositoryImpl) Update

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

Jump to

Keyboard shortcuts

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