| 2759 | } |
| 2760 | |
| 2761 | func (c *unixSocketClient) CreateSession(ctx context.Context, request CreateSessionRequest) (SessionRecord, error) { |
| 2762 | var response struct { |
| 2763 | Session SessionRecord `json:"session"` |
| 2764 | } |
| 2765 | if err := c.doJSON(ctx, http.MethodPost, "/api/sessions", nil, request, &response); err != nil { |
| 2766 | return SessionRecord{}, err |
| 2767 | } |
| 2768 | return response.Session, nil |
| 2769 | } |
| 2770 | |
| 2771 | func (c *unixSocketClient) GetSession(ctx context.Context, id string) (SessionRecord, error) { |
| 2772 | var response struct { |