| 237 | } |
| 238 | |
| 239 | func (c *Client) WorkspaceBuildParameters(ctx context.Context, build uuid.UUID) ([]WorkspaceBuildParameter, error) { |
| 240 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/workspacebuilds/%s/parameters", build), nil) |
| 241 | if err != nil { |
| 242 | return nil, err |
| 243 | } |
| 244 | defer res.Body.Close() |
| 245 | if res.StatusCode != http.StatusOK { |
| 246 | return nil, ReadBodyAsError(res) |
| 247 | } |
| 248 | var params []WorkspaceBuildParameter |
| 249 | return params, json.NewDecoder(res.Body).Decode(¶ms) |
| 250 | } |
| 251 | |
| 252 | type TimingStage string |
| 253 | |