cac

package
v0.3.89 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AmiDeploymentTypes = struct {
	ASG      AmiDeploymentType
	SpotInst AmiDeploymentType
}{
	ASG:      "AWS_ASG",
	SpotInst: "SPOTINST",
}
View Source
var AmiDeploymentTypesSlice = []string{
	"AWS_ASG",
	"SPOTINST",
}
View Source
var ApplicationFilterTypes = &struct {
	All      ApplicationFilterType
	Selected ApplicationFilterType
}{
	All:      "ALL",
	Selected: "SELECTED",
}
View Source
var ArtifactTypes = &struct {
	AMI                 ArtifactType
	AWSCodeDeploy       ArtifactType
	AWSLambda           ArtifactType
	Docker              ArtifactType
	Jar                 ArtifactType
	Other               ArtifactType
	PCF                 ArtifactType
	RPM                 ArtifactType
	Tar                 ArtifactType
	War                 ArtifactType
	IISVirtualDirectory ArtifactType
	IISApp              ArtifactType
	IISWebsite          ArtifactType
	Zip                 ArtifactType
}{
	AMI:                 "AMI",
	AWSCodeDeploy:       "AWS_CODEDEPLOY",
	AWSLambda:           "AWS_LAMBDA",
	Docker:              "DOCKER",
	Jar:                 "JAR",
	Other:               "OTHER",
	PCF:                 "PCF",
	RPM:                 "RPM",
	Tar:                 "TAR",
	War:                 "WAR",
	IISVirtualDirectory: "IIS_VirtualDirectory",
	IISApp:              "IIS_APP",
	IISWebsite:          "IIS",
	Zip:                 "ZIP",
}
View Source
var AwsEcsLaunchTypes = struct {
	Fargate AwsEcsLaunchType
}{
	Fargate: "FARGATE",
}
View Source
var AwsEcsLaunchTypesSlice = []string{
	"FARGATE",
}
View Source
var AzureEnvironmentTypes = struct {
	AzureGlobal  AzureEnvironmentType
	USGovernment AzureEnvironmentType
}{
	AzureGlobal:  "AZURE",
	USGovernment: "AZURE_US_GOVERNMENT",
}
View Source
var AzureEnvironmentTypesSlice = []string{
	AzureEnvironmentTypes.AzureGlobal.String(),
	AzureEnvironmentTypes.USGovernment.String(),
}
View Source
var ClassTypes = &struct {
	Account                   ClassType
	Application               ClassType
	ArtifactStream            ClassType
	ConfigFile                ClassType
	Defaults                  ClassType
	Environment               ClassType
	InfrastructureProvisioner ClassType
	NotificationGroup         ClassType
	Pipeline                  ClassType
	Service                   ClassType
	SettingAttribute          ClassType
	Tags                      ClassType
	Template                  ClassType
	Workflow                  ClassType
}{
	Account:                   "Account",
	Application:               "Application",
	ArtifactStream:            "ArtifactStream",
	ConfigFile:                "ConfigFile",
	Defaults:                  "Defaults",
	Environment:               "Environment",
	InfrastructureProvisioner: "InfrastructureProvisioner",
	NotificationGroup:         "NotificationGroup",
	Pipeline:                  "Pipeline",
	Service:                   "Service",
	SettingAttribute:          "SettingAttribute",
	Tags:                      "HarnessTag",
	Template:                  "Template",
	Workflow:                  "Workflow",
}
View Source
var CloudProviderTypes = struct {
	Aws               CloudProviderType
	Azure             CloudProviderType
	Custom            CloudProviderType
	DataCenter        CloudProviderType
	KubernetesCluster CloudProviderType
	Pcf               CloudProviderType
	Spot              CloudProviderType
}{
	Aws:               "AWS",
	Azure:             "AZURE",
	Custom:            "CUSTOM",
	DataCenter:        "PHYSICAL_DATA_CENTER",
	KubernetesCluster: "KUBERNETES_CLUSTER",
	Pcf:               "PCF",
	Spot:              "SPOT_INST",
}
View Source
var CloudProviderTypesSlice = []string{
	"AWS",
	"AZURE",
	"CUSTOM",
	"PHYSICAL_DATA_CENTER",
	"KUBERNETES_CLUSTER",
	"PCF",
	"SPOT_INST",
}
View Source
var DeploymenTypesSlice = []string{
	"AMI",
	"AWS_CODEDEPLOY",
	"AWS_LAMBDA",
	"AZURE_VMSS",
	"AZURE_WEBAPP",
	"CUSTOM",
	"ECS",
	"HELM",
	"KUBERNETES",
	"PCF",
	"SSH",
	"WINRM",
}
View Source
var DeploymentTypes = &struct {
	AMI           DeploymentType
	AWSCodeDeploy DeploymentType
	AWSLambda     DeploymentType
	AzureVMSS     DeploymentType
	AzureWebApp   DeploymentType
	Custom        DeploymentType
	ECS           DeploymentType
	Helm          DeploymentType
	Kubernetes    DeploymentType
	PCF           DeploymentType
	SSH           DeploymentType
	WinRM         DeploymentType
}{
	AMI:           "AMI",
	AWSCodeDeploy: "AWS_CODEDEPLOY",
	AWSLambda:     "AWS_LAMBDA",
	AzureVMSS:     "AZURE_VMSS",
	AzureWebApp:   "AZURE_WEBAPP",
	Custom:        "Custom",
	ECS:           "ECS",
	Helm:          "HELM",
	Kubernetes:    "KUBERNETES",
	PCF:           "PCF",
	SSH:           "SSH",
	WinRM:         "WINRM",
}
View Source
var EnvironmentFilterTypes = &struct {
	Prod     EnvironmentFilterType
	NonProd  EnvironmentFilterType
	Selected EnvironmentFilterType
}{
	Prod:     "PROD",
	NonProd:  "NON_PROD",
	Selected: "SELECTED",
}
View Source
var EnvironmentTypes = struct {
	NonProd EnvironmentType
	Prod    EnvironmentType
}{
	NonProd: "NON_PROD",
	Prod:    "PROD",
}
View Source
var HarnessApiVersions = &struct {
	V1 HarnessApiVersion
}{
	V1: "1.0",
}
View Source
var HelmVersions = &struct {
	V2 HelmVersion
	V3 HelmVersion
}{
	V2: "V2",
	V3: "V3",
}
View Source
var HostConnectionTypes = struct {
	PrivateDns HostConnectionType
	PublicDns  HostConnectionType
	PrivateIp  HostConnectionType
	PublicIp   HostConnectionType
}{
	PrivateDns: "PRIVATE_DNS",
	PublicDns:  "PUBLIC_DNS",
	PrivateIp:  "PRIVATE_IP",
	PublicIp:   "PUBLIC_IP",
}
View Source
var HostConnectionTypesSlice = []string{
	"PRIVATE_DNS",
	"PUBLIC_DNS",
	"PRIVATE_IP",
	"PUBLIC_IP",
}
View Source
var InfrastructureTypes = struct {
	AwsAmi           InfrastructureType
	AwsEcs           InfrastructureType
	AwsLambda        InfrastructureType
	AwsSSH           InfrastructureType
	AzureVmss        InfrastructureType
	AzureWebApp      InfrastructureType
	Custom           InfrastructureType
	DataCenterSSH    InfrastructureType
	DataCenterWinRM  InfrastructureType
	KubernetesDirect InfrastructureType
	KubernetesGcp    InfrastructureType
	Pcf              InfrastructureType
}{
	AwsAmi:           "AWS_AMI",
	AwsEcs:           "AWS_ECS",
	AwsLambda:        "AWS_AWS_LAMBDA",
	AwsSSH:           "AWS_SSH",
	AzureVmss:        "AZURE_VMSS",
	AzureWebApp:      "AZURE_WEBAPP",
	Custom:           "CUSTOM",
	DataCenterSSH:    "PHYSICAL_DATA_CENTER_SSH",
	DataCenterWinRM:  "PHYSICAL_DATA_CENTER_WINRM",
	KubernetesDirect: "DIRECT_KUBERNETES",
	KubernetesGcp:    "KUBERNETES_GCP",
	Pcf:              "PCF_PCF",
}
View Source
var KubernetesAuthTypes = struct {
	ServiceAccount      KubernetesAuthType
	UsernameAndPassword KubernetesAuthType
	Custom              KubernetesAuthType
	OIDC                KubernetesAuthType
}{
	ServiceAccount:      "SERVICE_ACCOUNT",
	UsernameAndPassword: "USER_PASSWORD",
	Custom:              "NONE",
	OIDC:                "OIDC",
}
View Source
var LaunchTypes = struct {
	EC2     LaunchType
	Fargate LaunchType
}{
	EC2:     "EC2",
	Fargate: "FARGATE",
}
View Source
var ObjectTypes = &struct {
	Application                     ObjectType
	AwsCloudProvider                ObjectType
	AzureCloudProvider              ObjectType
	Environment                     ObjectType
	GcpCloudProvider                ObjectType
	InfrastructureDefinition        ObjectType
	KubernetesCloudProvider         ObjectType
	PcfCloudProvider                ObjectType
	PhysicalDataCenterCloudProvider ObjectType
	Service                         ObjectType
	SpotInstCloudProvider           ObjectType
}{
	Application:                     "APPLICATION",
	AwsCloudProvider:                "AWS",
	AzureCloudProvider:              "AZURE",
	Environment:                     "ENVIRONMENT",
	GcpCloudProvider:                "GCP",
	InfrastructureDefinition:        "INFRA_DEFINITION",
	KubernetesCloudProvider:         "KUBERNETES_CLUSTER",
	PcfCloudProvider:                "PCF",
	PhysicalDataCenterCloudProvider: "PHYSICAL_DATA_CENTER",
	Service:                         "SERVICE",
	SpotInstCloudProvider:           "SPOT_INST",
}
View Source
var RestNames = struct {
	Settings RestName
	Services RestName
	Tags     RestName
	Folders  RestName
}{
	Settings: "settings",
	Services: "services",
	Tags:     "tags",
	Folders:  "folders",
}
View Source
var VariableOverrideValueTypes = struct {
	EncryptedText VariableValueType
	Text          VariableValueType
}{
	EncryptedText: "ENCRYPTED_TEXT",
	Text:          "TEXT",
}
View Source
var VmssAuthTypes = struct {
	SSHPublicKey VmssAuthType
}{
	SSHPublicKey: "SSH_PUBLIC_KEY",
}
View Source
var VmssAuthTypesSlice = []string{
	"SSH_PUBLIC_KEY",
}
View Source
var VmssDeploymentTypes = struct {
	NativeVmss VmssDeploymentType
}{
	NativeVmss: "NATIVE_VMSS",
}
View Source
var VmssDeploymentTypesSlice = []string{
	"NATIVE_VMSS",
}
View Source
var WinRMArtifactTypesSlice = []string{
	string(ArtifactTypes.Docker),
	string(ArtifactTypes.IISApp),
	string(ArtifactTypes.IISVirtualDirectory),
	string(ArtifactTypes.IISWebsite),
	string(ArtifactTypes.Other),
}

