DeleteOrganization will remove the corresponding organization from the deployment, based on the UUID/name provided as `orgID`.
(ctx context.Context, orgID string)
| 319 | // DeleteOrganization will remove the corresponding organization from the deployment, based on |
| 320 | // the UUID/name provided as `orgID`. |
| 321 | func (c *Client) DeleteOrganization(ctx context.Context, orgID string) error { |
| 322 | res, err := c.Request(ctx, http.MethodDelete, fmt.Sprintf("/api/v2/organizations/%s", orgID), nil) |
| 323 | if err != nil { |
| 324 | return xerrors.Errorf("execute request: %w", err) |
| 325 | } |
| 326 | defer res.Body.Close() |
| 327 | |
| 328 | if res.StatusCode != http.StatusOK { |
| 329 | return ReadBodyAsError(res) |
| 330 | } |
| 331 | |
| 332 | return nil |
| 333 | } |
| 334 | |
| 335 | // ProvisionerDaemons returns provisioner daemons available. |
| 336 | func (c *Client) ProvisionerDaemons(ctx context.Context) ([]ProvisionerDaemon, error) { |