Documentation ¶
Index ¶
- Constants
- func DeleteResourceGroup(ctx context.Context, subscriptionId string, resourceGroupName string) error
- func FindResourcesByType(template Template, resourceType string) []string
- type ArmTemplateDeployer
- type AzureDeployment
- type AzureDeploymentResult
- type AzureRedeployment
- type CreateDeployment
- type Deployer
- type DeploymentType
- type DryRunErrorResponse
- type DryRunResponse
- type DryRunResult
- type DryRunValidationInput
- type DryRunValidator
- type ErrorAdditionalInfo
- type ExecutionStatus
- type LookupTagKey
- type LookupTags
- type Template
- type TemplateParams
- type WhatIfValidatorFunc
Constants ¶
View Source
const LookupPrefix = "modm."
Variables ¶
This section is empty.
Functions ¶
func DeleteResourceGroup ¶
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) GetTemplate ¶
func (ad *AzureDeployment) GetTemplate() 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 DryRunErrorResponse ¶
type DryRunErrorResponse struct { // READ-ONLY; The error additional info. AdditionalInfo []*ErrorAdditionalInfo `json:"additionalInfo,omitempty" azure:"ro"` // READ-ONLY; The error code. Code *string `json:"code,omitempty" azure:"ro"` // READ-ONLY; The error message. Message *string `json:"message,omitempty" azure:"ro"` // READ-ONLY; The error target. Target *string `json:"target,omitempty" azure:"ro"` // READ-ONLY; The error details. Details []*DryRunErrorResponse `json:"details,omitempty" azure:"ro"` }
type DryRunResponse ¶
type DryRunResponse struct {
DryRunResult
}
func DryRun ¶
func DryRun(ctx context.Context, azureDeployment *AzureDeployment) (*DryRunResponse, error)
type DryRunResult ¶
type DryRunResult struct { Status *string `json:"code,omitempty" azure:"ro"` //Message *string `json:"message,omitempty" azure:"ro"` //Target *string `json:"target,omitempty" azure:"ro"` Error *DryRunErrorResponse }
type DryRunValidationInput ¶
type DryRunValidationInput struct {
// contains filtered or unexported fields
}
type DryRunValidator ¶
type DryRunValidator interface {
Validate(input DryRunValidationInput) (*DryRunResponse, error)
}
type ErrorAdditionalInfo ¶
type ErrorAdditionalInfo struct { // READ-ONLY; The additional info. Info interface{} `json:"info,omitempty" azure:"ro"` // READ-ONLY; The additional info type. Type *string `json:"type,omitempty" azure:"ro"` }
ErrorAdditionalInfo - The resource management error additional info.
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 WhatIfValidatorFunc ¶
type WhatIfValidatorFunc func(input DryRunValidationInput) (*DryRunResponse, error)
func (WhatIfValidatorFunc) Validate ¶
func (f WhatIfValidatorFunc) Validate(input DryRunValidationInput) (*DryRunResponse, error)
Click to show internal directories.
Click to hide internal directories.