Functions

func GetEntityNameFromPath

func GetEntityNameFromPath(yamlPath YamlPath) string

func NewEntity

func NewEntity(objectType ObjectType) interface{}

Types

type AmiDeploymentType

type AmiDeploymentType string

func (AmiDeploymentType) String

func (v AmiDeploymentType) String() string

type AppEnvRestriction

type AppEnvRestriction struct {
	AppFilter *AppFilter `yaml:"appFilter,omitempty"`
	EnvFilter *EnvFilter `yaml:"envFilter,omitempty"`
}

type AppFilter

type AppFilter struct {
	FilterType  ApplicationFilterType `yaml:"filterType,omitempty"`
	EntityNames []string              `yaml:"entityNames,omitempty"`
}

type Application

type Application struct {
	HarnessApiVersion HarnessApiVersion `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type              ObjectType        `yaml:"type" json:"type"`
	Id                string            `yaml:"-"`
	Name              string            `yaml:"-"`
	Description       string            `yaml:"description"`
}

func (*Application) IsEmpty

func (a *Application) IsEmpty() bool

type ApplicationFilterType

type ApplicationFilterType string

func (ApplicationFilterType) String

func (v ApplicationFilterType) String() string

type ArtifactType

type ArtifactType string

func GetDefaultArtifactType

func GetDefaultArtifactType(deploymentType DeploymentType, fallbackArtifactType ArtifactType) (ArtifactType, error)

func (ArtifactType) String

func (v ArtifactType) String() string

type AwsCloudProvider

type AwsCloudProvider struct {
	HarnessApiVersion      HarnessApiVersion          `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type                   ObjectType                 `yaml:"type" json:"type"`
	Id                     string                     `yaml:"-"`
	Name                   string                     `yaml:"-"`
	AccessKey              string                     `yaml:"accessKey,omitempty"`
	AccessKeySecretId      *SecretRef                 `yaml:"accessKeySecretId,omitempty"`
	AssumeCrossAccountRole bool                       `yaml:"assumeCrossAccountRole,omitempty"`
	CrossAccountAttributes *AwsCrossAccountAttributes `yaml:"crossAccountAttributes,omitempty"`
	SecretKey              *SecretRef                 `yaml:"secretKey,omitempty"`
	UseIRSA                bool                       `yaml:"useIRSA,omitempty"`
	UseEc2IamCredentials   bool                       `yaml:"useEc2IamCredentials,omitempty"`
	UsageRestrictions      *UsageRestrictions         `yaml:"usageRestrictions,omitempty"`
	DelegateSelector       string                     `yaml:"tag,omitempty"`
}

