MCPcopy Index your code
hub / github.com/cloudquery/cloudquery / writeSession

Function writeSession

cli/internal/platform/inject_test.go:56–64  ·  view source on GitHub ↗
(w http.ResponseWriter, token, apiURL string)

Source from the content-addressed store, hash-verified

54}
55
56func writeSession(w http.ResponseWriter, token, apiURL string) {
57 w.Header().Set("Content-Type", "application/json")
58 w.WriteHeader(http.StatusCreated)
59 _ = json.NewEncoder(w).Encode(map[string]any{
60 "token": token,
61 "api_url": apiURL,
62 "expires_in_seconds": 604800,
63 })
64}
65
66func fakeCloud(t *testing.T, tenants func(w http.ResponseWriter, r *http.Request), session func(w http.ResponseWriter, r *http.Request)) *httptest.Server {
67 t.Helper()

Calls 2

SetMethod · 0.45
HeaderMethod · 0.45

Tested by

no test coverage detected