Documentation ¶
Index ¶
- Constants
- func DeleteResourceGroup(ctx context.Context, subscriptionId string, resourceGroupName string) error
- func DryRun(ctx context.Context, azureDeployment *AzureDeployment) ([]*sdk.DryRunResult, error)
- func FindResourcesByType(template Template, resourceType string) []string
- type ArmTemplateDeployer
- type AzureDeployment
- type AzureDeploymentResult
- type AzureRedeployment
- type CreateDeployment
- type Deployer
- type DeploymentType
- type DryRunValidationInput
- type DryRunValidator
- type ExecutionStatus
- type LookupTagKey
- type LookupTags
- type Template
- type TemplateParams
- type ValidatorFunc
Constants ¶
View Source
const LookupPrefix = "modm."
Variables ¶
This section is empty.
Functions ¶
func DeleteResourceGroup ¶
func DryRun ¶
func DryRun(ctx context.Context, azureDeployment *AzureDeployment) ([]*sdk.DryRunResult, error)
func FindResourcesByType ¶
Types ¶
type ArmTemplateDeployer ¶
type ArmTemplateDeployer struct {
// contains filtered or unexported fields
}
func (*ArmTemplateDeployer) Deploy ¶
func (armDeployer *ArmTemplateDeployer) Deploy(ctx context.Context, ad *AzureDeployment) (*AzureDeploymentResult, error)
func (*ArmTemplateDeployer) Redeploy ¶ added in v0.2.1
func (armDeployer *ArmTemplateDeployer) Redeploy(ctx context.Context, ad *AzureRedeployment) (*AzureDeploymentResult, error)
type AzureDeployment ¶
type AzureDeployment struct { SubscriptionId string `json:"subscriptionId"` Location string `json:"location"` ResourceGroupName string `json:"resourceGroupName"` DeploymentName string `json:"deploymentName"` DeploymentType DeploymentType `json:"deploymentType"` Template Template `json:"template"` Params TemplateParams `json:"templateParams"` ResumeToken string `json:"resumeToken"` }
func (*AzureDeployment) GetDeploymentType ¶
func (ad *AzureDeployment) GetDeploymentType() DeploymentType
func (AzureDeployment) GetParams ¶ added in v1.0.1
func (ad AzureDeployment) GetParams() map[string]interface{}
func (AzureDeployment) GetTemplateParams ¶
func (ad AzureDeployment) GetTemplateParams() map[string]interface{}
type AzureDeploymentResult ¶
type AzureDeploymentResult struct { ID string `json:"id"` CorrelationID string `json:"correlationId"` Duration string `json:"duration"` Timestamp time.Time `json:"timestamp"` ProvisioningState string `json:"provisioningState"` Outputs map[string]interface{} `json:"outputs"` Status ExecutionStatus }
func Create ¶
func Create(ctx context.Context, dep AzureDeployment) (*AzureDeploymentResult, error)
func Redeploy ¶ added in v0.2.1
func Redeploy(ctx context.Context, dep AzureRedeployment) (*AzureDeploymentResult, error)
type AzureRedeployment ¶ added in v0.2.1
type CreateDeployment ¶ added in v0.2.2
type CreateDeployment func(ctx context.Context, dep AzureDeployment) (*AzureDeploymentResult, error)
create deployment function
type Deployer ¶
type Deployer interface { Deploy(ctx context.Context, d *AzureDeployment) (*AzureDeploymentResult, error) Redeploy(ctx context.Context, d *AzureRedeployment) (*AzureDeploymentResult, error) }
func CreateNewDeployer ¶
func CreateNewDeployer(deploymentType DeploymentType) Deployer
type DeploymentType ¶
type DeploymentType int64
const ( AzureResourceManager DeploymentType = iota Terraform )
type DryRunValidationInput ¶
type DryRunValidationInput struct {
// contains filtered or unexported fields
}
func (DryRunValidationInput) GetParams ¶ added in v1.0.1
func (i DryRunValidationInput) GetParams() map[string]interface{}
func (DryRunValidationInput) GetTemplateParams ¶ added in v1.0.1
func (i DryRunValidationInput) GetTemplateParams() map[string]interface{}
type DryRunValidator ¶
type DryRunValidator interface {
Validate(input DryRunValidationInput) (*sdk.DryRunResult, error)
}
type ExecutionStatus ¶
type ExecutionStatus string
const ( Started ExecutionStatus = "Started" Failed ExecutionStatus = "Failed" PermanentlyFailed ExecutionStatus = "PermanentlyFailed" Succeeded ExecutionStatus = "Succeeded" Restart ExecutionStatus = "Restart" Restarted ExecutionStatus = "Restarted" RestartTimedOut ExecutionStatus = "RestartTimedOut" Canceled ExecutionStatus = "Canceled" )
type LookupTagKey ¶
type LookupTagKey string
const ( // The unique id for modm to identify something LookupTagKeyId LookupTagKey = "modm.id" // whether or not to send events, if this is not set to true, then the event will not be sent LookupTagKeyEvents LookupTagKey = "modm.events" // the friendly name of the resource used for logging LookupTagKeyName LookupTagKey = "modm.name" // the stage id reference. Use is on a resource that's a child of a 1-level parent deployment LookupTagKeyStageId LookupTagKey = "modm.stage.id" // the stage id reference. Use is on a resource that's a child of a 1-level parent deployment LookupTagKeyRetry LookupTagKey = "modm.retry" )
type LookupTags ¶
type LookupTags map[LookupTagKey]*string
type TemplateParams ¶
type TemplateParams map[string]interface{}
type ValidatorFunc ¶ added in v1.0.0
type ValidatorFunc func(input DryRunValidationInput) (*sdk.DryRunResult, error)
func (ValidatorFunc) Validate ¶ added in v1.0.0
func (f ValidatorFunc) Validate(input DryRunValidationInput) (*sdk.DryRunResult, error)
Click to show internal directories.
Click to hide internal directories.