func (*AwsCloudProvider) IsEmpty

func (a *AwsCloudProvider) IsEmpty() bool

type AwsCrossAccountAttributes

type AwsCrossAccountAttributes struct {
	CrossAccountRoleArn string `yaml:"crossAccountRoleArn,omitempty"`
	ExternalId          string `yaml:"externalId,omitempty"`
}

type AwsEcsLaunchType

type AwsEcsLaunchType string

type AwsInstanceFilter

type AwsInstanceFilter struct {
	Tags   []*AwsTag `yaml:"tags,omitempty"`
	VpcIds []string  `yaml:"vpcIds,omitempty"`
}

type AwsSSHExpressions

type AwsSSHExpressions struct {
	LoadBalancerId       string `yaml:"loadBalancerId,omitempty"`
	AutoscalingGroupName string `yaml:"autoScalingGroupName,omitempty"`
	VpcIds               string `yaml:"vpcIds,omitempty"`
	Region               string `yaml:"region,omitempty"`
	Tags                 string `yaml:"tags,omitempty"`
}

type AwsTag

type AwsTag struct {
	Key   string `yaml:"key,omitempty"`
	Value string `yaml:"value,omitempty"`
}

type AzureCloudProvider

type AzureCloudProvider struct {
	HarnessApiVersion    HarnessApiVersion    `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Id                   string               `yaml:"-"`
	Name                 string               `yaml:"-"`
	Type                 ObjectType           `yaml:"type,omitempty"`
	AzureEnvironmentType AzureEnvironmentType `yaml:"azureEnvironmentType,omitempty"`
	ClientId             string               `yaml:"clientId,omitempty"`
	TenantId             string               `yaml:"tenantId,omitempty"`
	Key                  *SecretRef           `yaml:"key,omitempty"`
	UsageRestrictions    *UsageRestrictions   `yaml:"usageRestrictions,omitempty"`
}

func (*AzureCloudProvider) IsEmpty

func (a *AzureCloudProvider) IsEmpty() bool

type AzureEnvironmentType

type AzureEnvironmentType string

func (AzureEnvironmentType) String

func (v AzureEnvironmentType) String() string

type ClassType

type ClassType string

func (ClassType) String

func (v ClassType) String() string

type CloudProviderType

type CloudProviderType string

func (CloudProviderType) String

func (v CloudProviderType) String() string

type ConfigAsCodeItem

type ConfigAsCodeItem struct {
	AccountId       string              `json:"accountId,omitempty"`
	Type            string              `json:"type,omitempty"`
	Name            string              `json:"name,omitempty"`
	ClassName       string              `json:"className,omitempty"`
	ShortClassName  string              `json:"shortClassName,omitempty"`
	RestName        string              `json:"restName,omitempty"`
	DirectoryPath   *DirectoryPath      `json:"directoryPath,omitempty"`
	DefaultToClosed bool                `json:"defaultToClosed,omitempty"`
	Children        []*ConfigAsCodeItem `json:"children,omitempty"`
	AppId           string              `json:"appId,omitempty"`
	YamlGitConfig   interface{}         `json:"yamlGitConfig,omitempty"`
	UUID            string              `json:"uuid,omitempty"`
	YamlVersionType string              `json:"yamlVersionType,omitempty"`
	YamlFilePath    string              `json:"yamlFilePath,omitempty"`
	Status          string              `json:"status,omitempty"`
	ErrorMessage    string              `json:"errorMessage,omitempty"`
	ErrorMssg       string              `json:"errorMssg,omitempty"`
	Yaml            string              `json:"yaml"`
	EntityId        string              `json:"entityId,omitempty"`
}

func (*ConfigAsCodeItem) IsEmpty

func (i *ConfigAsCodeItem) IsEmpty() bool

func (*ConfigAsCodeItem) ParseYamlContent

func (i *ConfigAsCodeItem) ParseYamlContent(respObj interface{}) error

type ContinuousEfficiencyConfig

type ContinuousEfficiencyConfig struct {
	ContinuousEfficiencyEnabled bool `json:"continuousEfficiencyEnabled,omitempty"`
}

type DeploymentType

type DeploymentType string

func (DeploymentType) String

func (v DeploymentType) String() string

type DirectoryPath

type DirectoryPath struct {
	Path string `json:"path,omitempty"`
}

type Entity

type Entity interface {
	IsEmpty() bool
	Validate() (bool, error)
}

type EnvFilter

type EnvFilter struct {
	FilterTypes []EnvironmentFilterType `yaml:"filterTypes,omitempty"`
	EntityNames []string                `yaml:"entityNames,omitempty"`
}

type Environment

type Environment struct {
	HarnessApiVersion                  HarnessApiVersion       `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type                               ObjectType              `yaml:"type" json:"type"`
	Id                                 string                  `yaml:"-"`
	Name                               string                  `yaml:"-"`
	ConfigMapYamlByServiceTemplateName *map[string]interface{} `yaml:"configMapYamlByServiceTemplateName,omitempty"`
	Description                        string                  `yaml:"description,omitempty"`
	EnvironmentType                    EnvironmentType         `yaml:"environmentType,omitempty"`
	VariableOverrides                  []*VariableOverride     `yaml:"variableOverrides,omitempty"`
	ApplicationId                      string                  `yaml:"-"`
}

