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

chartGroup

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: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StatusFailed       TriggerStatus = "failed"
	StatusSuccess      TriggerStatus = "success"
	ReasonNotAuthorize Reason        = "not authorized"
	ReasonTriggered    Reason        = "triggered"
)
View Source
const AppNameAlreadyExistsError = "A chart with this name already exist"
View Source
const FAILED_TO_TRIGGER = "%d/%d failed to trigger"

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartGroupBean

type ChartGroupBean struct {
	Name               string                 `json:"name,omitempty" validate:"name-component,max=200,min=5"`
	Description        string                 `json:"description,omitempty"`
	Id                 int                    `json:"id,omitempty"`
	ChartGroupEntries  []*ChartGroupEntryBean `json:"chartGroupEntries,omitempty"`
	InstalledChartData []*InstalledChartData  `json:"installedChartData,omitempty"`
	UserId             int32                  `json:"-"`
}

type ChartGroupEntryBean

type ChartGroupEntryBean struct {
	Id                           int            `json:"id,omitempty"`
	AppStoreValuesVersionId      int            `json:"appStoreValuesVersionId,omitempty"` //AppStoreVersionValuesId
	AppStoreValuesVersionName    string         `json:"appStoreValuesVersionName,omitempty"`
	AppStoreValuesChartVersion   string         `json:"appStoreValuesChartVersion,omitempty"`   //chart version corresponding to values
	AppStoreApplicationVersionId int            `json:"appStoreApplicationVersionId,omitempty"` //AppStoreApplicationVersionId
	ChartMetaData                *ChartMetaData `json:"chartMetaData,omitempty"`
	ReferenceType                string         `json:"referenceType, omitempty"`
}

type ChartGroupInstallAppRes

type ChartGroupInstallAppRes struct {
	ChartGroupInstallMetadata []ChartGroupInstallMetadata `json:"chartGroupInstallMetadata"`
	Summary                   string                      `json:"summary"`
}

type ChartGroupInstallChartRequest

type ChartGroupInstallChartRequest struct {
	AppName            string `json:"appName,omitempty"  validate:"name-component,max=100" `
	EnvironmentId      int    `json:"environmentId,omitempty" validate:"required,number" `
	AppStoreVersion    int    `json:"appStoreVersion,omitempty,notnull" validate:"required,number" `
	ValuesOverrideYaml string `json:"valuesOverrideYaml,omitempty"` //optional
	ReferenceValueId   int    `json:"referenceValueId, omitempty" validate:"required,number"`
	ReferenceValueKind string `json:"referenceValueKind, omitempty" validate:"oneof=DEFAULT TEMPLATE DEPLOYED"`
	ChartGroupEntryId  int    `json:"chartGroupEntryId"` //optional
}

type ChartGroupInstallMetadata added in v0.7.1

type ChartGroupInstallMetadata struct {
	AppName       string `json:"appName"`
	EnvironmentId int    `json:"environmentId"`
	TriggerStatus string `json:"triggerStatus"`
	Reason        string `json:"reason"`
}

type ChartGroupInstallRequest

type ChartGroupInstallRequest struct {
	ProjectId                     int                              `json:"projectId"  validate:"required,number"`
	ChartGroupInstallChartRequest []*ChartGroupInstallChartRequest `json:"charts" validate:"dive,required"`
	ChartGroupId                  int                              `json:"chartGroupId"` //optional
	UserId                        int32                            `json:"-"`
}

/ bean for v2

type ChartGroupList

type ChartGroupList struct {
	Groups []*ChartGroupBean `json:"groups,omitempty"`
}

type ChartGroupService

type ChartGroupService interface {
	CreateChartGroup(req *ChartGroupBean) (*ChartGroupBean, error)
	UpdateChartGroup(req *ChartGroupBean) (*ChartGroupBean, error)
	SaveChartGroupEntries(req *ChartGroupBean) (*ChartGroupBean, error)
	GetChartGroupWithChartMetaData(chartGroupId int) (*ChartGroupBean, error)
	GetChartGroupList(max int) (*ChartGroupList, error)
	GetChartGroupWithInstallationDetail(chartGroupId int) (*ChartGroupBean, error)
	ChartGroupListMin(max int) ([]*ChartGroupBean, error)
	DeleteChartGroup(req *ChartGroupBean) error

	DeployBulk(chartGroupInstallRequest *ChartGroupInstallRequest) (*ChartGroupInstallAppRes, error)
	DeployDefaultChartOnCluster(bean *bean3.ClusterBean, userId int32) (bool, error)
	TriggerDeploymentEventAndHandleStatusUpdate(installAppVersions []*appStoreBean.InstallAppVersionDTO)

	PerformDeployStage(installedAppVersionId int, installedAppVersionHistoryId int, userId int32) (*appStoreBean.InstallAppVersionDTO, error)
}

type ChartGroupServiceImpl

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

func NewChartGroupServiceImpl

