(ctx context.Context)
| 547 | } |
| 548 | |
| 549 | func (c *Client) Entitlements(ctx context.Context) (Entitlements, error) { |
| 550 | res, err := c.Request(ctx, http.MethodGet, "/api/v2/entitlements", nil) |
| 551 | if err != nil { |
| 552 | return Entitlements{}, err |
| 553 | } |
| 554 | defer res.Body.Close() |
| 555 | if res.StatusCode != http.StatusOK { |
| 556 | return Entitlements{}, ReadBodyAsError(res) |
| 557 | } |
| 558 | var ent Entitlements |
| 559 | return ent, json.NewDecoder(res.Body).Decode(&ent) |
| 560 | } |
| 561 | |
| 562 | type PostgresAuth string |
| 563 |