func (*Environment) IsEmpty

func (a *Environment) IsEmpty() bool

func (*Environment) Validate

func (e *Environment) Validate() (bool, error)

type EnvironmentFilterType

type EnvironmentFilterType string

func (EnvironmentFilterType) String

func (v EnvironmentFilterType) String() string

type EnvironmentType

type EnvironmentType string

func (EnvironmentType) String

func (v EnvironmentType) String() string

type GcpCloudProvider

type GcpCloudProvider struct {
	HarnessApiVersion            HarnessApiVersion  `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Id                           string             `yaml:"-"`
	Name                         string             `yaml:"-"`
	Type                         ObjectType         `yaml:"type,omitempty"`
	CertValidationRequired       bool               `yaml:"certValidationRequired,omitempty"`
	DelegateSelectors            []string           `yaml:"delegateSelectors,omitempty"`
	SkipValidation               bool               `yaml:"skipValidation,omitempty"`
	ServiceAccountKeyFileContent *SecretRef         `yaml:"serviceAccountKeyFileContent,omitempty"`
	UseDelegate                  bool               `yaml:"useDelegate,omitempty"`
	UseDelegateSelectors         bool               `yaml:"useDelegateSelectors,omitempty"`
	UsageRestrictions            *UsageRestrictions `yaml:"usageRestrictions,omitempty"`
}

func (*GcpCloudProvider) IsEmpty

func (a *GcpCloudProvider) IsEmpty() bool

func (*GcpCloudProvider) Validate

func (cp *GcpCloudProvider) Validate() (bool, error)

type HarnessApiVersion

type HarnessApiVersion string

func (HarnessApiVersion) String

func (v HarnessApiVersion) String() string

type HelmVersion

type HelmVersion string

func (HelmVersion) String

func (v HelmVersion) String() string

type HostConnectionType

type HostConnectionType string

func (HostConnectionType) String

func (v HostConnectionType) String() string

type InfraVariable

type InfraVariable struct {
	Name  string `yaml:"name,omitempty"`
	Value string `yaml:"value,omitempty"`
}

type InfrastructureAwsAmi

type InfrastructureAwsAmi struct {
	AmiDeploymentType         AmiDeploymentType `yaml:"amiDeploymentType,omitempty"`
	ASGIdentifiesWorkload     bool              `yaml:"asgIdentifiesWorkload,omitempty"`
	AutoscalingGroupName      string            `yaml:"autoScalingGroupName,omitempty"`
	ClassicLoadBalancers      []string          `yaml:"classicLoadBalancers,omitempty"`
	CloudProviderName         string            `yaml:"cloudProviderName,omitempty"`
	HostNameConvention        string            `yaml:"hostNameConvention,omitempty"`
	Region                    string            `yaml:"region,omitempty"`
	SpotinstCloudProviderName string            `yaml:"spotinstCloudProviderName,omitempty"`
	SpotinstElastiGroupJson   string            `yaml:"spotinstElastiGroupJson,omitempty"`
	StageClassicLoadBalancers []string          `yaml:"stageClassicLoadBalancers,omitempty"`
	StageTargetGroupArns      []string          `yaml:"stageTargetGroupArns,omitempty"`
	TargetGroupArns           []string          `yaml:"targetGroupArns,omitempty"`
	UseTrafficShift           bool              `yaml:"useTrafficShift,omitempty"`
}

func (*InfrastructureAwsAmi) ToInfrastructureDetail

func (i *InfrastructureAwsAmi) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAwsEcs

type InfrastructureAwsEcs struct {
	AssignPublicIp    bool             `yaml:"assignPublicIp,omitempty"`
	CloudProviderName string           `yaml:"cloudProviderName,omitempty"`
	ClusterName       string           `yaml:"clusterName,omitempty"`
	ExecutionRole     string           `yaml:"executionRole,omitempty"`
	LaunchType        AwsEcsLaunchType `yaml:"launchType,omitempty"`
	Region            string           `yaml:"region,omitempty"`
	SecurityGroupIds  []string         `yaml:"securityGroupIds,omitempty"`
	SubnetIds         []string         `yaml:"subnetIds,omitempty"`
	VpcId             string           `yaml:"vpcId,omitempty"`
}

func (*InfrastructureAwsEcs) ToInfrastructureDetail

func (i *InfrastructureAwsEcs) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAwsLambda

type InfrastructureAwsLambda struct {
	CloudProviderName string            `yaml:"cloudProviderName,omitempty"`
	IamRole           string            `yaml:"iamRole,omitempty"`
	Region            string            `yaml:"region,omitempty"`
	SecurityGroupIds  []string          `yaml:"securityGroupIds,omitempty"`
	SubnetIds         []string          `yaml:"subnetIds,omitempty"`
	VpcId             string            `yaml:"vpcId,omitempty"`
	Expressions       map[string]string `yaml:"expressions,omitempty"`
}

func (*InfrastructureAwsLambda) ToInfrastructureDetail

func (i *InfrastructureAwsLambda) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAwsSSH

type InfrastructureAwsSSH struct {
	AwsInstanceFilter       *AwsInstanceFilter `yaml:"awsInstanceFilter,omitempty"`
	CloudProviderName       string             `yaml:"cloudProviderName,omitempty"`
	AutoscalingGroupName    string             `yaml:"autoScalingGroupName,omitempty"`
	DesiredCapacity         int                `yaml:"desiredCapacity,omitempty"`
	HostConnectionAttrsName string             `yaml:"hostConnectionAttrsName,omitempty"`
	HostConnectionType      HostConnectionType `yaml:"hostConnectionType,omitempty"`
	LoadBalancerName        string             `yaml:"loadBalancerName,omitempty"`
	HostNameConvention      string             `yaml:"hostNameConvention,omitempty"`
	Region                  string             `yaml:"region,omitempty"`
	SetDesiredCapacity      bool               `yaml:"setDesiredCapacity,omitempty"`
	UseAutoScalingGroup     bool               `yaml:"useAutoScalingGroup,omitempty"`
	UsePublicDns            bool               `yaml:"usePublicDns,omitempty"`
	Expressions             AwsSSHExpressions  `yaml:"expressions,omitempty"`
}

func (*InfrastructureAwsSSH) ToInfrastructureDetail

func (i *InfrastructureAwsSSH) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAwsWinRM

type InfrastructureAwsWinRM struct {
	AutoscalingGroupName    string             `yaml:"autoScalingGroupName,omitempty"`
	CloudProviderName       string             `yaml:"cloudProviderName,omitempty"`
	DesiredCapacity         int                `yaml:"desiredCapacity,omitempty"`
	HostConnectionAttrsName string             `yaml:"hostConnectionAttrsName,omitempty"`
	HostConnectionType      HostConnectionType `yaml:"hostConnectionType,omitempty"`
	HostNameConvention      string             `yaml:"hostNameConvention,omitempty"`
	LoadBalancerName        string             `yaml:"loadBalancerName,omitempty"`
	Region                  string             `yaml:"region,omitempty"`
	SetDesiredCapacity      bool               `yaml:"setDesiredCapacity,omitempty"`
	UseAutoScalingGroup     bool               `yaml:"useAutoScalingGroup,omitempty"`
	UsePublicDns            bool               `yaml:"usePublicDns,omitempty"`
}

func (*InfrastructureAwsWinRM) ToInfrastructureDetail

func (i *InfrastructureAwsWinRM) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAzureVmss

type InfrastructureAzureVmss struct {
	BaseVMSSName        string             `yaml:"baseVMSSName,omitempty"`
	CloudProviderName   string             `yaml:"cloudProviderName,omitempty"`
	HostConnectionAttrs string             `yaml:"hostConnectionAttrs,omitempty"`
	ResourceGroupName   string             `yaml:"resourceGroupName,omitempty"`
	SubscriptionId      string             `yaml:"subscriptionId,omitempty"`
	Username            string             `yaml:"username,omitempty"`
	VmssAuthType        VmssAuthType       `yaml:"vmssAuthType,omitempty"`
	VmssDeploymentType  VmssDeploymentType `yaml:"vmssDeploymentType,omitempty"`
}

func (*InfrastructureAzureVmss) ToInfrastructureDetail

func (i *InfrastructureAzureVmss) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureAzureWebApp

type InfrastructureAzureWebApp struct {
	CloudProviderName string `yaml:"cloudProviderName,omitempty"`
	ResourceGroup     string `yaml:"resourceGroup,omitempty"`
	SubscriptionId    string `yaml:"subscriptionId,omitempty"`
}

func (*InfrastructureAzureWebApp) ToInfrastructureDetail

func (i *InfrastructureAzureWebApp) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureCustom

type InfrastructureCustom struct {
	DeploymentTypeTemplateVersion string           `yaml:"deploymentTypeTemplateVersion,omitempty"`
	InfraVariables                []*InfraVariable `yaml:"infraVariables,omitempty"`
}

func (*InfrastructureCustom) ToInfrastructureDetail

func (i *InfrastructureCustom) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureDataCenterSSH

type InfrastructureDataCenterSSH struct {
	CloudProviderName       string   `yaml:"cloudProviderName,omitempty"`
	HostConnectionAttrsName string   `yaml:"hostConnectionAttrsName,omitempty"`
	HostNames               []string `yaml:"hostNames,omitempty"`
}

func (*InfrastructureDataCenterSSH) ToInfrastructureDetail

func (i *InfrastructureDataCenterSSH) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureDataCenterWinRM

type InfrastructureDataCenterWinRM struct {
	CloudProviderName             string   `yaml:"cloudProviderName,omitempty"`
	HostNames                     []string `yaml:"hostNames,omitempty"`
	WinRmConnectionAttributesName string   `yaml:"winRmConnectionAttributesName,omitempty"`
}

func (*InfrastructureDataCenterWinRM) ToInfrastructureDetail

func (i *InfrastructureDataCenterWinRM) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureDefinition

type InfrastructureDefinition struct {
	HarnessApiVersion         HarnessApiVersion       `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type                      ObjectType              `yaml:"type" json:"type"`
	Id                        string                  `yaml:"-"`
	Name                      string                  `yaml:"-"`
	ApplicationId             string                  `yaml:"-"`
	EnvironmentId             string                  `yaml:"-"`
	CloudProviderType         CloudProviderType       `yaml:"cloudProviderType,omitempty"`
	DeploymentType            DeploymentType          `yaml:"deploymentType,omitempty"`
	InfrastructureDetail      []*InfrastructureDetail `yaml:"infrastructure,omitempty"`
	Provisioner               string                  `yaml:"provisioner,omitempty"`
	DeploymentTypeTemplateUri string                  `yaml:"deploymentTypeTemplateUri,omitempty"`
	ScopedServices            []string                `yaml:"scopedServices,omitempty"`
}

