bean

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoDeploymentDoneForSelectedImage      = "there were no deployments done for the selected image"
	ExpectedWfrIdNotPassedInQueryParamErr = "wfrId is expected in the query param which was not passed"
	SecretMaskedValue                     = "*****"
)
View Source
const (
	InvalidConfigTypeErr = "invalid config type provided, please send a valid config type"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CmCsMetadataDto added in v1.0.0

type CmCsMetadataDto struct {
	CmMap            map[string]*bean3.ConfigData
	SecretMap        map[string]*bean3.ConfigData
	ConfigAppLevelId int
	ConfigEnvLevelId int
}

type ConfigArea added in v1.0.0

type ConfigArea string
const (
	AppConfiguration  ConfigArea = "AppConfiguration"
	DeploymentHistory ConfigArea = "DeploymentHistory"
	CdRollback        ConfigArea = "CdRollback"
	ResolveData       ConfigArea = "ResolveData"
)

func (ConfigArea) ToString added in v1.0.0

func (r ConfigArea) ToString() string

type ConfigDataQueryParams

type ConfigDataQueryParams struct {
	AppName      string `schema:"appName"`
	EnvName      string `schema:"envName"`
	ConfigType   string `schema:"configType"`
	IdentifierId int    `schema:"identifierId"`
	PipelineId   int    `schema:"pipelineId"`   // req for fetching previous deployments data
	ResourceName string `schema:"resourceName"` // used in case of cm and cs
	ResourceType string `schema:"resourceType"` // used in case of cm and cs
	ResourceId   int    `schema:"resourceId"`   // used in case of cm and cs
	UserId       int32  `schema:"-"`
	WfrId        int    `schema:"wfrId"`
	ConfigArea   string `schema:"configArea"`
}

func (*ConfigDataQueryParams) IsEnvNameProvided

func (r *ConfigDataQueryParams) IsEnvNameProvided() bool

func (*ConfigDataQueryParams) IsRequestMadeForOneResource

func (r *ConfigDataQueryParams) IsRequestMadeForOneResource() bool

func (*ConfigDataQueryParams) IsResourceTypeConfigMap

func (r *ConfigDataQueryParams) IsResourceTypeConfigMap() bool

func (*ConfigDataQueryParams) IsResourceTypeSecret

func (r *ConfigDataQueryParams) IsResourceTypeSecret() bool

FilterCriteria []string `schema:"filterCriteria"` OffSet int `schema:"offSet"` Limit int `schema:"limit"`

func (*ConfigDataQueryParams) IsValidConfigType

func (r *ConfigDataQueryParams) IsValidConfigType() bool

type ConfigDataResponse

type ConfigDataResponse struct {
	ResourceConfig []*ConfigProperty `json:"resourceConfig"`
}

func NewConfigDataResponse

func NewConfigDataResponse() *ConfigDataResponse

func (*ConfigDataResponse) WithResourceConfig

func (r *ConfigDataResponse) WithResourceConfig(resourceConfig []*ConfigProperty) *ConfigDataResponse

type ConfigProperty

type ConfigProperty struct {
	Id          int               `json:"id"`
	Name        string            `json:"name"`
	ConfigState ConfigState       `json:"configState"`
	Type        bean.ResourceType `json:"type"`
	ConfigStage ConfigStage       `json:"configStage"`
}

func NewConfigProperty

func NewConfigProperty() *ConfigProperty

func (*ConfigProperty) GetIdentifier

func (r *ConfigProperty) GetIdentifier() ConfigPropertyIdentifier

func (*ConfigProperty) GetKey

func (r *ConfigProperty) GetKey() string

func (*ConfigProperty) IsConfigPropertyGlobal

func (r *ConfigProperty) IsConfigPropertyGlobal() bool

type ConfigPropertyIdentifier

type ConfigPropertyIdentifier struct {
	Name string            `json:"name"`
	Type bean.ResourceType `json:"type"`
}

type ConfigStage

type ConfigStage string
const (
	Env        ConfigStage = "Env"
	Inheriting ConfigStage = "Inheriting"
	Overridden ConfigStage = "Overridden"
)

type ConfigState

type ConfigState string
const (
	PublishedConfigState ConfigState = "PublishedOnly"
	PreviousDeployments  ConfigState = "PreviousDeployments"
	DefaultVersion       ConfigState = "DefaultVersion"
)

func (ConfigState) ToString

func (r ConfigState) ToString() string

type DeploymentAndCmCsConfig

type DeploymentAndCmCsConfig struct {
	ResourceType     bean.ResourceType            `json:"resourceType"`
	Data             json.RawMessage              `json:"data"`
	VariableSnapshot map[string]map[string]string `json:"variableSnapshot"` // for deployment->{Deployment Template: resolvedValuesMap}, for cm->{cmComponentName: resolvedValuesMap}
	ResolvedValue    json.RawMessage              `json:"resolvedValue"`
	// for deployment template
	TemplateVersion     string `json:"templateVersion,omitempty"`
	IsAppMetricsEnabled bool   `json:"isAppMetricsEnabled,omitempty"`
	//for pipeline strategy
	PipelineTriggerType pipelineConfig.TriggerType `json:"pipelineTriggerType,omitempty"`
	Strategy            string                     `json:"strategy,omitempty"`
}

func NewDeploymentAndCmCsConfig

func NewDeploymentAndCmCsConfig() *DeploymentAndCmCsConfig

func (*DeploymentAndCmCsConfig) WithConfigData

func (*DeploymentAndCmCsConfig) WithDeploymentConfigMetadata added in v1.0.0

func (r *DeploymentAndCmCsConfig) WithDeploymentConfigMetadata(templateVersion string, isAppMetricsEnabled bool) *DeploymentAndCmCsConfig

func (*DeploymentAndCmCsConfig) WithPipelineStrategyMetadata added in v1.0.0

func (r *DeploymentAndCmCsConfig) WithPipelineStrategyMetadata(pipelineTriggerType pipelineConfig.TriggerType, strategy string) *DeploymentAndCmCsConfig

func (*DeploymentAndCmCsConfig) WithResolvedValue added in v1.0.0

func (r *DeploymentAndCmCsConfig) WithResolvedValue(resolvedValue json.RawMessage) *DeploymentAndCmCsConfig

func (*DeploymentAndCmCsConfig) WithResourceType

func (r *DeploymentAndCmCsConfig) WithResourceType(resourceType bean.ResourceType) *DeploymentAndCmCsConfig

func (*DeploymentAndCmCsConfig) WithVariableSnapshot added in v1.0.0

func (r *DeploymentAndCmCsConfig) WithVariableSnapshot(snapshot map[string]map[string]string) *DeploymentAndCmCsConfig

type DeploymentAndCmCsConfigDto

type DeploymentAndCmCsConfigDto struct {
	DeploymentTemplate *DeploymentAndCmCsConfig `json:"deploymentTemplate"`
	ConfigMapsData     *DeploymentAndCmCsConfig `json:"configMapData"`
	SecretsData        *DeploymentAndCmCsConfig `json:"secretsData"`
	PipelineConfigData *DeploymentAndCmCsConfig `json:"pipelineConfigData,omitempty"`
	IsAppAdmin         bool                     `json:"isAppAdmin"`
}

func NewDeploymentAndCmCsConfigDto

func NewDeploymentAndCmCsConfigDto() *DeploymentAndCmCsConfigDto

func (*DeploymentAndCmCsConfigDto) WithConfigMapData

func (*DeploymentAndCmCsConfigDto) WithDeploymentTemplateData

func (*DeploymentAndCmCsConfigDto) WithPipelineConfigData added in v1.0.0

func (*DeploymentAndCmCsConfigDto) WithSecretData

type DeploymentTemplateMetadata added in v1.0.0

type DeploymentTemplateMetadata struct {
	DeploymentTemplateJson json.RawMessage
	TemplateVersion        string
	IsAppMetricsEnabled    bool
}

type ResolvedCmCsMetadataDto added in v1.0.0

type ResolvedCmCsMetadataDto struct {
	ResolvedConfigMapData string
	ResolvedSecretData    string
	VariableMapCM         map[string]map[string]string
	VariableMapCS         map[string]map[string]string
}

type ValuesDto added in v1.0.0

type ValuesDto struct {
	Values string `json:"values"`
}

Jump to

Keyboard shortcuts

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