MCPcopy
hub / github.com/lxc/incus / ProjectParam

Function ProjectParam

internal/server/request/parse.go:12–19  ·  view source on GitHub ↗

ProjectParam returns the project query parameter from the given request or "default" if parameter is not set.

(request *http.Request)

Source from the content-addressed store, hash-verified

10
11// ProjectParam returns the project query parameter from the given request or "default" if parameter is not set.
12func ProjectParam(request *http.Request) string {
13 projectParam := QueryParam(request, "project")
14 if projectParam == "" {
15 projectParam = api.ProjectDefaultName
16 }
17
18 return projectParam
19}
20
21// QueryParam extracts the given query parameter directly from the URL, never from an
22// encoded body.

Callers 15

requestDetailsMethod · 0.92
instanceConsolePostFunction · 0.92
instanceConsoleLogGetFunction · 0.92
instanceConsoleLogDeleteFunction · 0.92
storagePoolBucketsGetFunction · 0.92
storagePoolBucketGetFunction · 0.92
storagePoolBucketsPostFunction · 0.92
storagePoolBucketPutFunction · 0.92
storagePoolBucketDeleteFunction · 0.92
storagePoolBucketKeysGetFunction · 0.92

Calls 1

QueryParamFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…