func (*InfrastructureDefinition) IsEmpty

func (a *InfrastructureDefinition) IsEmpty() bool

func (*InfrastructureDefinition) Validate

func (i *InfrastructureDefinition) Validate() (bool, error)

type InfrastructureDetail

type InfrastructureDetail struct {
	Type                          InfrastructureType `yaml:"type,omitempty"`
	AmiDeploymentType             AmiDeploymentType  `yaml:"amiDeploymentType,omitempty"`
	ASGIdentifiesWorkload         bool               `yaml:"asgIdentifiesWorkload,omitempty"`
	AssignPublicIp                bool               `yaml:"assignPublicIp,omitempty"`
	AutoscalingGroupName          string             `yaml:"autoScalingGroupName,omitempty"`
	AwsInstanceFilter             *AwsInstanceFilter `yaml:"awsInstanceFilter,omitempty"`
	BaseVMSSName                  string             `yaml:"baseVMSSName,omitempty"`
	ClassicLoadBalancers          []string           `yaml:"classicLoadBalancers,omitempty"`
	CloudProviderName             string             `yaml:"cloudProviderName,omitempty"`
	ClusterName                   string             `yaml:"clusterName,omitempty"`
	DesiredCapacity               int                `yaml:"desiredCapacity,omitempty"`
	ExecutionRole                 string             `yaml:"executionRole,omitempty"`
	Expressions                   map[string]string  `yaml:"expressions,omitempty"`
	HostConnectionAttrs           string             `yaml:"hostConnectionAttrs,omitempty"`
	HostConnectionAttrsName       string             `yaml:"hostConnectionAttrsName,omitempty"`
	HostConnectionType            string             `yaml:"hostConnectionType,omitempty"`
	HostNameConvention            string             `yaml:"hostNameConvention,omitempty"`
	HostNames                     []string           `yaml:"hostNames,omitempty"`
	IamRole                       string             `yaml:"iamRole,omitempty"`
	DeploymentTypeTemplateVersion string             `yaml:"deploymentTypeTemplateVersion,omitempty"`
	InfraVariables                []*InfraVariable   `yaml:"infraVariables,omitempty"`
	LaunchType                    string             `yaml:"launchType,omitempty"`
	LoadBalancerName              string             `yaml:"loadBalancerName,omitempty"`
	Namespace                     string             `yaml:"namespace,omitempty"`
	Organization                  string             `yaml:"organization,omitempty"`
	Region                        string             `yaml:"region,omitempty"`
	ReleaseName                   string             `yaml:"releaseName,omitempty"`
	ResourceGroup                 string             `yaml:"resourceGroup,omitempty"`
	ResourceGroupName             string             `yaml:"resourceGroupName,omitempty"`
	SecurityGroupIds              []string           `yaml:"securityGroupIds,omitempty"`
	SetDesiredCapacity            bool               `yaml:"setDesiredCapacity,omitempty"`
	Space                         string             `yaml:"space,omitempty"`
	SpotinstCloudProviderName     string             `yaml:"spotinstCloudProviderName,omitempty"`
	SpotinstElastiGroupJson       string             `yaml:"spotinstElastiGroupJson,omitempty"`
	StageClassicLoadBalancers     []string           `yaml:"stageClassicLoadBalancers,omitempty"`
	StageTargetGroupArns          []string           `yaml:"stageTargetGroupArns,omitempty"`
	SubnetIds                     []string           `yaml:"subnetIds,omitempty"`
	SubscriptionId                string             `yaml:"subscriptionId,omitempty"`
	TargetGroupArns               []string           `yaml:"targetGroupArns,omitempty"`
	UseAutoScalingGroup           bool               `yaml:"useAutoScalingGroup,omitempty"`
	UsePublicDns                  bool               `yaml:"usePublicDns,omitempty"`
	Username                      string             `yaml:"username,omitempty"`
	UseTrafficShift               bool               `yaml:"useTrafficShift,omitempty"`
	VmssAuthType                  VmssAuthType       `yaml:"vmssAuthType,omitempty"`
	VmssDeploymentType            VmssDeploymentType `yaml:"vmssDeploymentType,omitempty"`
	VpcId                         string             `yaml:"vpcId,omitempty"`
	WinRmConnectionAttributesName string             `yaml:"winRmConnectionAttributesName,omitempty"`
}

