Documentation ¶
Index ¶
- type AppConfigResponse
- type AppMetricEnableDisableRequest
- type AppMetricsEnabled
- type ChartDataInfo
- type ChartDto
- type ChartService
- type ChartServiceImpl
- func (impl ChartServiceImpl) AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
- func (impl ChartServiceImpl) ChartRefAutocomplete() ([]chartRef, error)
- func (impl ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error)
- func (impl ChartServiceImpl) CheckChartExists(chartRefId int) error
- func (impl ChartServiceImpl) CheckCustomChartByAppId(id int) (bool, error)
- func (impl ChartServiceImpl) CheckCustomChartByChartId(id int) (bool, error)
- func (impl ChartServiceImpl) Create(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
- func (impl ChartServiceImpl) CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
- func (impl ChartServiceImpl) DeploymentTemplateValidate(templatejson interface{}, chartRefId int) (bool, error)
- func (impl ChartServiceImpl) ExtractChartIfMissing(chartData []byte, refChartDir string, location string) (*ChartDataInfo, error)
- func (impl ChartServiceImpl) FetchChartInfoByFlag(userUploaded bool) ([]*ChartDto, error)
- func (impl ChartServiceImpl) FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error)
- func (impl ChartServiceImpl) FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error)
- func (impl ChartServiceImpl) GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]interface{}, error)
- func (impl ChartServiceImpl) GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error)
- func (impl *ChartServiceImpl) GetLocationFromChartNameAndVersion(chartName string, chartVersion string) string
- func (impl ChartServiceImpl) GetSchemaAndReadmeForTemplateByChartRefId(chartRefId int) ([]byte, []byte, error)
- func (impl ChartServiceImpl) IsReadyToTrigger(appId int, envId int, pipelineId int) (IsReady, error)
- func (impl ChartServiceImpl) JsonSchemaExtractFromFile(chartRefId int) (map[string]interface{}, error)
- func (impl ChartServiceImpl) ReadChartMetaDataForLocation(chartDir string, fileName string) (*ChartYamlStruct, error)
- func (impl ChartServiceImpl) RegisterInArgo(chartGitAttribute *util.ChartGitAttribute, ctx context.Context) error
- func (impl ChartServiceImpl) UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error)
- func (impl ChartServiceImpl) UpgradeForApp(appId int, chartRefId int, newAppOverride map[string]interface{}, userId int32, ...) (bool, error)
- func (impl *ChartServiceImpl) ValidateUploadedFileFormat(fileName string) error
- type ChartUpgradeRequest
- type ChartYamlStruct
- type DefaultChart
- type IsReady
- type PipelineConfigRequest
- type PipelineConfigRequestResponse
- type TemplateRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppConfigResponse ¶
type AppConfigResponse struct { //DefaultAppConfig json.RawMessage `json:"defaultAppConfig"` //AppConfig TemplateRequest `json:"appConfig"` LatestAppConfig TemplateRequest `json:"latestAppConfig"` PreviousAppConfig TemplateRequest `json:"previousAppConfig"` }
type AppMetricsEnabled ¶
type AppMetricsEnabled struct {
AppMetrics bool `json:"app-metrics"`
}
type ChartDataInfo ¶
type ChartService ¶
type ChartService interface { Create(templateRequest TemplateRequest, ctx context.Context) (chart *TemplateRequest, err error) CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (chart *TemplateRequest, err error) FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error) GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error) GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]interface{}, error) UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error) IsReadyToTrigger(appId int, envId int, pipelineId int) (IsReady, error) ChartRefAutocomplete() ([]chartRef, error) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error) FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error) UpgradeForApp(appId int, chartRefId int, newAppOverride map[string]interface{}, userId int32, ctx context.Context) (bool, error) AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error) DeploymentTemplateValidate(templatejson interface{}, chartRefId int) (bool, error) JsonSchemaExtractFromFile(chartRefId int) (map[string]interface{}, error) GetSchemaAndReadmeForTemplateByChartRefId(chartRefId int) (schema []byte, readme []byte, err error) ExtractChartIfMissing(chartData []byte, refChartDir string, location string) (*ChartDataInfo, error) CheckChartExists(chartRefId int) error GetLocationFromChartNameAndVersion(chartName string, chartVersion string) string ValidateUploadedFileFormat(fileName string) error ReadChartMetaDataForLocation(chartDir string, fileName string) (*ChartYamlStruct, error) RegisterInArgo(chartGitAttribute *util.ChartGitAttribute, ctx context.Context) error FetchChartInfoByFlag(userUploaded bool) ([]*ChartDto, error) CheckCustomChartByAppId(id int) (bool, error) CheckCustomChartByChartId(id int) (bool, error) }
type ChartServiceImpl ¶
type ChartServiceImpl struct {
// contains filtered or unexported fields
}
func NewChartServiceImpl ¶
func NewChartServiceImpl(chartRepository chartRepoRepository.ChartRepository, logger *zap.SugaredLogger, chartTemplateService util.ChartTemplateService, repoRepository chartRepoRepository.ChartRepoRepository, pipelineGroupRepository app.AppRepository, refChartDir chartRepoRepository.RefChartDir, defaultChart DefaultChart, mergeUtil util.MergeUtil, repositoryService repository.ServiceClient, chartRefRepository chartRepoRepository.ChartRefRepository, envOverrideRepository chartConfig.EnvConfigOverrideRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, environmentRepository repository4.EnvironmentRepository, pipelineRepository pipelineConfig.PipelineRepository, appLevelMetricsRepository repository3.AppLevelMetricsRepository, envLevelAppMetricsRepository repository3.EnvLevelAppMetricsRepository, client *http.Client, deploymentTemplateHistoryService history.DeploymentTemplateHistoryService) *ChartServiceImpl
func (ChartServiceImpl) AppMetricsEnableDisable ¶
func (impl ChartServiceImpl) AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
func (ChartServiceImpl) ChartRefAutocomplete ¶
func (impl ChartServiceImpl) ChartRefAutocomplete() ([]chartRef, error)
func (ChartServiceImpl) ChartRefAutocompleteForAppOrEnv ¶
func (impl ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error)
func (ChartServiceImpl) CheckChartExists ¶
func (impl ChartServiceImpl) CheckChartExists(chartRefId int) error
func (ChartServiceImpl) CheckCustomChartByAppId ¶
func (impl ChartServiceImpl) CheckCustomChartByAppId(id int) (bool, error)
func (ChartServiceImpl) CheckCustomChartByChartId ¶
func (impl ChartServiceImpl) CheckCustomChartByChartId(id int) (bool, error)
func (ChartServiceImpl) Create ¶
func (impl ChartServiceImpl) Create(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
func (ChartServiceImpl) CreateChartFromEnvOverride ¶
func (impl ChartServiceImpl) CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
func (ChartServiceImpl) DeploymentTemplateValidate ¶
func (impl ChartServiceImpl) DeploymentTemplateValidate(templatejson interface{}, chartRefId int) (bool, error)
func (ChartServiceImpl) ExtractChartIfMissing ¶
func (impl ChartServiceImpl) ExtractChartIfMissing(chartData []byte, refChartDir string, location string) (*ChartDataInfo, error)
func (ChartServiceImpl) FetchChartInfoByFlag ¶
func (impl ChartServiceImpl) FetchChartInfoByFlag(userUploaded bool) ([]*ChartDto, error)
func (ChartServiceImpl) FindLatestChartForAppByAppId ¶
func (impl ChartServiceImpl) FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error)
func (ChartServiceImpl) FindPreviousChartByAppId ¶
func (impl ChartServiceImpl) FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error)
func (ChartServiceImpl) GetAppOverrideForDefaultTemplate ¶
func (impl ChartServiceImpl) GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]interface{}, error)
func (ChartServiceImpl) GetByAppIdAndChartRefId ¶
func (impl ChartServiceImpl) GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error)
func (*ChartServiceImpl) GetLocationFromChartNameAndVersion ¶
func (impl *ChartServiceImpl) GetLocationFromChartNameAndVersion(chartName string, chartVersion string) string
func (ChartServiceImpl) GetSchemaAndReadmeForTemplateByChartRefId ¶
func (impl ChartServiceImpl) GetSchemaAndReadmeForTemplateByChartRefId(chartRefId int) ([]byte, []byte, error)
func (ChartServiceImpl) IsReadyToTrigger ¶
func (ChartServiceImpl) JsonSchemaExtractFromFile ¶
func (impl ChartServiceImpl) JsonSchemaExtractFromFile(chartRefId int) (map[string]interface{}, error)
func (ChartServiceImpl) ReadChartMetaDataForLocation ¶
func (impl ChartServiceImpl) ReadChartMetaDataForLocation(chartDir string, fileName string) (*ChartYamlStruct, error)
func (ChartServiceImpl) RegisterInArgo ¶
func (impl ChartServiceImpl) RegisterInArgo(chartGitAttribute *util.ChartGitAttribute, ctx context.Context) error
func (ChartServiceImpl) UpdateAppOverride ¶
func (impl ChartServiceImpl) UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error)
func (ChartServiceImpl) UpgradeForApp ¶
func (*ChartServiceImpl) ValidateUploadedFileFormat ¶
func (impl *ChartServiceImpl) ValidateUploadedFileFormat(fileName string) error
type ChartUpgradeRequest ¶
type ChartYamlStruct ¶
type DefaultChart ¶
type DefaultChart string
type PipelineConfigRequest ¶
type PipelineConfigRequest struct { Id int `json:"id" validate:"number"` AppId int `json:"appId,omitempty" validate:"number,required"` EnvConfigOverrideId int `json:"envConfigOverrideId,omitempty"` PipelineConfigValues json.RawMessage `json:"pipelineConfigValues,omitempty" validate:"required"` //json format user value PipelineId int `json:"PipelineId,omitempty"` Latest bool `json:"latest"` Previous bool `json:"previous"` EnvId int `json:"envId,omitempty"` ManualReviewed bool `json:"manualReviewed" validate:"required"` UserId int32 `json:"-"` }
type PipelineConfigRequestResponse ¶
type PipelineConfigRequestResponse struct { LatestPipelineConfigRequest PipelineConfigRequest `json:"latestPipelineConfigRequest"` PreviousPipelineConfigRequest PipelineConfigRequest `json:"previousPipelineConfigRequest"` }
type TemplateRequest ¶
type TemplateRequest struct { Id int `json:"id" validate:"number"` AppId int `json:"appId,omitempty" validate:"number,required"` RefChartTemplate string `json:"refChartTemplate,omitempty"` RefChartTemplateVersion string `json:"refChartTemplateVersion,omitempty"` ChartRepositoryId int `json:"chartRepositoryId,omitempty"` ValuesOverride json.RawMessage `json:"valuesOverride,omitempty" validate:"required"` //json format user value DefaultAppOverride json.RawMessage `json:"defaultAppOverride,omitempty"` //override values available ChartRefId int `json:"chartRefId,omitempty" validate:"number"` Latest bool `json:"latest"` IsAppMetricsEnabled bool `json:"isAppMetricsEnabled"` Schema json.RawMessage `json:"schema"` Readme string `json:"readme"` UserId int32 `json:"-"` }
Click to show internal directories.
Click to hide internal directories.