mirror of https://github.com/pulumi/pulumi.git
36 lines
1.0 KiB
Go
36 lines
1.0 KiB
Go
// Copyright 2016-2017, Pulumi Corporation. All rights reserved.
|
|
|
|
package cmd
|
|
|
|
import (
|
|
"github.com/pkg/errors"
|
|
"github.com/pulumi/pulumi/pkg/component"
|
|
"github.com/pulumi/pulumi/pkg/engine"
|
|
"github.com/pulumi/pulumi/pkg/tokens"
|
|
)
|
|
|
|
type stackSummary struct {
|
|
Name tokens.QName
|
|
// May be "n/a" for an undeployed stack.
|
|
LastDeploy string
|
|
ResourceCount string
|
|
}
|
|
|
|
type StackCreationOptions struct {
|
|
Cloud string
|
|
}
|
|
|
|
var errHasResources = errors.New("stack has existing resources and force was false")
|
|
|
|
type pulumiBackend interface {
|
|
CreateStack(stackName tokens.QName, opts StackCreationOptions) error
|
|
GetStacks() ([]stackSummary, error)
|
|
RemoveStack(stackName tokens.QName, force bool) error
|
|
|
|
Preview(stackName tokens.QName, debug bool, opts engine.PreviewOptions) error
|
|
Update(stackName tokens.QName, debug bool, opts engine.DeployOptions) error
|
|
Destroy(stackName tokens.QName, debug bool, opts engine.DestroyOptions) error
|
|
|
|
GetLogs(stackName tokens.QName, query component.LogQuery) ([]component.LogEntry, error)
|
|
}
|