 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- func GetTransformedDataForSecretRootJsonData(data string, mode util.SecretTransformMode) (string, error)
- type ApiError
- type ArtifactsListFilterOptions
- type BulkCdDeployEvent
- type ClusterInfo
- type Config
- type ConfigMapAndSecretJson
- type ConfigMapJson
- type ConfigMapRootJson
- type ConfigSecretJson
- type ConfigSecretMap
- type ConfigSecretMapEnt
- type ConfigSecretRootJson
- type ConfigType
- type CreateVulnerabilityPolicyRequest
- type CreateVulnerabilityPolicyResponse
- type CustomTag
- type CustomTagErrorResponse
- type CvePolicy
- type DeletePolicyParams
- type DeleteVulnerabilityPolicyResponse
- type DeploymentConfigurationType
- type Error
- type FetchPolicyParams
- type GetVulnerabilityPolicyResponse
- type GetVulnerabilityPolicyResult
- type IdVulnerabilityPolicyResult
- type PolicyRequest
- type ReleaseStatusUpdateRequest
- type ResourceLevel
- type Response
- type SeverityPolicy
- type TLSConfig
- type UpdatePolicyParams
- type UpdateVulnerabilityPolicyResponse
- type ValuesOverrideRequest
- type VulnerabilityAction
- type VulnerabilityPermission
- type VulnerabilityPolicy
- type WorkflowType
Constants ¶
const ( CD_WORKFLOW_TYPE_PRE WorkflowType = "PRE" CD_WORKFLOW_TYPE_POST WorkflowType = "POST" CD_WORKFLOW_TYPE_DEPLOY WorkflowType = "DEPLOY" CI_WORKFLOW_TYPE WorkflowType = "CI" WEBHOOK_WORKFLOW_TYPE WorkflowType = "WEBHOOK" DEPLOYMENT_CONFIG_TYPE_LAST_SAVED DeploymentConfigurationType = "LAST_SAVED_CONFIG" //latest trigger is not being used because this is being handled at FE and we anyhow identify latest trigger as //last deployed wfr which is also a specific trigger DEPLOYMENT_CONFIG_TYPE_LATEST_TRIGGER DeploymentConfigurationType = "LATEST_TRIGGER_CONFIG" DEPLOYMENT_CONFIG_TYPE_SPECIFIC_TRIGGER DeploymentConfigurationType = "SPECIFIC_TRIGGER_CONFIG" )
Variables ¶
This section is empty.
Functions ¶
func GetTransformedDataForSecretRootJsonData ¶ added in v1.0.0
func GetTransformedDataForSecretRootJsonData(data string, mode util.SecretTransformMode) (string, error)
Types ¶
type ArtifactsListFilterOptions ¶ added in v0.6.26
type ArtifactsListFilterOptions struct {
	//list filter data
	Limit        int
	Offset       int
	SearchString string
	Order        string
	//self stage data
	PipelineId int
	StageType  WorkflowType
	// CiPipelineId is id of ci-pipeline present in the same app-workflow of PipelineId
	CiPipelineId int
	//parent satge data
	ParentCdId      int
	ParentId        int
	ParentStageType WorkflowType
	//excludeArtifactIds
	ExcludeArtifactIds []int
	//excludeWfRunners
	ExcludeWfrIds []int
	//pluginStage
	PluginStage string
	// UseCdStageQueryV2 is to set query version
	UseCdStageQueryV2 bool
}
    type BulkCdDeployEvent ¶ added in v0.6.16
type BulkCdDeployEvent struct {
	ValuesOverrideRequest *ValuesOverrideRequest `json:"valuesOverrideRequest"`
	UserId                int32                  `json:"userId"`
}
    type ClusterInfo ¶ added in v0.3.14
type ClusterInfo struct {
	ClusterId             int    `json:"clusterId"`
	ClusterName           string `json:"clusterName"`
	BearerToken           string `json:"bearerToken"`
	ServerUrl             string `json:"serverUrl"`
	InsecureSkipTLSVerify bool   `json:"insecureSkipTLSVerify"`
	KeyData               string `json:"keyData"`
	CertData              string `json:"certData"`
	CAData                string `json:"CAData"`
}
    type Config ¶ added in v0.5.3
type Config struct {
	IgnoreAuthCheck bool `env:"IGNORE_AUTOCOMPLETE_AUTH_CHECK" envDefault:"false" description:"flag for ignoring auth check in autocomplete apis."`
}
    type ConfigMapAndSecretJson ¶
type ConfigMapAndSecretJson struct {
	ConfigMapJson    ConfigMapJson    `json:"configMapJson"`
	ConfigSecretJson ConfigSecretJson `json:"configSecretJson"`
}
    type ConfigMapJson ¶
type ConfigMapJson struct {
	Enabled bool              `json:"enabled"`
	Maps    []ConfigSecretMap `json:"maps"`
}
    type ConfigMapRootJson ¶
type ConfigMapRootJson struct {
	ConfigMapJson ConfigMapJson `json:"ConfigMaps"`
}
    type ConfigSecretJson ¶
type ConfigSecretJson struct {
	Enabled bool               `json:"enabled"`
	Secrets []*ConfigSecretMap `json:"secrets"`
}
    func (*ConfigSecretJson) GetDereferencedSecrets ¶ added in v0.6.24
func (configSecretJson *ConfigSecretJson) GetDereferencedSecrets() []ConfigSecretMap
func (*ConfigSecretJson) SetReferencedSecrets ¶ added in v0.6.24
func (configSecretJson *ConfigSecretJson) SetReferencedSecrets(secrets []ConfigSecretMap)
type ConfigSecretMap ¶ added in v0.6.17
type ConfigSecretMap struct {
	Name           string          `json:"name"`
	Type           string          `json:"type"`
	External       bool            `json:"external"`
	MountPath      string          `json:"mountPath"`
	Data           json.RawMessage `json:"data,omitempty"`
	ESOSecretData  json.RawMessage `json:"esoSecretData,omitempty"`
	ExternalType   string          `json:"externalType"`
	RoleARN        string          `json:"roleARN"`
	SecretData     json.RawMessage `json:"secretData,omitempty"`
	SubPath        bool            `json:"subPath"`
	ESOSubPath     []string        `json:"esoSubPath"`
	FilePermission string          `json:"filePermission"`
	ConfigSecretMapEnt
}
    func (*ConfigSecretMap) AddDataToKey ¶ added in v1.5.1
func (configSecret *ConfigSecretMap) AddDataToKey(keyName string, data []byte) (*ConfigSecretMap, error)
func (*ConfigSecretMap) GetBinaryDataMap ¶ added in v1.5.1
func (configSecret *ConfigSecretMap) GetBinaryDataMap() map[string][]byte
func (*ConfigSecretMap) GetDataMap ¶ added in v0.6.17
func (configSecret *ConfigSecretMap) GetDataMap() (map[string]string, error)
type ConfigSecretMapEnt ¶ added in v1.5.1
type ConfigSecretMapEnt struct {
}
    type ConfigSecretRootJson ¶
type ConfigSecretRootJson struct {
	ConfigSecretJson ConfigSecretJson `json:"ConfigSecrets"`
}
    type ConfigType ¶ added in v1.5.1
type ConfigType string
const ( ConfigMap ConfigType = "cm" Secret ConfigType = "cs" )
func (ConfigType) String ¶ added in v1.5.1
func (c ConfigType) String() string
type CreateVulnerabilityPolicyRequest ¶
type CreateVulnerabilityPolicyRequest struct {
	// actions which can be taken on vulnerabilities
	Action    *VulnerabilityAction `json:"action,omitempty"`
	AppId     int                  `json:"appId,omitempty"`
	ClusterId int                  `json:"clusterId,omitempty"`
	CveId     string               `json:"cveId,omitempty"`
	EnvId     int                  `json:"envId,omitempty"`
	Severity  string               `json:"severity,omitempty"`
}
    CreateVulnerabilityPolicyRequest defines model for CreateVulnerabilityPolicyRequest.
func (*CreateVulnerabilityPolicyRequest) IsRequestGlobal ¶ added in v1.2.1
func (r *CreateVulnerabilityPolicyRequest) IsRequestGlobal() bool
type CreateVulnerabilityPolicyResponse ¶
type CreateVulnerabilityPolicyResponse struct {
	// Error object
	Error  *Error                       `json:"error,omitempty"`
	Result *IdVulnerabilityPolicyResult `json:"result,omitempty"`
}
    CreateVulnerabilityPolicyResponse defines model for CreateVulnerabilityPolicyResponse.
type CustomTagErrorResponse ¶ added in v0.6.25
type CvePolicy ¶
type CvePolicy struct {
	// Embedded struct due to allOf(#/components/schemas/SeverityPolicy)
	SeverityPolicy
	// In case of CVE policy this is same as cve name else it is blank
	Name string `json:"name,omitempty"`
}
    CvePolicy defines model for CvePolicy.
type DeletePolicyParams ¶
type DeletePolicyParams struct {
	Id int `json:"id"`
}
    DeletePolicyParams defines parameters for DeletePolicy.
type DeleteVulnerabilityPolicyResponse ¶
type DeleteVulnerabilityPolicyResponse struct {
	// Error object
	Error  *Error                       `json:"error,omitempty"`
	Result *IdVulnerabilityPolicyResult `json:"result,omitempty"`
}
    DeleteVulnerabilityPolicyResponse defines model for DeleteVulnerabilityPolicyResponse.
type DeploymentConfigurationType ¶ added in v0.6.2
type DeploymentConfigurationType string
type Error ¶
type Error struct {
	// Error code
	Code int32 `json:"code"`
	// Error message
	Message string `json:"message"`
}
    Error defines model for Error.
type FetchPolicyParams ¶
type FetchPolicyParams struct {
	Level ResourceLevel `json:"level"`
	Id    int           `json:"id,omitempty"`
}
    FetchPolicyParams defines parameters for FetchPolicy.
type GetVulnerabilityPolicyResponse ¶
type GetVulnerabilityPolicyResponse struct {
	// Error object
	Error  *Error                        `json:"error,omitempty"`
	Result *GetVulnerabilityPolicyResult `json:"result,omitempty"`
}
    GetVulnerabilityPolicyResponse defines model for GetVulnerabilityPolicyResponse.
type GetVulnerabilityPolicyResult ¶
type GetVulnerabilityPolicyResult struct {
	// Resource Level can be one of global, cluster, environment, application
	Level    ResourceLevel          `json:"level"`
	Policies []*VulnerabilityPolicy `json:"policies"`
}
    GetVulnerabilityPolicyResult defines model for GetVulnerabilityPolicyResult.
type IdVulnerabilityPolicyResult ¶
type IdVulnerabilityPolicyResult struct {
	Id int `json:"id"`
}
    IdVulnerabilityPolicyResult defines model for IdVulnerabilityPolicyResult.
type PolicyRequest ¶
type ReleaseStatusUpdateRequest ¶
type ReleaseStatusUpdateRequest struct {
	RequestId string             `json:"requestId"`
	NewStatus models.ChartStatus `json:"newStatus"`
}
    type Response ¶
type Response struct {
	Code   int         `json:"code,omitempty"`
	Status string      `json:"status,omitempty"`
	Result interface{} `json:"result,omitempty"`
	Errors []ApiError  `json:"errors,omitempty"`
}
    global response body used across api
type SeverityPolicy ¶
type SeverityPolicy struct {
	Id int `json:"id"`
	// Whether vulnerability is allowed or blocked and is it inherited or is it overridden
	Policy       *VulnerabilityPermission `json:"policy"`
	PolicyOrigin string                   `json:"policyOrigin"`
	Severity     string                   `json:"severity"`
}
    SeverityPolicy defines model for SeverityPolicy.
type UpdatePolicyParams ¶
UpdatePolicyParams defines parameters for UpdatePolicy.
type UpdateVulnerabilityPolicyResponse ¶
type UpdateVulnerabilityPolicyResponse struct {
	// Error object
	Error  *Error                       `json:"error,omitempty"`
	Result *IdVulnerabilityPolicyResult `json:"result,omitempty"`
}
    UpdateVulnerabilityPolicyResponse defines model for UpdateVulnerabilityPolicyResponse.
type ValuesOverrideRequest ¶
type ValuesOverrideRequest struct {
	PipelineId                            int                         `json:"pipelineId" validate:"required"`
	AppId                                 int                         `json:"appId" validate:"required"`
	CiArtifactId                          int                         `json:"ciArtifactId" validate:"required"`
	AdditionalOverride                    json.RawMessage             `json:"additionalOverride,omitempty"`
	ForceTrigger                          bool                        `json:"forceTrigger,notnull"`
	DeploymentTemplate                    string                      `json:"strategy,omitempty"` // validate:"oneof=BLUE-GREEN ROLLING"`
	DeploymentWithConfig                  DeploymentConfigurationType `json:"deploymentWithConfig"`
	WfrIdForDeploymentWithSpecificTrigger int                         `json:"wfrIdForDeploymentWithSpecificTrigger"` // target cd_workflow_runner_id for rollback. Used in rollback deployment cases
	CdWorkflowType                        WorkflowType                `json:"cdWorkflowType,notnull"`
	WfrId                                 int                         `json:"wfrId,notnull"`
	CdWorkflowId                          int                         `json:"cdWorkflowId"`
	PipelineOverrideId                    int                         `json:"pipelineOverrideId"` // required for async install/upgrade event;
	DeploymentType                        models.DeploymentType       `json:"deploymentType"`     // required for async install/upgrade handling; previously if was used internally
	ForceSyncDeployment                   bool                        `json:"forceSyncDeployment,notnull"`
	IsRollbackDeployment                  bool                        `json:"isRollbackDeployment"`
	UserId                                int32                       `json:"-"`
	EnvId                                 int                         `json:"-"`
	EnvName                               string                      `json:"-"`
	ClusterId                             int                         `json:"-"`
	AppName                               string                      `json:"-"`
	PipelineName                          string                      `json:"-"`
	DeploymentAppType                     string                      `json:"-"`
	Namespace                             string                      `json:"-"`
	ReleaseName                           string                      `json:"-"`
	Image                                 string                      `json:"-"`
}
    type VulnerabilityAction ¶
type VulnerabilityAction string
VulnerabilityAction defines model for VulnerabilityAction.
type VulnerabilityPermission ¶
type VulnerabilityPermission struct {
	// actions which can be taken on vulnerabilities
	Action      VulnerabilityAction `json:"action"`
	Inherited   bool                `json:"inherited"`
	IsOverriden bool                `json:"isOverriden"`
}
    VulnerabilityPermission defines model for VulnerabilityPermission.
type VulnerabilityPolicy ¶
type VulnerabilityPolicy struct {
	Cves []*CvePolicy `json:"cves"`
	// environment id in case of application
	EnvId int `json:"envId,omitempty"`
	// Is name of cluster or environment or application/environment
	Name       string            `json:"name,omitempty"`
	Severities []*SeverityPolicy `json:"severities"`
	AppId      int               `json:"-"`
	ClusterId  int               `json:"-"`
}
    VulnerabilityPolicy defines model for VulnerabilityPolicy.
type WorkflowType ¶ added in v0.3.12
type WorkflowType string
func NewWorkflowType ¶ added in v1.1.0
func NewWorkflowType(workflowType string) WorkflowType
func (WorkflowType) IsStageTypeDeploy ¶ added in v0.7.1
func (workflowType WorkflowType) IsStageTypeDeploy() bool
func (WorkflowType) String ¶ added in v1.1.0
func (workflowType WorkflowType) String() string
func (WorkflowType) WorkflowTypeToStageType ¶ added in v0.6.24
func (workflowType WorkflowType) WorkflowTypeToStageType() repository.PipelineStageType