Help us shape the future of Go! Take the 2026 Go Developer Survey

repository

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2025 License: Apache-2.0 Imports: 19 Imported by: 29

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterInstalledApps

type ClusterInstalledApps struct {
	Id             int `sql:"id,pk"`
	ClusterId      int `sql:"cluster_id,notnull"`
	InstalledAppId int `sql:"installed_app_id,notnull"`
	InstalledApp   InstalledApps
	sql.AuditLog
	// contains filtered or unexported fields
}

type ClusterInstalledAppsRepository

type ClusterInstalledAppsRepository interface {
	Save(model *ClusterInstalledApps, tx *pg.Tx) error
	FindByClusterId(clusterId int) ([]*ClusterInstalledApps, error)
	FindByClusterIds(clusterIds []int) ([]*ClusterInstalledApps, error)
	FindAll() ([]ClusterInstalledApps, error)
	Update(model *ClusterInstalledApps) error
	Delete(model *ClusterInstalledApps) error
}

type ClusterInstalledAppsRepositoryImpl

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

func NewClusterInstalledAppsRepositoryImpl

func NewClusterInstalledAppsRepositoryImpl(dbConnection *pg.DB, logger *zap.SugaredLogger) *ClusterInstalledAppsRepositoryImpl

func (ClusterInstalledAppsRepositoryImpl) Delete

func (ClusterInstalledAppsRepositoryImpl) FindAll

func (ClusterInstalledAppsRepositoryImpl) FindByClusterId

func (impl ClusterInstalledAppsRepositoryImpl) FindByClusterId(clusterId int) ([]*ClusterInstalledApps, error)

func (ClusterInstalledAppsRepositoryImpl) FindByClusterIds

func (impl ClusterInstalledAppsRepositoryImpl) FindByClusterIds(clusterIds []int) ([]*ClusterInstalledApps, error)

func (ClusterInstalledAppsRepositoryImpl) Save

func (ClusterInstalledAppsRepositoryImpl) Update

type GitOpsAppDetails

type GitOpsAppDetails struct {
	GitOpsAppName  string `sql:"git_ops_app_name"`
	InstalledAppId int    `sql:"installed_app_id"`
}

GitOpsAppDetails is used to operate on native query; This should be avoided. Usage func: InstalledAppRepository.GetAllGitOpsAppNameAndInstalledAppMapping

type InstallAppDeleteRequest

type InstallAppDeleteRequest struct {
	InstalledAppId  int    `json:"installed_app_id,omitempty,notnull"`
	AppName         string `json:"app_name,omitempty"`
	AppId           int    `json:"app_id,omitempty"`
	EnvironmentId   int    `json:"environment_id,omitempty"`
	AppOfferingMode string `json:"app_offering_mode"`
	ClusterId       int    `json:"cluster_id"`
	Namespace       string `json:"namespace"`
}

InstallAppDeleteRequest is used to operate on native query; This should be avoided. Usage func: InstalledAppRepository.GetInstalledAppByGitHash

type InstalledAppAndEnvDetails

type InstalledAppAndEnvDetails struct {
	EnvironmentName              string    `json:"environment_name"`
	EnvironmentId                int       `json:"environment_id"`
	AppName                      string    `json:"app_name"`
	DisplayName                  string    `json:"display_name"`
	AppOfferingMode              string    `json:"appOfferingMode"`
	UpdatedOn                    time.Time `json:"updated_on"`
	EmailId                      string    `json:"email_id"`
	InstalledAppVersionId        int       `json:"installed_app_version_id"`
	AppId                        int       `json:"app_id"`
	InstalledAppId               int       `json:"installed_app_id"`
	AppStoreApplicationVersionId int       `json:"app_store_application_version_id"`
	AppStatus                    string    `json:"app_status"`
	DeploymentAppType            string    `json:"-"`
}

InstalledAppAndEnvDetails is used to operate on native query; This should be avoided. Usage functions: InstalledAppRepository.GetAllInstalledAppsByChartRepoId and InstalledAppRepository.GetAllInstalledAppsByAppStoreId

type InstalledAppRepository

