@@ -32,8 +32,8 @@ type Stacks interface {
32
32
// ForceDelete deletes a stack.
33
33
ForceDelete (ctx context.Context , stackID string ) error
34
34
35
- // FetchConfiguration updates the configuration of a stack, triggering stack preparation.
36
- FetchConfiguration (ctx context.Context , stackID string ) (* Stack , error )
35
+ // FetchLatestFromVcs updates the configuration of a stack, triggering stack preparation.
36
+ FetchLatestFromVcs (ctx context.Context , stackID string ) (* Stack , error )
37
37
}
38
38
39
39
// stacks implements Stacks.
@@ -83,23 +83,19 @@ type StackVCSRepoOptions struct {
83
83
OAuthTokenID string `json:"oauth-token-id,omitempty"`
84
84
}
85
85
86
- type LinkedStackConnections struct {
87
- UpstreamCount int `jsonapi:"attr,upstream-count"`
88
- DownstreamCount int `jsonapi:"attr,downstream-count"`
89
- InputsCount int `jsonapi:"attr,inputs-count"`
90
- OutputsCount int `jsonapi:"attr,outputs-count"`
91
- }
92
-
93
86
// Stack represents a stack.
94
87
type Stack struct {
95
- ID string `jsonapi:"primary,stacks"`
96
- Name string `jsonapi:"attr,name"`
97
- Description string `jsonapi:"attr,description"`
98
- VCSRepo * StackVCSRepo `jsonapi:"attr,vcs-repo"`
99
- SpeculativeEnabled bool `jsonapi:"attr,speculative-enabled"`
100
- CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
101
- UpdatedAt time.Time `jsonapi:"attr,updated-at,iso8601"`
102
- LinkedStackConnections * LinkedStackConnections `jsonapi:"attr,linked-stack-connections"`
88
+ ID string `jsonapi:"primary,stacks"`
89
+ Name string `jsonapi:"attr,name"`
90
+ Description string `jsonapi:"attr,description"`
91
+ VCSRepo * StackVCSRepo `jsonapi:"attr,vcs-repo"`
92
+ SpeculativeEnabled bool `jsonapi:"attr,speculative-enabled"`
93
+ CreatedAt time.Time `jsonapi:"attr,created-at,iso8601"`
94
+ UpdatedAt time.Time `jsonapi:"attr,updated-at,iso8601"`
95
+ UpstreamCount int `jsonapi:"attr,upstream-count"`
96
+ DownstreamCount int `jsonapi:"attr,downstream-count"`
97
+ InputsCount int `jsonapi:"attr,inputs-count"`
98
+ OutputsCount int `jsonapi:"attr,outputs-count"`
103
99
104
100
// Relationships
105
101
Project * Project `jsonapi:"relation,project"`
@@ -202,8 +198,8 @@ type WaitForStatusResult struct {
202
198
const minimumPollingIntervalMs = 3000
203
199
const maximumPollingIntervalMs = 5000
204
200
205
- // FetchConfiguration fetches the latest configuration of a stack from VCS, triggering stack operations
206
- func (s * stacks ) FetchConfiguration (ctx context.Context , stackID string ) (* Stack , error ) {
201
+ // FetchLatestFromVcs fetches the latest configuration of a stack from VCS, triggering stack operations
202
+ func (s * stacks ) FetchLatestFromVcs (ctx context.Context , stackID string ) (* Stack , error ) {
207
203
req , err := s .client .NewRequest ("POST" , fmt .Sprintf ("stacks/%s/fetch-latest-from-vcs" , url .PathEscape (stackID )), nil )
208
204
if err != nil {
209
205
return nil , err
0 commit comments