deploymentConfig

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 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 ConfigType

type ConfigType string
const (
	Custom          ConfigType = "custom"
	SystemGenerated            = "system_generated"
)

type DeploymentAppType

type DeploymentAppType string
const (
	Argo DeploymentAppType = "argo_cd"
	Helm DeploymentAppType = "helm"
)

type DeploymentConfig

type DeploymentConfig struct {
	Id                int    `sql:"id,pk"`
	AppId             int    `sql:"app_id"`
	EnvironmentId     int    `sql:"environment_id"`
	DeploymentAppType string `sql:"deployment_app_type"`
	ConfigType        string `sql:"config_type"`
	RepoUrl           string `sql:"repo_url"`
	RepoName          string `sql:"repo_name"`
	ReleaseMode       string `json:"release_mode"`
	Active            bool   `sql:"active,notnull"`
	sql.AuditLog
	// contains filtered or unexported fields
}

type Repository

type Repository interface {
	Save(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)
	SaveAll(tx *pg.Tx, configs []*DeploymentConfig) ([]*DeploymentConfig, error)
	Update(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)
	UpdateAll(tx *pg.Tx, config []*DeploymentConfig) ([]*DeploymentConfig, error)
	GetById(id int) (*DeploymentConfig, error)
	GetByAppIdAndEnvId(appId, envId int) (*DeploymentConfig, error)
	GetAppLevelConfigForDevtronApps(appId int) (*DeploymentConfig, error)
	GetAppLevelConfigByAppIds(appIds []int) ([]*DeploymentConfig, error)
	GetAppAndEnvLevelConfigsInBulk(appIdToEnvIdsMap map[int][]int) ([]*DeploymentConfig, error)
	GetByAppIdAndEnvIdEvenIfInactive(appId, envId int) (*DeploymentConfig, error)
	UpdateRepoUrlByAppIdAndEnvId(repoUrl string, appId, envId int) error
}

type RepositoryImpl

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

func NewRepositoryImpl

func NewRepositoryImpl(dbConnection *pg.DB) *RepositoryImpl

func (*RepositoryImpl) GetAppAndEnvLevelConfigsInBulk

func (impl *RepositoryImpl) GetAppAndEnvLevelConfigsInBulk(appIdToEnvIdsMap map[int][]int) ([]*DeploymentConfig, error)

func (*RepositoryImpl) GetAppLevelConfigByAppIds

func (impl *RepositoryImpl) GetAppLevelConfigByAppIds(appIds []int) ([]*DeploymentConfig, error)

func (*RepositoryImpl) GetAppLevelConfigForDevtronApps

func (impl *RepositoryImpl) GetAppLevelConfigForDevtronApps(appId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetByAppIdAndEnvId

func (impl *RepositoryImpl) GetByAppIdAndEnvId(appId, envId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetByAppIdAndEnvIdEvenIfInactive

func (impl *RepositoryImpl) GetByAppIdAndEnvIdEvenIfInactive(appId, envId int) (*DeploymentConfig, error)

func (*RepositoryImpl) GetById

func (impl *RepositoryImpl) GetById(id int) (*DeploymentConfig, error)

func (*RepositoryImpl) Save

func (impl *RepositoryImpl) Save(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)

func (*RepositoryImpl) SaveAll

func (impl *RepositoryImpl) SaveAll(tx *pg.Tx, configs []*DeploymentConfig) ([]*DeploymentConfig, error)

func (*RepositoryImpl) Update

func (impl *RepositoryImpl) Update(tx *pg.Tx, config *DeploymentConfig) (*DeploymentConfig, error)

func (*RepositoryImpl) UpdateAll

func (impl *RepositoryImpl) UpdateAll(tx *pg.Tx, config []*DeploymentConfig) ([]*DeploymentConfig, error)

func (*RepositoryImpl) UpdateRepoUrlByAppIdAndEnvId

func (impl *RepositoryImpl) UpdateRepoUrlByAppIdAndEnvId(repoUrl string, appId, envId int) error

Jump to

Keyboard shortcuts

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