type InstalledAppRepository interface {
	CreateInstalledApp(model *InstalledApps, tx *pg.Tx) (*InstalledApps, error)
	CreateInstalledAppVersion(model *InstalledAppVersions, tx *pg.Tx) (*InstalledAppVersions, error)
	UpdateInstalledApp(model *InstalledApps, tx *pg.Tx) (*InstalledApps, error)
	UpdateInstalledAppVersion(model *InstalledAppVersions, tx *pg.Tx) (*InstalledAppVersions, error)
	DeleteInstalledAppVersions(tx *pg.Tx, installedAppId int, userId int32) (rowsUpdated int, err error)
	GetInstalledApp(id int) (*InstalledApps, error)
	GetInstalledAppsByAppId(appId int) (InstalledApps, error)
	GetInstalledAppVersion(id int) (*InstalledAppVersions, error)
	// GetInstalledAppVersionIncludingDeleted -
	// For the given installed app version id, it will return the installed app version (both active and inactive)
	//	- returns InstalledAppVersions by id for both active and inactive versions
	GetInstalledAppVersionIncludingDeleted(id int) (*InstalledAppVersions, error)
	GetAllInstalledApps(filter *appStoreBean.AppStoreFilter) ([]InstalledAppsWithChartDetails, error)
	GetAllInstalledAppsByAppStoreId(appStoreId int) ([]InstalledAppAndEnvDetails, error)
	GetAllInstalledAppsByChartRepoId(chartRepoId int) ([]InstalledAppAndEnvDetails, error)
	GetInstalledAppVersionByInstalledAppIdAndEnvId(installedAppId int, envId int) (*InstalledAppVersions, error)
	FetchNotes(installedAppId int) (*InstalledApps, error)
	GetInstalledAppVersionByAppStoreId(appStoreId int) ([]*InstalledAppVersions, error)
	DeleteInstalledApp(model *InstalledApps) (*InstalledApps, error)
	DeleteInstalledAppVersion(model *InstalledAppVersions) (*InstalledAppVersions, error)
	GetInstalledAppVersionByInstalledAppId(id int) ([]*InstalledAppVersions, error)
	GetConnection() (dbConnection *pg.DB)
	GetInstalledAppVersionByInstalledAppIdMeta(installedAppId int) ([]*InstalledAppVersions, error)
	GetActiveInstalledAppVersionByInstalledAppId(installedAppId int) (*InstalledAppVersions, error)
	GetClusterComponentByClusterId(clusterId int) ([]*InstalledApps, error)     //unused
	GetClusterComponentByClusterIds(clusterIds []int) ([]*InstalledApps, error) //unused
	GetInstalledAppVersionByAppIdAndEnvId(appId int, envId int) (*InstalledAppVersions, error)
	GetInstalledAppVersionByClusterIds(clusterIds []int) ([]*InstalledAppVersions, error) //unused
	GetInstalledAppVersionByClusterIdsV2(clusterIds []int) ([]*InstalledAppVersions, error)
	GetInstalledApplicationByClusterIdAndNamespaceAndAppName(clusterId int, namespace string, appName string) (*InstalledApps, error)
	GetInstalledApplicationByClusterIdAndNamespaceAndAppIdentifier(clusterId int, namespace string, appIdentifier string, appName string) (*InstalledApps, error)
	GetAppAndEnvDetailsForDeploymentAppTypeInstalledApps(deploymentAppType string, clusterIds []int) ([]*InstalledApps, error)
	GetDeploymentSuccessfulStatusCountForTelemetry() (int, error)
	GetGitOpsInstalledAppsWhereArgoAppDeletedIsTrue(installedAppId int, envId int) (InstalledApps, error)
	GetInstalledAppByGitHash(gitHash string) (*InstallAppDeleteRequest, error)
	GetInstalledAppByAppName(appName string) (*InstalledApps, error)
	GetInstalledAppByAppIdAndDeploymentType(appId int, deploymentAppType string) (*InstalledApps, error)
	GetInstalledAppByInstalledAppVersionId(installedAppVersionId int) (*InstalledApps, error)
	// GetInstalledAppByGitOpsAppName will return all the active installed_apps with matching `app_name-environment_name`
	GetInstalledAppByGitOpsAppName(acdAppName string) (*InstalledApps, error)
	GetInstalledAppByGitRepoUrl(repoName, repoUrl string) (*InstalledApps, error)

	GetArgoPipelinesHavingLatestTriggerStuckInNonTerminalStatusesForAppStore(getPipelineDeployedBeforeMinutes int, getPipelineDeployedWithinHours int) ([]*InstalledAppVersions, error)
	GetArgoPipelinesHavingTriggersStuckInLastPossibleNonTerminalTimelinesForAppStore(pendingSinceSeconds int, timeForDegradation int) ([]*InstalledAppVersions, error)
	GetHelmReleaseStatusConfigByInstalledAppId(installedAppVersionHistoryId int) (string, string, error)

	GetActiveInstalledAppByEnvIdAndDeploymentType(envId int, deploymentType string, excludeAppIds []string, includeAppIds []string) ([]*InstalledApps, error)
	UpdateDeploymentAppTypeInInstalledApp(deploymentAppType string, installedAppIdIncludes []int, userId int32, deployStatus int) error
	FindInstalledAppByIds(ids []int) ([]*InstalledApps, error)
	// FindInstalledAppsByAppId returns multiple installed apps for an appId, this only happens for external-apps with same name installed in diff namespaces
	FindInstalledAppsByAppId(appId int) ([]*InstalledApps, error)
	// GetInstalledAppsMinByAppId will return the installed app by app id.
	// Extra Environment, App, Team, Cluster details are not fetched
	FindAllByEnvironmentId(envId int) ([]*InstalledApps, error)
	GetInstalledAppsMinByAppId(appId int) (*InstalledApps, error)
	GetAllArgoAppsByDeploymentAppNames(deploymentAppNames []string) ([]string, error)
	GetAllAppsByClusterAndDeploymentAppType(clusterIds []int, deploymentAppType string) ([]bean.DeployedInstalledAppInfo, error)
	// GetActiveInstalledAppCount returns the count of all active installed apps
	GetActiveInstalledAppCount() (int, error)
}

