MCPcopy
hub / github.com/semaphoreui/semaphore / GetKeyRefs

Function GetKeyRefs

api/projects/keys.go:47–56  ·  view source on GitHub ↗
(w http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

45}
46
47func GetKeyRefs(w http.ResponseWriter, r *http.Request) {
48 key := helpers.GetFromContext(r, "accessKey").(db.AccessKey)
49 refs, err := helpers.Store(r).GetAccessKeyRefs(*key.ProjectID, key.ID)
50 if err != nil {
51 helpers.WriteError(w, err)
52 return
53 }
54
55 helpers.WriteJSON(w, http.StatusOK, refs)
56}
57
58// GetKeys retrieves sorted keys from the database
59func GetKeys(w http.ResponseWriter, r *http.Request) {

Callers

nothing calls this directly

Calls 5

GetFromContextFunction · 0.92
StoreFunction · 0.92
WriteErrorFunction · 0.92
WriteJSONFunction · 0.92
GetAccessKeyRefsMethod · 0.65

Tested by

no test coverage detected