(ctx context.Context, name string)
| 133 | } |
| 134 | |
| 135 | func (c *Client) DeleteWorkspaceProxyByName(ctx context.Context, name string) error { |
| 136 | res, err := c.Request(ctx, http.MethodDelete, |
| 137 | fmt.Sprintf("/api/v2/workspaceproxies/%s", name), |
| 138 | nil, |
| 139 | ) |
| 140 | if err != nil { |
| 141 | return xerrors.Errorf("make request: %w", err) |
| 142 | } |
| 143 | defer res.Body.Close() |
| 144 | |
| 145 | if res.StatusCode != http.StatusOK { |
| 146 | return ReadBodyAsError(res) |
| 147 | } |
| 148 | |
| 149 | return nil |
| 150 | } |
| 151 | |
| 152 | func (c *Client) DeleteWorkspaceProxyByID(ctx context.Context, id uuid.UUID) error { |
| 153 | return c.DeleteWorkspaceProxyByName(ctx, id.String()) |
no test coverage detected