type InstalledAppRepositoryImpl

type InstalledAppRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewInstalledAppRepositoryImpl

func NewInstalledAppRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *InstalledAppRepositoryImpl

func (*InstalledAppRepositoryImpl) CreateInstalledApp

func (impl *InstalledAppRepositoryImpl) CreateInstalledApp(model *InstalledApps, tx *pg.Tx) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) CreateInstalledAppVersion

func (impl *InstalledAppRepositoryImpl) CreateInstalledAppVersion(model *InstalledAppVersions, tx *pg.Tx) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) DeleteInstalledApp

func (impl *InstalledAppRepositoryImpl) DeleteInstalledApp(model *InstalledApps) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) DeleteInstalledAppVersion

func (impl *InstalledAppRepositoryImpl) DeleteInstalledAppVersion(model *InstalledAppVersions) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) DeleteInstalledAppVersions added in v1.0.0

func (impl *InstalledAppRepositoryImpl) DeleteInstalledAppVersions(tx *pg.Tx, installedAppId int, userId int32) (rowsUpdated int, err error)

func (*InstalledAppRepositoryImpl) FetchNotes

func (impl *InstalledAppRepositoryImpl) FetchNotes(installedAppId int) (*InstalledApps, error)

func (InstalledAppRepositoryImpl) FindAllByEnvironmentId added in v1.4.0

func (impl InstalledAppRepositoryImpl) FindAllByEnvironmentId(envId int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) FindInstalledAppByIds

func (impl *InstalledAppRepositoryImpl) FindInstalledAppByIds(ids []int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) FindInstalledAppsByAppId added in v0.7.0

