6
6
"net/url"
7
7
)
8
8
9
+ // StackDeploymentGroups describes all the stack-deployment-groups related methods that the HCP Terraform API supports.
9
10
type StackDeploymentGroups interface {
10
11
// List returns a list of Deployment Groups in a stack.
11
12
List (ctx context.Context , stackConfigID string , options * StackDeploymentGroupListOptions ) (* StackDeploymentGroupList , error )
@@ -21,12 +22,14 @@ const (
21
22
DeploymentGroupStatusAbandoned DeploymentGroupStatus = "abandoned"
22
23
)
23
24
25
+ // stackDeploymentGroups implements StackDeploymentGroups.
24
26
type stackDeploymentGroups struct {
25
27
client * Client
26
28
}
27
29
28
30
var _ StackDeploymentGroups = & stackDeploymentGroups {}
29
31
32
+ // StackDeploymentGroup represents a stack deployment group.
30
33
type StackDeploymentGroup struct {
31
34
ID string `jsonapi:"primary,stacks-deployment-groups"`
32
35
Name string `jsonapi:"attr,name"`
@@ -44,10 +47,12 @@ type StackDeploymentGroupList struct {
44
47
Items []* StackDeploymentGroup
45
48
}
46
49
50
+ // StackDeploymentGroupListOptions represents additional options when listing stack deployment groups.
47
51
type StackDeploymentGroupListOptions struct {
48
52
ListOptions
49
53
}
50
54
55
+ // List returns a list of Deployment Groups in a stack, optionally filtered by additional parameters.
51
56
func (s stackDeploymentGroups ) List (ctx context.Context , stackConfigID string , options * StackDeploymentGroupListOptions ) (* StackDeploymentGroupList , error ) {
52
57
if ! validStringID (& stackConfigID ) {
53
58
return nil , fmt .Errorf ("invalid stack configuration ID: %s" , stackConfigID )
0 commit comments