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

Method deploymentValues

coderd/deployment.go:19–38  ·  view source on GitHub ↗

@Summary Get deployment config @ID get-deployment-config @Security CoderSessionToken @Produce json @Tags General @Success 200 {object} codersdk.DeploymentConfig @Router /api/v2/deployment/config [get]

(rw http.ResponseWriter, r *http.Request)

Source from the content-addressed store, hash-verified

17// @Success 200 {object} codersdk.DeploymentConfig
18// @Router /api/v2/deployment/config [get]
19func (api *API) deploymentValues(rw http.ResponseWriter, r *http.Request) {
20 if !api.Authorize(r, policy.ActionRead, rbac.ResourceDeploymentConfig) {
21 httpapi.Forbidden(rw)
22 return
23 }
24
25 values, err := api.DeploymentValues.WithoutSecrets()
26 if err != nil {
27 httpapi.InternalServerError(rw, err)
28 return
29 }
30
31 httpapi.Write(
32 r.Context(), rw, http.StatusOK,
33 codersdk.DeploymentConfig{
34 Values: values,
35 Options: api.DeploymentOptions,
36 },
37 )
38}
39
40// @Summary Get deployment stats
41// @ID get-deployment-stats

Callers

nothing calls this directly

Calls 6

AuthorizeMethod · 0.95
ForbiddenFunction · 0.92
InternalServerErrorFunction · 0.92
WriteFunction · 0.92
WithoutSecretsMethod · 0.80
ContextMethod · 0.65

Tested by

no test coverage detected