MCPcopy Index your code
hub / github.com/coder/coder / GetChatWorkspaceTTL

Method GetChatWorkspaceTTL

codersdk/chats.go:2612–2623  ·  view source on GitHub ↗

GetChatWorkspaceTTL returns the configured chat workspace TTL.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2610
2611// GetChatWorkspaceTTL returns the configured chat workspace TTL.
2612func (c *ExperimentalClient) GetChatWorkspaceTTL(ctx context.Context) (ChatWorkspaceTTLResponse, error) {
2613 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/workspace-ttl", nil)
2614 if err != nil {
2615 return ChatWorkspaceTTLResponse{}, err
2616 }
2617 defer res.Body.Close()
2618 if res.StatusCode != http.StatusOK {
2619 return ChatWorkspaceTTLResponse{}, ReadBodyAsError(res)
2620 }
2621 var resp ChatWorkspaceTTLResponse
2622 return resp, json.NewDecoder(res.Body).Decode(&resp)
2623}
2624
2625// UpdateChatWorkspaceTTL updates the chat workspace TTL setting.
2626func (c *ExperimentalClient) UpdateChatWorkspaceTTL(ctx context.Context, req UpdateChatWorkspaceTTLRequest) error {

Callers 1

TestChatWorkspaceTTLFunction · 0.95

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1

TestChatWorkspaceTTLFunction · 0.76