MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / resourceID

Method resourceID

internal/server/commitment_graph_access_test.go:16–23  ·  view source on GitHub ↗
(kind string)

Source from the content-addressed store, hash-verified

14const graphMissingBody = "{\"error\":{\"code\":\"schedule_link_not_found\",\"message\":\"Commitment link or gate not found\"}}\n"
15
16func (f *graphHTTP) resourceID(kind string) string {
17 f.t.Helper()
18 var id string
19 if err := f.srv.store.DB().QueryRow("SELECT id FROM schedule_" + kind + " LIMIT 1").Scan(&id); err != nil {
20 f.t.Fatal(err)
21 }
22 return id
23}
24func (f *graphHTTP) resourcePath(kind, id string) string {
25 return "/api/v1/workspaces/" + f.ws.Slug + "/commitment-" + kind + "/" + id
26}

Callers 2

graphResourceMethod · 0.95

Calls 5

HelperMethod · 0.80
DBMethod · 0.80
FatalMethod · 0.80
ScanMethod · 0.65
QueryRowMethod · 0.65

Tested by

no test coverage detected