func NewChartGroupServiceImpl(logger *zap.SugaredLogger,
	chartGroupEntriesRepository repository2.ChartGroupEntriesRepository,
	chartGroupRepository repository2.ChartGroupReposotory,
	chartGroupDeploymentRepository repository2.ChartGroupDeploymentRepository,
	installedAppRepository repository.InstalledAppRepository,
	appStoreVersionValuesRepository appStoreValuesRepository.AppStoreVersionValuesRepository,
	appStoreRepository appStoreDiscoverRepository.AppStoreRepository,
	userAuthService user.UserAuthService,
	appStoreApplicationVersionRepository appStoreDiscoverRepository.AppStoreApplicationVersionRepository,
	environmentService cluster2.EnvironmentService,
	teamRepository repository3.TeamRepository,
	clusterInstalledAppsRepository repository.ClusterInstalledAppsRepository,
	appStoreValuesService service.AppStoreValuesService,
	appStoreDeploymentService service2.AppStoreDeploymentService,
	appStoreDeploymentDBService service2.AppStoreDeploymentDBService,
	pipelineStatusTimelineService status.PipelineStatusTimelineService,
	acdConfig *argocdServer.ACDConfig,
	fullModeDeploymentService deployment.FullModeDeploymentService,
	gitOperationService git.GitOperationService,
	installAppService FullMode.InstalledAppDBExtendedService,
	appStoreAppsEventPublishService out.AppStoreAppsEventPublishService,
	teamReadService read.TeamReadService) (*ChartGroupServiceImpl, error)

func (*ChartGroupServiceImpl) ChartGroupListMin

func (impl *ChartGroupServiceImpl) ChartGroupListMin(max int) ([]*ChartGroupBean, error)

func (*ChartGroupServiceImpl) CreateChartGroup

func (impl *ChartGroupServiceImpl) CreateChartGroup(req *ChartGroupBean) (*ChartGroupBean, error)

func (*ChartGroupServiceImpl) DeleteChartGroup

func (impl *ChartGroupServiceImpl) DeleteChartGroup(req *ChartGroupBean) error

func (*ChartGroupServiceImpl) DeployBulk added in v0.6.29

func (impl *ChartGroupServiceImpl) DeployBulk(chartGroupInstallRequest *ChartGroupInstallRequest) (*ChartGroupInstallAppRes, error)

func (*ChartGroupServiceImpl) DeployDefaultChartOnCluster added in v0.6.29

func (impl *ChartGroupServiceImpl) DeployDefaultChartOnCluster(bean *bean3.ClusterBean, userId int32) (bool, error)

func (*ChartGroupServiceImpl) GetChartGroupList added in v1.4.0

func (impl *ChartGroupServiceImpl) GetChartGroupList(max int) (*ChartGroupList, error)

func (*ChartGroupServiceImpl) GetChartGroupWithChartMetaData

func (impl *ChartGroupServiceImpl) GetChartGroupWithChartMetaData(chartGroupId int) (*ChartGroupBean, error)

func (*ChartGroupServiceImpl) GetChartGroupWithInstallationDetail

func (impl *ChartGroupServiceImpl) GetChartGroupWithInstallationDetail(chartGroupId int) (*ChartGroupBean, error)

func (*ChartGroupServiceImpl) PerformDeployStage added in v0.7.0

func (impl *ChartGroupServiceImpl) PerformDeployStage(installedAppVersionId int, installedAppVersionHistoryId int, userId int32) (*appStoreBean.InstallAppVersionDTO, error)

func (*ChartGroupServiceImpl) SaveChartGroupEntries

func (impl *ChartGroupServiceImpl) SaveChartGroupEntries(req *ChartGroupBean) (*ChartGroupBean, error)

func (*ChartGroupServiceImpl) TriggerDeploymentEventAndHandleStatusUpdate added in v0.7.0

func (impl *ChartGroupServiceImpl) TriggerDeploymentEventAndHandleStatusUpdate(installAppVersions []*appStoreBean.InstallAppVersionDTO)

func (*ChartGroupServiceImpl) UpdateChartGroup

func (impl *ChartGroupServiceImpl) UpdateChartGroup(req *ChartGroupBean) (*ChartGroupBean, error)

type ChartMetaData

type ChartMetaData struct {
	ChartName                  string `json:"chartName,omitempty"`
	ChartRepoName              string `json:"chartRepoName,omitempty"`
	Icon                       string `json:"icon,omitempty"`
	AppStoreId                 int    `json:"appStoreId"`
	AppStoreApplicationVersion string `json:"appStoreApplicationVersion"`
	EnvironmentName            string `json:"environmentName,omitempty"`
	EnvironmentId              int    `json:"environmentId,omitempty"` //FIXME REMOVE THIS ATTRIBUTE AFTER REMOVING ENVORONMENTID FROM GETINSTALLEDAPPCALL
	IsChartRepoActive          bool   `json:"isChartRepoActive"`
}

type InstalledChart

type InstalledChart struct {
	ChartMetaData
	InstalledAppId int `json:"installedAppId,omitempty"`
}

type InstalledChartData

type InstalledChartData struct {
	InstallationTime time.Time         `json:"installationTime,omitempty"`
	InstalledCharts  []*InstalledChart `json:"installedCharts,omitempty"`
}

type Reason added in v0.7.1

type Reason string

type TriggerStatus added in v0.7.1

type TriggerStatus string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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