func (*InfrastructureDetail) ToAwsAmi

func (*InfrastructureDetail) ToAwsEcs

func (*InfrastructureDetail) ToAwsLambda

func (*InfrastructureDetail) ToAwsSSH

func (*InfrastructureDetail) ToAwsWinRm

func (*InfrastructureDetail) ToAzureVmss

func (*InfrastructureDetail) ToAzureWebApp

func (i *InfrastructureDetail) ToAzureWebApp() *InfrastructureAzureWebApp

func (*InfrastructureDetail) ToCustom

func (*InfrastructureDetail) ToDataCenterSSH

func (i *InfrastructureDetail) ToDataCenterSSH() *InfrastructureDataCenterSSH

func (*InfrastructureDetail) ToDataCenterWinRM

func (i *InfrastructureDetail) ToDataCenterWinRM() *InfrastructureDataCenterWinRM

func (*InfrastructureDetail) ToKubernetesDirect

func (i *InfrastructureDetail) ToKubernetesDirect() *InfrastructureKubernetesDirect

func (*InfrastructureDetail) ToKubernetesGcp

func (i *InfrastructureDetail) ToKubernetesGcp() *InfrastructureKubernetesGcp

func (*InfrastructureDetail) ToPcf

type InfrastructureKubernetesDirect

