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

Function GroupParam

coderd/httpmw/groupparam.go:17–23  ·  view source on GitHub ↗

GroupParam returns the group extracted via the ExtraGroupParam middleware.

(r *http.Request)

Source from the content-addressed store, hash-verified

15
16// GroupParam returns the group extracted via the ExtraGroupParam middleware.
17func GroupParam(r *http.Request) database.Group {
18 group, ok := r.Context().Value(groupParamContextKey{}).(database.Group)
19 if !ok {
20 panic("developer error: group param middleware not provided")
21 }
22 return group
23}
24
25func ExtractGroupByNameParam(db database.Store) func(http.Handler) http.Handler {
26 return func(next http.Handler) http.Handler {

Callers 8

TestGroupParamFunction · 0.92
groupAIBudgetMethod · 0.92
upsertGroupAIBudgetMethod · 0.92
deleteGroupAIBudgetMethod · 0.92
patchGroupMethod · 0.92
deleteGroupMethod · 0.92
groupMethod · 0.92
groupMembersMethod · 0.92

Calls 2

ContextMethod · 0.65
ValueMethod · 0.45

Tested by 1

TestGroupParamFunction · 0.74