| 2718 | } |
| 2719 | |
| 2720 | func (c *unixSocketClient) ListSessions(ctx context.Context, query SessionListQuery) ([]SessionRecord, error) { |
| 2721 | var response struct { |
| 2722 | Sessions []SessionRecord `json:"sessions"` |
| 2723 | } |
| 2724 | if err := c.doJSON(ctx, http.MethodGet, "/api/sessions", sessionListValues(query), nil, &response); err != nil { |
| 2725 | return nil, err |
| 2726 | } |
| 2727 | return response.Sessions, nil |
| 2728 | } |
| 2729 | |
| 2730 | func (c *unixSocketClient) sessionScopedPath(ctx context.Context, id string, suffix string) (string, error) { |
| 2731 | sessionID, err := requireNetworkPathValue("session_id", id) |