type InfrastructureKubernetesDirect struct {
	CloudProviderName string `yaml:"cloudProviderName,omitempty"`
	Namespace         string `yaml:"namespace,omitempty"`
	ReleaseName       string `yaml:"releaseName,omitempty"`
}

func (*InfrastructureKubernetesDirect) ToInfrastructureDetail

func (i *InfrastructureKubernetesDirect) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureKubernetesGcp

type InfrastructureKubernetesGcp struct {
	CloudProviderName string `yaml:"cloudProviderName,omitempty"`
	ClusterName       string `yaml:"clusterName,omitempty"`
	Namespace         string `yaml:"namespace,omitempty"`
	ReleaseName       string `yaml:"releaseName,omitempty"`
}

func (*InfrastructureKubernetesGcp) ToInfrastructureDetail

func (i *InfrastructureKubernetesGcp) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureTanzu

type InfrastructureTanzu struct {
	CloudProviderName string `yaml:"cloudProviderName,omitempty"`
	Organization      string `yaml:"organization,omitempty"`
	Space             string `yaml:"space,omitempty"`
}

func (*InfrastructureTanzu) ToInfrastructureDetail

func (i *InfrastructureTanzu) ToInfrastructureDetail() []*InfrastructureDetail

type InfrastructureType

type InfrastructureType string

func (InfrastructureType) String

func (v InfrastructureType) String() string

type KubernetesAuthType

type KubernetesAuthType string

func (KubernetesAuthType) String

func (v KubernetesAuthType) String() string

type KubernetesCloudProvider

type KubernetesCloudProvider struct {
	HarnessApiVersion          HarnessApiVersion           `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Id                         string                      `yaml:"-"`
	Name                       string                      `yaml:"-"`
	Type                       ObjectType                  `yaml:"type,omitempty"`
	AuthType                   KubernetesAuthType          `yaml:"authType,omitempty"`
	CACert                     *SecretRef                  `yaml:"caCert,omitempty"`
	ClientCert                 *SecretRef                  `yaml:"clientCert,omitempty"`
	ClientKey                  *SecretRef                  `yaml:"clientKey,omitempty"`
	ClientKeyAlgorithm         string                      `yaml:"clientKeyAlgorithm,omitempty"`
	ClientKeyPassPhrase        *SecretRef                  `yaml:"clientKeyPassPhrase,omitempty"`
	DelegateSelectors          []string                    `yaml:"delegateSelectors,omitempty"`
	Username                   string                      `yaml:"username,omitempty"`
	UsernameSecretId           *SecretRef                  `yaml:"usernameSecretId,omitempty"`
	ContinuousEfficiencyConfig *ContinuousEfficiencyConfig `yaml:"continuousEfficiencyConfig,omitempty"`
	MasterUrl                  string                      `yaml:"masterUrl,omitempty"`
	ServiceAccountToken        *SecretRef                  `yaml:"serviceAccountToken,omitempty"`
	SkipValidation             bool                        `yaml:"skipValidation,omitempty"`
	UseKubernetesDelegate      bool                        `yaml:"useKubernetesDelegate,omitempty"`
	UseEncryptedUsername       bool                        `yaml:"useEncryptedUsername,omitempty"`
	Password                   *SecretRef                  `yaml:"password,omitempty"`
	OIDCClientId               *SecretRef                  `yaml:"oidcClientId,omitempty"`
	OIDCIdentityProviderUrl    string                      `yaml:"oidcIdentityProviderUrl,omitempty"`
	OIDCPassword               *SecretRef                  `yaml:"oidcPassword,omitempty"`
	OIDCSecret                 *SecretRef                  `yaml:"oidcSecret,omitempty"`
	OIDCScopes                 string                      `yaml:"oidcScopes,omitempty"`
	OIDCUsername               string                      `yaml:"oidcUsername,omitempty"`
	UsageRestrictions          *UsageRestrictions          `yaml:"usageRestrictions,omitempty"`
}

func (*KubernetesCloudProvider) IsEmpty

func (a *KubernetesCloudProvider) IsEmpty() bool

type LaunchType

type LaunchType string

type ObjectType

type ObjectType string

func (ObjectType) String

func (v ObjectType) String() string

type PcfCloudProvider

type PcfCloudProvider struct {
	HarnessApiVersion HarnessApiVersion  `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type              ObjectType         `yaml:"type" json:"type"`
	Id                string             `yaml:"-"`
	Name              string             `yaml:"-"`
	EndpointUrl       string             `yaml:"endpointUrl,omitempty"`
	Password          *SecretRef         `yaml:"password,omitempty"`
	SkipValidation    bool               `yaml:"skipValidation,omitempty"`
	Username          string             `yaml:"username,omitempty"`
	UsernameSecretId  *SecretRef         `yaml:"usernameSecretId,omitempty"`
	UsageRestrictions *UsageRestrictions `yaml:"usageRestrictions,omitempty"`
}

func (*PcfCloudProvider) IsEmpty

func (a *PcfCloudProvider) IsEmpty() bool

type PhysicalDatacenterCloudProvider