func (impl *InstalledAppRepositoryImpl) FindInstalledAppsByAppId(appId int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetActiveInstalledAppByEnvIdAndDeploymentType

func (impl *InstalledAppRepositoryImpl) GetActiveInstalledAppByEnvIdAndDeploymentType(envId int, deploymentType string,
	excludeAppIds []string, includeAppIds []string) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetActiveInstalledAppCount added in v1.7.0

func (impl *InstalledAppRepositoryImpl) GetActiveInstalledAppCount() (int, error)

func (*InstalledAppRepositoryImpl) GetActiveInstalledAppVersionByInstalledAppId

func (impl *InstalledAppRepositoryImpl) GetActiveInstalledAppVersionByInstalledAppId(installedAppId int) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetAllAppsByClusterAndDeploymentAppType added in v1.4.0

func (impl *InstalledAppRepositoryImpl) GetAllAppsByClusterAndDeploymentAppType(clusterIds []int, deploymentAppType string) ([]bean.DeployedInstalledAppInfo, error)

func (*InstalledAppRepositoryImpl) GetAllArgoAppsByDeploymentAppNames added in v1.4.0

func (impl *InstalledAppRepositoryImpl) GetAllArgoAppsByDeploymentAppNames(deploymentAppNames []string) ([]string, error)

func (*InstalledAppRepositoryImpl) GetAllInstalledApps

func (*InstalledAppRepositoryImpl) GetAllInstalledAppsByAppStoreId

func (impl *InstalledAppRepositoryImpl) GetAllInstalledAppsByAppStoreId(appStoreId int) ([]InstalledAppAndEnvDetails, error)

func (*InstalledAppRepositoryImpl) GetAllInstalledAppsByChartRepoId

func (impl *InstalledAppRepositoryImpl) GetAllInstalledAppsByChartRepoId(chartRepoId int) ([]InstalledAppAndEnvDetails, error)

func (*InstalledAppRepositoryImpl) GetAppAndEnvDetailsForDeploymentAppTypeInstalledApps

func (impl *InstalledAppRepositoryImpl) GetAppAndEnvDetailsForDeploymentAppTypeInstalledApps(deploymentAppType string, clusterIds []int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetArgoPipelinesHavingLatestTriggerStuckInNonTerminalStatusesForAppStore

func (impl *InstalledAppRepositoryImpl) GetArgoPipelinesHavingLatestTriggerStuckInNonTerminalStatusesForAppStore(getPipelineDeployedBeforeMinutes int, getPipelineDeployedWithinHours int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetArgoPipelinesHavingTriggersStuckInLastPossibleNonTerminalTimelinesForAppStore

func (impl *InstalledAppRepositoryImpl) GetArgoPipelinesHavingTriggersStuckInLastPossibleNonTerminalTimelinesForAppStore(pendingSinceSeconds int, timeForDegradation int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetClusterComponentByClusterId

func (impl *InstalledAppRepositoryImpl) GetClusterComponentByClusterId(clusterId int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetClusterComponentByClusterIds

func (impl *InstalledAppRepositoryImpl) GetClusterComponentByClusterIds(clusterIds []int) ([]*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetConnection

func (impl *InstalledAppRepositoryImpl) GetConnection() (dbConnection *pg.DB)

func (*InstalledAppRepositoryImpl) GetDeploymentSuccessfulStatusCountForTelemetry

func (impl *InstalledAppRepositoryImpl) GetDeploymentSuccessfulStatusCountForTelemetry() (int, error)

func (*InstalledAppRepositoryImpl) GetGitOpsInstalledAppsWhereArgoAppDeletedIsTrue

func (impl *InstalledAppRepositoryImpl) GetGitOpsInstalledAppsWhereArgoAppDeletedIsTrue(installedAppId int, envId int) (InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetHelmReleaseStatusConfigByInstalledAppId

func (impl *InstalledAppRepositoryImpl) GetHelmReleaseStatusConfigByInstalledAppId(installedAppVersionHistoryId int) (string, string, error)

func (*InstalledAppRepositoryImpl) GetInstalledApp

func (impl *InstalledAppRepositoryImpl) GetInstalledApp(id int) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByAppIdAndDeploymentType

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByAppIdAndDeploymentType(appId int, deploymentAppType string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByAppName

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByAppName(appName string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByGitHash

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByGitHash(gitHash string) (*InstallAppDeleteRequest, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByGitOpsAppName

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByGitOpsAppName(acdAppName string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByGitRepoUrl

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByGitRepoUrl(repoName, repoUrl string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppByInstalledAppVersionId

func (impl *InstalledAppRepositoryImpl) GetInstalledAppByInstalledAppVersionId(installedAppVersionId int) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersion

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersion(id int) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByAppIdAndEnvId

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByAppIdAndEnvId(appId int, envId int) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByAppStoreId

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByAppStoreId(appStoreId int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByClusterIds

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByClusterIds(clusterIds []int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByClusterIdsV2

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByClusterIdsV2(clusterIds []int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppId

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppId(installedAppId int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppIdAndEnvId

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppIdAndEnvId(installedAppId int, envId int) (*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppIdMeta

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionByInstalledAppIdMeta(installedAppId int) ([]*InstalledAppVersions, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppVersionIncludingDeleted added in v1.1.0

func (impl *InstalledAppRepositoryImpl) GetInstalledAppVersionIncludingDeleted(id int) (*InstalledAppVersions, error)

GetInstalledAppVersionIncludingDeleted - returns enable and disabled both versions

func (*InstalledAppRepositoryImpl) GetInstalledApplicationByClusterIdAndNamespaceAndAppIdentifier added in v0.7.3

func (impl *InstalledAppRepositoryImpl) GetInstalledApplicationByClusterIdAndNamespaceAndAppIdentifier(clusterId int, namespace string, appIdentifier string, appName string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledApplicationByClusterIdAndNamespaceAndAppName

func (impl *InstalledAppRepositoryImpl) GetInstalledApplicationByClusterIdAndNamespaceAndAppName(clusterId int, namespace string, appName string) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppsByAppId added in v0.7.0

func (impl *InstalledAppRepositoryImpl) GetInstalledAppsByAppId(appId int) (InstalledApps, error)

func (*InstalledAppRepositoryImpl) GetInstalledAppsMinByAppId added in v1.1.0

func (impl *InstalledAppRepositoryImpl) GetInstalledAppsMinByAppId(appId int) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) UpdateDeploymentAppTypeInInstalledApp

func (impl *InstalledAppRepositoryImpl) UpdateDeploymentAppTypeInInstalledApp(deploymentAppType string, installedAppIdIncludes []int, userId int32, deployStatus int) error

UpdateDeploymentAppTypeInInstalledApp takes in deploymentAppType and list of installedAppIds and updates the deploymentAppType in the table for given ids.

func (*InstalledAppRepositoryImpl) UpdateInstalledApp

func (impl *InstalledAppRepositoryImpl) UpdateInstalledApp(model *InstalledApps, tx *pg.Tx) (*InstalledApps, error)

func (*InstalledAppRepositoryImpl) UpdateInstalledAppVersion

func (impl *InstalledAppRepositoryImpl) UpdateInstalledAppVersion(model *InstalledAppVersions, tx *pg.Tx) (*InstalledAppVersions, error)

type InstalledAppVersionHistory

type InstalledAppVersionHistory struct {
	TableName               struct{}  `sql:"installed_app_version_history" pg:",discard_unknown_columns"`
	Id                      int       `sql:"id,pk"`
	InstalledAppVersionId   int       `sql:"installed_app_version_id,notnull"`
	ValuesYamlRaw           string    `sql:"values_yaml_raw"`
	Status                  string    `sql:"status"`
	Message                 string    `sql:"message"`
	GitHash                 string    `sql:"git_hash"`
	StartedOn               time.Time `sql:"started_on,type:timestamptz"`
	FinishedOn              time.Time `sql:"finished_on,type:timestamptz"`
	HelmReleaseStatusConfig string    `sql:"helm_release_status_config"`
	sql.AuditLog
}

func (*InstalledAppVersionHistory) MarkDeploymentFailed added in v1.0.0

func (model *InstalledAppVersionHistory) MarkDeploymentFailed(err error)

MarkDeploymentFailed marks the deployment as failed and sets the message in InstalledAppVersionHistory

func (*InstalledAppVersionHistory) SetFinishedOn

func (model *InstalledAppVersionHistory) SetFinishedOn()

func (*InstalledAppVersionHistory) SetStartedOn

func (model *InstalledAppVersionHistory) SetStartedOn()

func (*InstalledAppVersionHistory) SetStatus

func (model *InstalledAppVersionHistory) SetStatus(status string)

SetStatus sets the status of the in InstalledAppVersionHistory To update failed status, use MarkDeploymentFailed instead as it sets the message as well

type InstalledAppVersionHistoryRepository

type InstalledAppVersionHistoryRepository interface {
	CreateInstalledAppVersionHistory(model *InstalledAppVersionHistory, tx *pg.Tx) (*InstalledAppVersionHistory, error)
	UpdateInstalledAppVersionHistory(model *InstalledAppVersionHistory, tx *pg.Tx) (*InstalledAppVersionHistory, error)
	GetInstalledAppVersionHistory(id int) (*InstalledAppVersionHistory, error)
	GetInstalledAppVersionHistoryByVersionId(installAppVersionId int) ([]*InstalledAppVersionHistory, error)
	GetLatestInstalledAppVersionHistory(installAppVersionId int) (*InstalledAppVersionHistory, error)
	GetLatestInstalledAppVersionHistoryByGitHash(gitHash string) (*InstalledAppVersionHistory, error)
	GetAppIdAndEnvIdWithInstalledAppVersionId(id int) (int, int, error)
	GetLatestInstalledAppVersionHistoryByInstalledAppId(installedAppId int) (*InstalledAppVersionHistory, error)
	FindPreviousInstalledAppVersionHistoryByStatus(installedAppId int, installedAppVersionHistoryId int, status []string) ([]*InstalledAppVersionHistory, error)
	UpdateInstalledAppVersionHistoryWithTxn(models []*InstalledAppVersionHistory, tx *pg.Tx) error
	GetAppStoreApplicationVersionIdByInstalledAppVersionHistoryId(installedAppVersionHistoryId int) (int, error)
	UpdateGitHash(installedAppVersionHistoryId int, gitHash string, tx *pg.Tx) error
	UpdateDeploymentHistoryMessage(installedAppVersionHistoryId int, message string) error
	GetConnection() *pg.DB
}

type InstalledAppVersionHistoryRepositoryImpl

type InstalledAppVersionHistoryRepositoryImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}

func NewInstalledAppVersionHistoryRepositoryImpl

func NewInstalledAppVersionHistoryRepositoryImpl(Logger *zap.SugaredLogger, dbConnection *pg.DB) *InstalledAppVersionHistoryRepositoryImpl

func (*InstalledAppVersionHistoryRepositoryImpl) CreateInstalledAppVersionHistory

func (impl *InstalledAppVersionHistoryRepositoryImpl) CreateInstalledAppVersionHistory(model *InstalledAppVersionHistory, tx *pg.Tx) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) FindPreviousInstalledAppVersionHistoryByStatus

func (impl *InstalledAppVersionHistoryRepositoryImpl) FindPreviousInstalledAppVersionHistoryByStatus(installedAppId int, installedAppVersionHistoryId int, status []string) ([]*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetAppIdAndEnvIdWithInstalledAppVersionId

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetAppIdAndEnvIdWithInstalledAppVersionId(id int) (int, int, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetAppStoreApplicationVersionIdByInstalledAppVersionHistoryId

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetAppStoreApplicationVersionIdByInstalledAppVersionHistoryId(installedAppVersionHistoryId int) (int, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetConnection

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetConnection() *pg.DB

func (*InstalledAppVersionHistoryRepositoryImpl) GetInstalledAppVersionHistory

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetInstalledAppVersionHistory(id int) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetInstalledAppVersionHistoryByVersionId

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetInstalledAppVersionHistoryByVersionId(installAppVersionId int) ([]*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistory

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistory(installAppVersionId int) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistoryByGitHash

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistoryByGitHash(gitHash string) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistoryByInstalledAppId

func (impl *InstalledAppVersionHistoryRepositoryImpl) GetLatestInstalledAppVersionHistoryByInstalledAppId(installedAppId int) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) UpdateDeploymentHistoryMessage added in v1.0.0

func (impl *InstalledAppVersionHistoryRepositoryImpl) UpdateDeploymentHistoryMessage(installedAppVersionHistoryId int, message string) error

func (*InstalledAppVersionHistoryRepositoryImpl) UpdateGitHash

func (impl *InstalledAppVersionHistoryRepositoryImpl) UpdateGitHash(installedAppVersionHistoryId int, gitHash string, tx *pg.Tx) error

func (*InstalledAppVersionHistoryRepositoryImpl) UpdateInstalledAppVersionHistory

func (impl *InstalledAppVersionHistoryRepositoryImpl) UpdateInstalledAppVersionHistory(model *InstalledAppVersionHistory, tx *pg.Tx) (*InstalledAppVersionHistory, error)

func (*InstalledAppVersionHistoryRepositoryImpl) UpdateInstalledAppVersionHistoryWithTxn

func (impl *InstalledAppVersionHistoryRepositoryImpl) UpdateInstalledAppVersionHistoryWithTxn(models []*InstalledAppVersionHistory, tx *pg.Tx) error

type InstalledAppVersions

type InstalledAppVersions struct {
	TableName                    struct{} `sql:"installed_app_versions" pg:",discard_unknown_columns"`
	Id                           int      `sql:"id,pk"`
	InstalledAppId               int      `sql:"installed_app_id,notnull"`
	AppStoreApplicationVersionId int      `sql:"app_store_application_version_id,notnull"`
	ValuesYaml                   string   `sql:"values_yaml_raw"`
	Active                       bool     `sql:"active, notnull"`
	ReferenceValueId             int      `sql:"reference_value_id"`
	ReferenceValueKind           string   `sql:"reference_value_kind"`
	sql.AuditLog
	InstalledApp               InstalledApps
	AppStoreApplicationVersion appStoreDiscoverRepository.AppStoreApplicationVersion
}

func (*InstalledAppVersions) MarkActive

func (model *InstalledAppVersions) MarkActive()

func (*InstalledAppVersions) MarkInActive

func (model *InstalledAppVersions) MarkInActive()

type InstalledApps

type InstalledApps struct {
	TableName                  struct{}                              `sql:"installed_apps" pg:",discard_unknown_columns"`
	Id                         int                                   `sql:"id,pk"`
	AppId                      int                                   `sql:"app_id,notnull"`
	EnvironmentId              int                                   `sql:"environment_id,notnull"`
	Active                     bool                                  `sql:"active, notnull"`
	GitOpsRepoName             string                                `sql:"git_ops_repo_name"` // Deprecated; currently in use for backward compatibility
	GitOpsRepoUrl              string                                `sql:"git_ops_repo_url"`  // Deprecated;  use deployment_config table instead  GitOpsRepoName has been migrated to GitOpsRepoUrl; Make sure to migrate from GitOpsRepoName for future flows
	IsCustomRepository         bool                                  `sql:"is_custom_repository"`
	DeploymentAppType          string                                `sql:"deployment_app_type"` // Deprecated;  use deployment_config table instead
	Status                     appStoreBean.AppstoreDeploymentStatus `sql:"status"`
	DeploymentAppDeleteRequest bool                                  `sql:"deployment_app_delete_request"`
	Notes                      string                                `json:"notes"`
	App                        app.App
	Environment                repository.Environment
	sql.AuditLog
}

InstalledApps TODO: remove the deprecated column GitOpsRepoName

func (*InstalledApps) ChangeAppNameToDisplayName added in v0.7.0

func (model *InstalledApps) ChangeAppNameToDisplayName()

func (*InstalledApps) GetUniqueAppNameIdentifier added in v0.7.0

func (model *InstalledApps) GetUniqueAppNameIdentifier() string

func (*InstalledApps) MarkActive

func (model *InstalledApps) MarkActive()

func (*InstalledApps) MarkInActive

func (model *InstalledApps) MarkInActive()

func (*InstalledApps) UpdateGitOpsRepository

func (model *InstalledApps) UpdateGitOpsRepository(gitOpsRepoUrl string, isCustomRepository bool)

func (*InstalledApps) UpdateStatus

func (model *InstalledApps) UpdateStatus(status appStoreBean.AppstoreDeploymentStatus)

type InstalledAppsWithChartDetails

type InstalledAppsWithChartDetails struct {
	AppStoreApplicationName      string    `json:"app_store_application_name"`
	ChartRepoName                string    `json:"chart_repo_name"`
	DockerArtifactStoreId        string    `json:"docker_artifact_store_id"`
	AppName                      string    `json:"app_name"`
	DisplayName                  string    `json:"display_name"`
	EnvironmentName              string    `json:"environment_name"`
	InstalledAppVersionId        int       `json:"installed_app_version_id"`
	AppStoreApplicationVersionId int       `json:"app_store_application_version_id"`
	Icon                         string    `json:"icon"`
	Readme                       string    `json:"readme"`
	CreatedOn                    time.Time `json:"created_on"`
	UpdatedOn                    time.Time `json:"updated_on"`
	Id                           int       `json:"id"`
	EnvironmentId                int       `json:"environment_id"`
	Deprecated                   bool      `json:"deprecated"`
	ClusterName                  string    `json:"clusterName"`
	Namespace                    string    `json:"namespace"`
	TeamId                       int       `json:"teamId"`
	ClusterId                    int       `json:"clusterId"`
	AppOfferingMode              string    `json:"app_offering_mode"`
	AppStatus                    string    `json:"app_status"`
	DeploymentAppDeleteRequest   bool      `json:"deploymentAppDeleteRequest"`
	IsVirtualEnvironment         bool      `json:"is_virtual_environment"`
}

InstalledAppsWithChartDetails is used to operate on native query; This should be avoided. Usage func: InstalledAppRepository.GetAllInstalledApps

Jump to

Keyboard shortcuts

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