()
| 219 | } |
| 220 | |
| 221 | func (c *Client) ListInstances() ([]Instance, error) { |
| 222 | var raw map[string]Instance |
| 223 | if err := c.doRequest(context.Background(), "GET", "/v1/instances/list", nil, &raw); err != nil { |
| 224 | return nil, err |
| 225 | } |
| 226 | return sortedInstances(raw), nil |
| 227 | } |
| 228 | |
| 229 | func (c *Client) AddSSHKeyCtx(ctx context.Context, instanceID string) (*AddSSHKeyResponse, error) { |
| 230 | var resp AddSSHKeyResponse |