type PhysicalDatacenterCloudProvider struct {
	HarnessApiVersion HarnessApiVersion  `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type              ObjectType         `yaml:"type" json:"type"`
	Name              string             `yaml:"-"`
	Id                string             `yaml:"-"`
	UsageRestrictions *UsageRestrictions `yaml:"usageRestrictions,omitempty"`
}

func (*PhysicalDatacenterCloudProvider) IsEmpty

func (*PhysicalDatacenterCloudProvider) Validate

func (cp *PhysicalDatacenterCloudProvider) Validate() (bool, error)

type Response

type Response struct {
	Metadata         *ResponseMetadata `json:"metaData"`
	Resource         *ConfigAsCodeItem `json:"resource"`
	ResponseMessages []ResponseMessage `json:"responseMessages"`
}

func (*Response) IsEmpty

func (r *Response) IsEmpty() bool

Indicates an error condition

type ResponseMessage

type ResponseMessage struct {
	Code    string `json:"code"`
	Level   string `json:"level"`
	Message string `json:"message"`
}

func (*ResponseMessage) ToError

func (m *ResponseMessage) ToError() error

type ResponseMetadata

type ResponseMetadata struct{}

type RestName

type RestName string

func (RestName) String

func (v RestName) String() string

type SecretRef

type SecretRef struct {
	Name string
}

func (*SecretRef) MarshalYAML

func (r *SecretRef) MarshalYAML() (interface{}, error)

func (*SecretRef) String added in v0.1.22

func (r *SecretRef) String() string

func (*SecretRef) UnmarshalYAML

func (r *SecretRef) UnmarshalYAML(unmarshal func(interface{}) error) error

type Service

type Service struct {
	HarnessApiVersion         HarnessApiVersion  `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Type                      ObjectType         `yaml:"type" json:"type"`
	Id                        string             `yaml:"-"`
	Name                      string             `yaml:"-"`
	ArtifactType              ArtifactType       `yaml:"artifactType,omitempty"`
	DeploymentType            DeploymentType     `yaml:"deploymentType,omitempty"`
	Description               string             `yaml:"description,omitempty"`
	Tags                      map[string]string  `yaml:"tags,omitempty"`
	HelmVersion               HelmVersion        `yaml:"helmVersion,omitempty"`
	ApplicationId             string             `yaml:"-"`
	DeploymentTypeTemplateUri string             `yaml:"deploymentTypeTemplateUri,omitempty"`
	ConfigVariables           []*ServiceVariable `yaml:"configVariables,omitempty"`
}

func (*Service) IsEmpty

func (a *Service) IsEmpty() bool

func (*Service) Validate

func (s *Service) Validate() (bool, error)

type ServiceVariable

type ServiceVariable struct {
	Name      string            `yaml:"name,omitempty"`
	Value     string            `yaml:"value,omitempty"`
	ValueType VariableValueType `yaml:"valueType,omitempty"`
}

func (*ServiceVariable) MarshalYAML added in v0.1.22

func (r *ServiceVariable) MarshalYAML() (interface{}, error)

func (*ServiceVariable) UnmarshalYAML added in v0.1.22

func (s *ServiceVariable) UnmarshalYAML(unmarshal func(interface{}) error) error

type SpotInstCloudProvider

type SpotInstCloudProvider struct {
	HarnessApiVersion HarnessApiVersion  `yaml:"harnessApiVersion" json:"harnessApiVersion"`
	Id                string             `yaml:"id,omitempty"`
	Name              string             `yaml:"-"`
	Type              ObjectType         `yaml:"type,omitempty"`
	AccountId         string             `yaml:"spotInstAccountId,omitempty"`
	Token             *SecretRef         `yaml:"spotInstToken,omitempty"`
	UsageRestrictions *UsageRestrictions `yaml:"usageRestrictions,omitempty"`
}

func (*SpotInstCloudProvider) IsEmpty

func (a *SpotInstCloudProvider) IsEmpty() bool

type Tag

type Tag struct {
	Name  string `yaml:"name,omitempty"`
	Value string `yaml:"value,omitempty"`
}

type UsageRestrictions

type UsageRestrictions struct {
	AppEnvRestrictions []*AppEnvRestriction `yaml:"appEnvRestrictions,omitempty"`
}

type VariableOverride

type VariableOverride struct {
	Name        string            `yaml:"name,omitempty"`
	ServiceName string            `yaml:"serviceName,omitempty"`
	Value       string            `yaml:"value,omitempty"`
	ValueType   VariableValueType `yaml:"valueType,omitempty"`
}

func (*VariableOverride) MarshalYAML added in v0.1.24

func (r *VariableOverride) MarshalYAML() (interface{}, error)

func (*VariableOverride) UnmarshalYAML added in v0.1.24

func (s *VariableOverride) UnmarshalYAML(unmarshal func(interface{}) error) error

type VariableValueType

type VariableValueType string

func (VariableValueType) String

func (v VariableValueType) String() string

type VmssAuthType

type VmssAuthType string

func (VmssAuthType) String

func (v VmssAuthType) String() string

type VmssDeploymentType

type VmssDeploymentType string

func (VmssDeploymentType) String

func (v VmssDeploymentType) String() string

type YamlEntity

type YamlEntity struct {
	Name          string
	Id            string
	Content       string
	ApplicationId string
	Path          YamlPath
}

type YamlPath

type YamlPath string

func GetApplicationYamlPath

func GetApplicationYamlPath(applicationName string) YamlPath

func GetArtifactServerYamlPath

func GetArtifactServerYamlPath(name string) YamlPath

func GetCloudProviderYamlPath

func GetCloudProviderYamlPath(cloudProviderName string) YamlPath

func GetEnvironmentYamlPath

func GetEnvironmentYamlPath(applicationName string, environmentName string) YamlPath

func GetInfraDefinitionYamlPath

func GetInfraDefinitionYamlPath(applicationName string, environmentName string, infraName string) YamlPath

func GetServiceYamlPath

func GetServiceYamlPath(applicationName string, serviceName string) YamlPath

func GetSourceRepoProviderYamlPath

func GetSourceRepoProviderYamlPath(name string) YamlPath

func GetTemplateLibraryYamlPath

func GetTemplateLibraryYamlPath(rootPath YamlPath, subDirPath string, name string) YamlPath

func (YamlPath) String added in v0.1.17

func (y YamlPath) String() string

Jump to

Keyboard shortcuts

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