(tunnelID uuid.UUID, params *CleanupParams)
| 236 | } |
| 237 | |
| 238 | func (r *RESTClient) CleanupConnections(tunnelID uuid.UUID, params *CleanupParams) error { |
| 239 | endpoint := r.baseEndpoints.accountLevel |
| 240 | endpoint.RawQuery = params.encode() |
| 241 | endpoint.Path = path.Join(endpoint.Path, fmt.Sprintf("%v/connections", tunnelID)) |
| 242 | resp, err := r.sendRequest("DELETE", endpoint, nil) |
| 243 | if err != nil { |
| 244 | return errors.Wrap(err, "REST request failed") |
| 245 | } |
| 246 | defer resp.Body.Close() |
| 247 | |
| 248 | return r.statusCodeToError("cleanup connections", resp) |
| 249 | } |
| 250 | |
| 251 | func unmarshalTunnel(reader io.Reader) (*Tunnel, error) { |
| 252 | var tunnel Tunnel |
nothing calls this directly
no test coverage detected